开发者

iphone play and record low volume problem

开发者 https://www.devze.com 2023-03-14 05:05 出处:网络
I\'m making kind of voip app, so I have to be able to play and record sound at the same time. But.. when I play an开发者_StackOverflowd record at same time, iphone\'s volume was very low.

I'm making kind of voip app, so I have to be able to play and record sound at the same time.

But.. when I play an开发者_StackOverflowd record at same time, iphone's volume was very low.

I used

 //kAudio
        UInt32 audioCategory = kAudioSessionCategory_PlayAndRecord;
        AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryMixWithOthers, sizeof(audioCategory), &audioCategory);

and

I try to

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

but.. still volume is very low..

please help..!

P.S

I'm using playing sound by audioQueue and recording sound by audioUnit.


Have you set your volume using kAudioSessionProperty_InputGainScalar property prior to recording ?

BTW, this input gain property is only available from iOS5.

0

精彩评论

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