AVAudioSessionCategoryOptionDefaultToSpeaker question

AudioUnit recording parameters

16k

Single channel

16 bits

setPreferredIOBufferDuration 0.05s



The default data collected is 2048 bytes.



When setting AVAudioSessionCategoryPlayAndRecord AVAudioSessionCategoryOptionDefaultToSpeaker



The collected data becomes 628 bytes and the sound is distorted.



How to solve this problem, I want to collect 2048 bytes when using AVAudioSessionCategoryOptionDefaultToSpeaker

Replies

kAudioFormatLinearPCM