OpenAL does not work when using AVAudioRecorder and AVAudioPlayer

I am worried about the audio problem for several days. I do not think OpenAL will work with AVAudio features.

I have my own OpenAL class. (wrapped class MyOpenAL) my application will start recording using AVAudioRecorder. I stop recording. and then I clicked the "OpenAL Play" button, which plays any sound using OpenAL. I do not hear this. but I can hear my recording when I clicked the “AVAudioPlayer Play” button using AVAudioPlayer.

i checked oalTouch, avTouch, SpeakHear code example. they led to the same. in oalTouch, when AVAudioPlayer stops, OpenAL stops at the same time. that’s why I think so.

Is there an OpenAL problem in using AVAudio ~ Functions together?

I searched Google a long time. but I cannot find solutions to the same problems.

thanks for reading mine.

+3
source share
1 answer

I use AVAudioRecorder (for recording) and OpenAL (for playback), and they both go pretty well. Just want to check if you use the Play_And_Record parameter when you initialize your AVAudioRecorder?

0
source

Source: https://habr.com/ru/post/1746694/


All Articles