Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-11-2010, 03:38 AM   #1 (permalink)
Registered Member
 
Frankie's Avatar
 
Join Date: Jun 2009
Location: San Antonio, TX
Posts: 104
Frankie is on a distinguished road
Send a message via MSN to Frankie
Red face iPod Volume Slider That's Not Linked To Master Volume

What is the code that works for the UISlider that changes the volume for the iPod controls but doesn't link with the master iPhone volume?
__________________
My new app that was recently featured in the App Store section: Soundsations
Creator of the most awesome app iWasted
Also Created the Audience app
Frankie is offline   Reply With Quote
Old 06-11-2010, 10:52 AM   #2 (permalink)
Registered Member
 
Frankie's Avatar
 
Join Date: Jun 2009
Location: San Antonio, TX
Posts: 104
Frankie is on a distinguished road
Send a message via MSN to Frankie
Unhappy Here is the code

HTML Code:
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.musicPlayer = [MPMusicPlayerController iPodMusicPlayer];
    
    // Initial sync of display with music player state
    [self handleNowPlayingItemChanged:nil];
    [self handlePlaybackStateChanged:nil];
    [self handleExternalVolumeChanged:nil];
    
    // Register for music player notifications
    NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
    [notificationCenter addObserver:self 
                           selector:@selector(handleNowPlayingItemChanged:)
                               name:MPMusicPlayerControllerNowPlayingItemDidChangeNotification 
                             object:self.musicPlayer];
    [notificationCenter addObserver:self 
                           selector:@selector(handlePlaybackStateChanged:)
                               name:MPMusicPlayerControllerPlaybackStateDidChangeNotification 
                             object:self.musicPlayer];
    [notificationCenter addObserver:self 
                           selector:@selector(handleExternalVolumeChanged:)
                               name:MPMusicPlayerControllerVolumeDidChangeNotification 
                             object:self.musicPlayer];
    [self.musicPlayer beginGeneratingPlaybackNotifications];


- (void)viewDidUnload {
    // Stop music player notifications
    [[NSNotificationCenter defaultCenter] removeObserver:self 
                                                    name:MPMusicPlayerControllerNowPlayingItemDidChangeNotification 
                                                  object:self.musicPlayer];
    [[NSNotificationCenter defaultCenter] removeObserver:self 
                                                    name:MPMusicPlayerControllerPlaybackStateDidChangeNotification 
                                                  object:self.musicPlayer];
    [[NSNotificationCenter defaultCenter] removeObserver:self 
                                                    name:MPMusicPlayerControllerVolumeDidChangeNotification
                                                  object:self.musicPlayer];
    [self.musicPlayer endGeneratingPlaybackNotifications];
    
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
    self.musicPlayer = nil;
    self.playPauseButton = nil;
    self.songLabel = nil;
    self.artistLabel = nil;
    self.albumLabel = nil;
    self.artworkImageView = nil;
    self.volumeSlider = nil;
}


// When the volume changes, sync the volume slider
- (void)handleExternalVolumeChanged:(id)notification {
    // self.volumeSlider is a UISlider used to display music volume.
    // self.musicPlayer.volume ranges from 0.0 to 1.0.
    [self.volumeSlider setValue:self.musicPlayer.volume animated:YES];
}


- (IBAction)volumeSliderChanged:(id)sender {
    self.musicPlayer.volume = self.volumeSlider.value;
}




Here is the code, what am I do I need to change???
__________________
My new app that was recently featured in the App Store section: Soundsations
Creator of the most awesome app iWasted
Also Created the Audience app
Frankie is offline   Reply With Quote
Old 06-11-2010, 11:21 AM   #3 (permalink)
Registered Member
 
Frankie's Avatar
 
Join Date: Jun 2009
Location: San Antonio, TX
Posts: 104
Frankie is on a distinguished road
Send a message via MSN to Frankie
Default

nobody???
__________________
My new app that was recently featured in the App Store section: Soundsations
Creator of the most awesome app iWasted
Also Created the Audience app
Frankie is offline   Reply With Quote
Old 06-12-2010, 12:51 AM   #4 (permalink)
Registered Member
 
Frankie's Avatar
 
Join Date: Jun 2009
Location: San Antonio, TX
Posts: 104
Frankie is on a distinguished road
Send a message via MSN to Frankie
Default

__________________
My new app that was recently featured in the App Store section: Soundsations
Creator of the most awesome app iWasted
Also Created the Audience app
Frankie is offline   Reply With Quote
Old 08-15-2010, 07:24 AM   #5 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 1
Tank84 is on a distinguished road
Default

Quote:
Originally Posted by Frankie View Post
What do u mean by system volume? ipod's volume or the ringer? I can help...
Tank84 is offline   Reply With Quote
Old 08-15-2010, 10:16 AM   #6 (permalink)
Registered Member
 
Frankie's Avatar
 
Join Date: Jun 2009
Location: San Antonio, TX
Posts: 104
Frankie is on a distinguished road
Send a message via MSN to Frankie
Default

Quote:
Originally Posted by Tank84 View Post
What do u mean by system volume? ipod's volume or the ringer? I can help...
I'm talking about the system volume. I have music and sounds playing in the background but when the background music volume is lowered I don't want the music from the iPod to be effected.
__________________
My new app that was recently featured in the App Store section: Soundsations
Creator of the most awesome app iWasted
Also Created the Audience app
Frankie is offline   Reply With Quote
Reply

Bookmarks

Tags
ipod, link, master, uislider, volume

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 335
11 members and 324 guests
Absentia, Domele, fiftysixty, givensur, heshiming, iGamesDev, linkmx, michaelhansen, PixelInteractive, raihan.zbr, Sloshmonster
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,892
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:12 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0