title: Voip application crash on iphone during opening blutooth
body: <p>In normal scenario my VOIP application is working fine but when I try to open blue booth, VOIP application is crashing in AudioUnitRender. Use case:</p>
  
  <ol>
  <li>Make a normal audio call--audio will come on ear phone</li>
  <li>Press Home button
  <ol>
  <li>Voip will go in background-</li>
  </ol></li>
  <li>Make blueTooth on-audio should go on blue tooth</li>
  <li>Make BT off voice should go on ear phone mod-</li>
  </ol>
  
  <p>If I continuously repeat this use case application is crashing in capture call back and crash is showing in AudioUnitRender.</p>
  
  <p>Crash:</p>
  
  <pre><code>Thread 7 name:  AURemoteIO::IOThread
  Thread 7 Crashed:
  0   libsystem_c.dylib               0x3497bbf0 memcpy$VARIANT$CortexA8 + 696
  1   AudioToolbox                    0x3382a7e6 AUMethodRender(void*, unsigned long*, AudioTimeStamp const*, unsigned long, unsigned long, AudioBufferList*) + 46
  2   AudioToolbox                    0x3373d264 AudioUnitRender + 44
  3   aVVoIPApp                       0x0001cb58 0x1000 + 113496
  4   AudioToolbox                    0x33806cee AUIOHelper::NotifyInputAvailable(AudioTimeStamp const&amp;, unsigned long, AudioBufferList const&amp;) + 58
  5   AudioToolbox                    0x337f707e AURemoteIO::PerformIO(unsigned int, unsigned int, XAudioTimeStamp const&amp;, XAudioTimeStamp const&amp;, int&amp;) + 834
  6   AudioToolbox                    0x337f7168 AURIOCallbackReceiver_PerformIO + 40
  7   AudioToolbox                    0x337ecf42 _XPerformIO + 178
  8   AudioToolbox                    0x33755d64 mshMIGPerform + 112
  9   AudioToolbox                    0x337c0742 MSHMIGDispatchMessage + 22
  10  AudioToolbox                    0x337f67f8 AURemoteIO::IOThread::Run() + 36
  11  AudioToolbox                    0x337fc342 AURemoteIO::IOThread::Entry(void*) + 2
  12  AudioToolbox                    0x3373148a CAPThread::Entry(CAPThread*) + 138
  13  libsystem_c.dylib               0x3494530a _pthread_start + 242
  14  libsystem_c.dylib               0x34946bb4 thread_start + 0
  
  Thread 7 crashed with ARM Thread State:
      r0: 0x04a4c000    r1: 0x04842040      r2: 0x00000080      r3: 0xfffffd00
      r4: 0x002f399c    r5: 0x3382a7b9      r6: 0x06a00c2c      r7: 0x06a00b90
      r8: 0x06a00cbc    r9: 0x00002000     r10: 0x00000001     r11: 0x007bc013
      ip: 0x04a4c000    sp: 0x06a00a70      lr: 0x3373d483      pc: 0x3497bbf0
    cpsr: 0x20000030
  </code></pre>