Excuse me in advance, but my post will be quite vague as I’m not 100% familiar with the concepts that I’m using:
I have a class that converts a file from .wav to .mp4 . I have tested that class BEFORE initializing FMOD and it works perfectly. However, if I use it after initializing FMOD, my class fails as it cannot initialize the audio session.
That error happens even if I deallocate FMOD. I thought that FMOD would create a session and delete it when being deallocated
Do you have any idea of how to proceed?
- Fumarmata asked 7 years ago
Firstly you should note that the Audio Session can only be initialized once for an iOS application, and cannot be un-initialized. If you are using FMOD then it is essential you do not call any Audio Session API functions, especially AudioSessionInitialize as FMOD does this internally.
To proceed simply remove the AudioSessionInitialize call and init FMOD before you start.
Thanks, now I understand.
The reason why my other class was failing is because it was trying to create another audio session, whilst there was already one (and failing because as you said, there can only be one audio session). Removing the creation of the new audio session in the other class made it.
- Fumarmata answered 7 years ago
Please login first to submit.