1 Reply
      Latest reply on Mar 31, 2020 4:23 AM by appleaudioFUN
      appleaudioFUN Level 1 Level 1 (0 points)

        I have an ios app about  communicate audio and video. the Voice communication part use audio unit. there are two obj  obj_audiounit  ,one is use to record (voip),another is use to play audio (voip).and the audio unit obj of play,crash !!!.

        at the play part , i use a thread to start the audio unit . but it crash random.

         

        thread run{

        OSStatus status = AudioUnitInitialize(pThis->m_pAudioUnit);

                    if (status != noErr)

                    {

                        NSLog(@"couldn't initialize AURemoteIO instance");

                    }

                  

                    status = AudioOutputUnitStart(pThis->m_pAudioUnit);

                    if (status != noErr)

                    {

                        NSLog(@"error  AudioOutputUnitStart");

                    }

        }

         

        libembeddsystemaus.dylib  aumethodstart+160876 (void*)+64

        libembeddsystemaus.dylib  aumethodstart+160856(void*)+44

        libsystem_pthread _pthread_start

         

        thread X crash with arm thread state....

         

        what's the reason?