开发者

Audio Units volume issue on iPhone4

开发者 https://www.devze.com 2023-02-26 21:05 出处:网络
I have a rather strange issue, I\'m using Audio Units from CoreAudio to playback sound, the sound it\'s loud as it should be on iPhone3g and iPhone3gs, however it\'s mild, soft (maybe half the volume)

I have a rather strange issue, I'm using Audio Units from CoreAudio to playback sound, the sound it's loud as it should be on iPhone3g and iPhone3gs, however it's mild, soft (maybe half the volume) on iPhone4. Is smth different on iPhone4? I don't specifically set the volume in code because I was happy with the volume on the other 2 devices. Please note that the tests were conducted with the volume knob at 开发者_高级运维the same level on all devices, so that's surely not the problem:D. Anyone got this before?


Are you setting an AudioSession category? The play-and-record session is very quiet unless you override the audio route. Also, know that some categories have their own volume, so setting the volume before your app is running may have no effect.


this is how to undo the rerouting:

UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
  AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute, sizeof(audioRouteOverride), &audioRouteOverride);

when having the category "kAudioSessionCategory_PlayAndRecord"

0

精彩评论

暂无评论...
验证码 换一张
取 消