Game Development Community

[RESOLVED] iOS 6 MPMoviePlayer crash - problem in iphoneMoviePlayeback

by Andrea Fraboni · in iTorque 2D · 09/23/2012 (1:35 pm) · 4 replies

by test on device app crash when start movie ... with iPhoneMoviePlayeback ...

by internet search results there is a real problem .....

have anyone test it ????

thanks

#1
09/29/2012 (3:25 am)
OK I test my code and I found cause of crash :

Audio::OpenALInit();

is here ..

// Reactivate the current audio session
	
    AudioSessionSetActive(YES);
    Audio::OpenALInit(); <============= cause crash !!!!


I don't kown if is important to controll audio system ..... on device .. I'll verify without it.....
#2
09/29/2012 (3:44 am)
OK I found error is here :

I don't know why but error is in

//if(mInitialized)
   {
      alxEnvironmentDestroy(); <<<<===
   }


the brackets ???? I don't know ... now all work fine.... by comment out

void OpenALShutdown()
{
   alxStopAll();

   //if(mInitialized)
  // {
   //   alxEnvironmentDestroy(); 
   //}

   while(mLoopingList.size())
   {
      mLoopingList.last()->mBuffer.purge();
      delete mLoopingList.last();
      mLoopingList.pop_back();
   }

   while(mLoopingFreeList.size())
   {
      mLoopingFreeList.last()->mBuffer.purge();
      delete mLoopingFreeList.last();
      mLoopingFreeList.pop_back();
   }

   for(U32 i = 0; i < MAX_AUDIOSOURCES; i++)
      mBuffer[i] = 0;

   alDeleteSources(mNumSources, mSource);

   if (mContext)
   {
      alcDestroyContext(mContext);
      mContext = NULL;
   }
   if (mDevice)
   {
      alcCloseDevice(mDevice);
      mDevice = NULL;
   }

   OpenALDLLShutdown();
}
#3
09/29/2012 (5:27 am)
mmm there is other problem when I init openAL
I'll try to test again ...
#4
10/03/2012 (7:13 am)
i resolvd by removing Audio::OpenALInit
() and relative shutdown ... now all ok