Decrease the volume of the audio played by the AudioToolbox

If I play my sounds on iPhone at maximum ringer volume, it plays fine. But when I decrease it to some extent, the AudioToolbox sounds play at the same volume. But the sounds of AVAudioPlayer play fine. Is there a way to decrease the volume of the sounds played by the AudioToolbox ...

+1


a source to share


1 answer


From: iPhone Application Programming Guide

The AudioServicesPlaySystemSound function allows you to simply play short audio files. Simplicity has several limitations. Your sound files should be:

  • Duration less than 30 seconds
  • Linear PCM or IMA4 (IMA / ADPCM)
    format packed in .caf, .aif, or
    .wav file


Also, when you use the AudioServicesPlaySystemSound function:

  • Sound play in the current system sound level without level control available
  • Sounds play immediately
  • Loop and stereo positioning not available
+3


a source







All Articles