Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iLoveDeveloping

Suspended
Original poster
Sep 24, 2009
596
2,366
Ireland
Hey,

In an App im doing there is some music connected to a button, when the button is pressed the music plays with AudioToolbox framework! But when the volume is turned off or town the music continues to play at the same level! Is there any way to detect when the user turns volume off or down? The code im using is just a simple:

Code:
- (IBAction)BreakSound:(id)sender {  
	AudioServicesPlaySystemSound (self.BreakNoteFileObject);
	
}

/////////

	// Get the URL to the sound file to play  
	BreakNoteFileURLRef  =    CFBundleCopyResourceURL (  
														  mainBundle,  
														  CFSTR ("Break"),  
														  CFSTR ("wav"),  
														  NULL  
														  );  
	
	// Create a system sound object representing the sound file  
	AudioServicesCreateSystemSoundID (BreakNoteFileURLRef, &BreakNoteFileObject);

Thanks for any help!

Any ideas?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.