AudioSessionInitialize with another interruption listener

479 views Asked by At

I initialize audio session AudioSessionInitialize(NULL, NULL, rioInterruptionListener, self) with rioInterruptionListener. And I want to change interruption listener.

If I use AudioSessionInitialize(NULL, NULL, anotherInteruptionListener, self), it returns error. So, I think, I need to destruct audio session. And then initialize it again.

But how to implement this? How can I set another interruption listener or deinitiolize audio session?

1

There are 1 answers

0
hotpaw2 On

You could simply put a conditional statement in your first interrupt listener to call the second interrupt listener when you want to change handlers.