0
0

With iOS 4 and FMOD, audio playback works fine in the background during a multitasking session until another app interrupts the audio. When my app returns to the foreground, the audio session is no longer valid and no sound is generated. Although, FMOD continues to function as if it had a valid audio session.

I don’t see any callbacks inside FMOD to inform me when the audio session has been interrupted so I know to reinitialize the next time I become active. I do see a system callback for when system audio devices have changed. Is this the callback I’m looking for? Am I missing something or do I have to do this through the iOS apis? If so, is there a way for me to get the audio session handle from FMOD?

I appreciate any help you can provide on this.

Thanks,
Tim

  • You must to post comments
0
0

And ..

Add Log on Phone call interruption

FMOD: OutputCoreAudio::handleInterruption : Audio has been interrupted by an external event… stopping output.
FMOD: Thread::callback : * FMOD mixer thread finished
FMOD: Thread::close : FMOD mixer thread thread destroyed
Current language: auto; currently objective-c
(gdb) continue
FMOD: EventI::stopInternal : 0x60760f8 1
> *Network Disconnected
FMOD: OutputCoreAudio::handleInterruption : External audio interruption has been resolved… restarting output.
FMOD: Thread::initThread : Initializing FMOD mixer thread. priority 1
FMOD: Thread::initThread : – Stacksize 0. Stack pointer 0x0 : usesemaphore = 1 : sleeptime = 0
FMOD: Thread::callback : * FMOD mixer thread started
FMOD: Thread::initThread : done.
FMOD: OutputCoreAudio::start : Cannot activate audio session. (err: 560161140)
FMOD: EventI::stopInternal : 0x60760f8 1
FMOD: EventGroupI::loadEventDataInternal : m_flags: 00000000
FMOD: EventI::start : 0x60760f8
FMOD: SoundI::getSubSound : sound 0x608cfe0. Subsound index 5 / 14
FMOD: CodecFSB::setPositionInternal : subsound 5 position 0 postype 2
FMOD: CodecFSB::setPositionInternal : done

  • You must to post comments
0
0

Matthew, in some case the FMOD_IPhone_RestoreAudioSession does not work in applicationWillEnterForeground

for example, if I press the home button, and if I start the game "topple 1" (a NON multitasking game), and then if I switch back to my game, it hangs for 3 seconds and I have no more sounds. here is the log:

FMOD: OutputCoreAudio::restoreAudioSession : Restoring audio session.
FMOD: Thread::callback : * FMOD mixer thread finished
FMOD: Thread::close : FMOD mixer thread thread destroyed
2010-12-18 22:39:56.424 Perfect Cell[4339:307] 22:39:56.423 <0x3e088868> Stop posting message to kill mediaserverd (4300)
FMOD: OutputCoreAudio::setupAudioUnit : Cannot initialize audio device. (err: 268435459)

I tried to add AudioSessionSetActive (false) in applicationDidEnterBackground. I know it is not recommended, in some cases it is better (it can restore the audio session when it comes back in foreground), but in some cases it crashes.

I am using FMOD 4.32.06, with the SDK 4.2 and I cannot get it to work in 100% of the case, there is always an interruption case where I lose the sounds, or the mp3, or the app simply crash. Also I cannot find a single game on the App Store that always works with multitasking and sounds… it seems that Apple did something wrong.

edit: I saw the other post about v4.33.07. we really need it here, it may fix the bug. Please release it asap :)

  • You must to post comments
0
0

The implementation of CoreAudio that is in the development branch is considerably different from the implementation in the stable branch so it is currently not possible to move that change to the stable branch.

At this time I would recommend using the development branch or waiting for the currently development branch to become stable (which should be within the next week or two).

  • You must to post comments
0
0

Just posting to join the conversation. I am having the same issue, and in my application it is non-trivial to reinitialize the entire sound system, so I am hoping we can come up with a better solution.

Thanks,
Luke

  • You must to post comments
0
0

Firstly thank you for your input, I understand it isn’t desirable to have another function and behavior you need to maintain for only one platform. I will see if I can remove the requirement for a future release making internal use of the notification center.

As for the issue with hardware MP3s, this is already fixed in the next version of FMOD, it just hasn’t been released yet. It should be out this week.

  • You must to post comments
0
0

That is quite strange, I have tested here using the same FMOD version, same phone, same OS version using the playstream example and I cannot reproduce the issues you are having.

Have you tried testing on another device?

  • You must to post comments
0
0

Yeah there are many niche cases where the OS fails to report interruptions correctly and falls over. The latest fix catches a few different notifications from the OS in hopes to try and recover as best as possible. I believe we are planning to release either today or tomorrow so I’m looking forward to seeing if the new fixes solve your issue.

  • You must to post comments
0
0

I still have issues with iOS4 on iPhone 4. (I tried with 4.31.04, 4.31.05 before)

What I did:

  • I downloaded the last stable version (4.32.00).
  • I build and start the example "playstream" on the iPhone 4 (OS 4.0).
  • I hear the music, then I click the home button to "quit"
  • I click on the icon to bring playstream in foreground
  • I hear a little glitch (coming from the music), and then no more sound!
  • I wait a few seconds, sound came back when a loop is completed

The same happen in my game. The only difference is that "playstream" use software decoder, and I want to use hardware decoder, but none worked

I tried to use FMOD_Iphone_RestoreAudioSession() in ApplicationWillEnterForeground with no success. Any help is welcome

  • You must to post comments
0
0

Audio playback should be automagically reinitialized by FMOD after an interruption occurs. That being said, we have not tested with iOS 4.0 yet as I have been on leave.

I will be addressing this issue this week, and will report back when I have a solution.

  • You must to post comments
0
0

Is a long time.
In Northern Hemisphere, Raining is calling autumn. :)

I tried test New iphone FMOD SDK. (v4.32 and v 4.33)
I’m Sorry, I found error.

Error is that I can not hear sound after phone call.
but This error is not made by calling sound interruption.

I copy FMOD debug message to following.
1) I can hear Sound : calling Sound Interruption. -> application is resumed
FMOD: OutputCoreAudio::handleInterruption : Audio has been interrupted by an external event… stopping output.
FMOD: Thread::callback : * FMOD mixer thread finished
FMOD: Thread::close : FMOD mixer thread thread destroyed
FMOD: EventI::stopInternal : 0x8ae810 1
FMOD: OutputCoreAudio::handleInterruption : External audio interruption has been resolved… restarting output.
FMOD: OutputCoreAudio::setupAudioSession : Cannot activate audio session. Waiting 1s then retrying…
FMOD: Thread::initThread : Initializing FMOD mixer thread. priority 1
FMOD: Thread::initThread : – Stacksize 32768. Stack pointer 0x0 : usesemaphore = 1 : sleeptime = 0
FMOD: Thread::callback : * FMOD mixer thread started
FMOD: Thread::initThread : done.
FMOD: EventI::stopInternal : 0x8ae810 1
FMOD: EventGroupI::loadEventDataInternal : m_flags: 00000000
FMOD: EventI::start : 0x8ae810
FMOD: SoundI::getSubSound : sound 0x664640. Subsound index 7 / 8
FMOD: SoundI::getSubSound : sound 0x664640. Subsound index 7 / 8
FMOD: CodecFSB::setPositionInternal : subsound 7 position 0 postype 2
FMOD: CodecFSB::setPositionInternal : done

2) I can not hear sound : After phone call -> application is resumed
FMOD: OutputCoreAudio::handleInterruption : Audio has been interrupted by an external event… stopping output.
FMOD: Thread::callback : * FMOD mixer thread finished
FMOD: Thread::close : FMOD mixer thread thread destroyed
FMOD: EventI::stopInternal : 0x8ae810 1
FMOD: OutputCoreAudio::handleRouteChange : Audio route has change from ‘Speaker’ to ‘Speaker’ (Reason 3).
FMOD: EventI::stopInternal : 0x8ae810 1
FMOD: EventGroupI::loadEventDataInternal : m_flags: 00000000
FMOD: EventI::start : 0x8ae810
FMOD: SoundI::getSubSound : sound 0x664640. Subsound index 7 / 8
FMOD: SoundI::getSubSound : sound 0x664640. Subsound index 7 / 8
FMOD: CodecFSB::setPositionInternal : subsound 7 position 0 postype 2
FMOD: CodecFSB::setPositionInternal : done

Could you help me for this error situation?

  • You must to post comments
0
0

I retry it On 1/07/10 4.30.05 – Stable branch update
So downgrade FMOD SDK…

Then Critical error situation is removed 😀

but After Phone Call an reject ..
No Sound output

then.. I copy Log …

FMOD: OutputCoreAudio::handleInterruption : Audio has been interrupted by an external event… stopping output.
FMOD: Thread::callback : * FMOD mixer thread finished
FMOD: Thread::close : FMOD mixer thread thread destroyed
FMOD: OutputCoreAudio::handleInterruption : External audio interruption has been resolved… restarting output.
FMOD: Thread::initThread : Initializing FMOD mixer thread. priority 1
FMOD: Thread::initThread : – Stacksize 0. Stack pointer 0x0 : usesemaphore = 1 : sleeptime = 0
FMOD: Thread::callback : * FMOD mixer thread started
FMOD: Thread::initThread : done.
FMOD: OutputCoreAudio::start : Cannot activate audio session. (err: 560161140)

.

  • You must to post comments
0
0

Looking forward to that; I’m another one where calling FMOD_IPhone_RestoreAudioSession from applicationWillEnterForeground does squat. Calling it from applicationDidBecomeActive hasn’t failed yet, though I understand I shouldn’t be doing that. :) Looking forward to an official fix because this has been dogging me a while …

  • You must to post comments
0
0

Can you post the TTY output from the playstream example?

  • You must to post comments
0
0

When accepting a phone call the application is backgrounded, so when the call is complete the application isn’t notified. To solve this new issues with iOS 4.0 I have added the function FMOD_IPhone_RestoreAudioSession() which should be called from applicationWillEnterForeground to ensure FMOD is alive and well when the app starts up again.

This new function will be available in our next release.

  • You must to post comments
0
0

I find new FMOD SDK v4.32.01

and go to test.

but I find same situation defore.

follow text is from debug console>

1) No Error : suspend/resume by homekey press
[i:3w5afyas]FMOD: EventI::stopInternal : 0x606b750 1
FMOD: EventI::stopInternal : 0x606b750 1
FMOD: EventGroupI::loadEventDataInternal : m_flags: 00000000
FMOD: EventI::start : 0x606b750
FMOD: SoundI::getSubSound : sound 0x6083380. Subsound index 13 / 14
FMOD: SoundI::getSubSound : sound 0x6083380. Subsound index 13 / 14
FMOD: CodecFSB::setPositionInternal : subsound 13 position 0 postype 2
FMOD: CodecFSB::setPositionInternal : done
FMOD: EventGroupI::freeEventDataInternal : eventgroup [SE] 0x440001
FMOD: EventI::release : [Hit_Wall]
FMOD: EventI::stopInternal : 0x606b380 1
FMOD: EventI::release : done
FMOD: SoundI::release : Hit_Wall.wav (0x607fd68)
FMOD: SoundI::release : free this. (0x607fd68)
FMOD: SoundI::release : done (0x607fd68)
FMOD: SoundI::release : Probaseball_bank01.fsb (0x607fae8)
FMOD: SoundI::release : release codec. (0x607fae8)
FMOD: Codec::release :
FMOD: CodecFSB::closeInternal :
FMOD: Codec::release :
FMOD: Plugin::release : (0x606d7c8)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecFSB::closeInternal : done
FMOD: Plugin::release : (0x606c038)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: SoundI::release : free this. (0x607fae8)
FMOD: SoundI::release : done (0x607fae8)
FMOD: EventGroupI::freeEventDataInternal : done
FMOD: EventI::stopInternal : 0x606b380 1
FMOD: EventGroupI::loadEventDataInternal : m_flags: 00000000
FMOD: SystemI::createSoundInternal : filename = /var/mobile/Applications/041B5F33-494D-453F-9B78-00BF1D2774FB/Template.app/Probaseball_bank01.fsb : mode 00000202
FMOD: SystemI::createSoundInternal : exinfo->cbsize = 124
FMOD: SystemI::createSoundInternal : exinfo->inclusionlist = 0x2fffd29c
FMOD: SystemI::createSoundInternal : exinfo->inclusionlistnum = 1
FMOD: SystemI::createSoundInternal : exinfo->suggestedsoundtype = 8
FMOD: SystemI::createSoundInternal : 17 codecs found. Scan all until one succeeds
FMOD: CodecFSB::openInternal : attempting to open as FSB..
FMOD: CodecFSB::openInternal : found FSB4
FMOD: CodecFSB::openInternal : FSB contains 51 sounds
FMOD: CodecFSB::openInternal : done.
FMOD: SystemI::createSoundInternal : Format has 51 subsounds.
FMOD: SystemI::createSoundInternal : Create as FMOD_CREATESAMPLE
FMOD: SystemI::createSoundInternal : Multi-sample sound (51 subsounds), create a sample container.
FMOD: SystemI::createSoundInternal : creating subsound 2/51
FMOD: SystemI::createSample : mode 00000202 length 20672 samples, lengthbytes 11648
FMOD: SystemI::createSample : subsamples = 1, channels = 1
FMOD: SystemI::createSample : subsample 0. output = 0x6014708
FMOD: SystemI::createSample : mSoftware = 0x6014708
FMOD: OutputSoftware::createSample : lengthpcm 20672, lengthbytes 11648, channels 1, format 7, mode 0000024a
FMOD: OutputSoftware::createSample : done
FMOD: SystemI::createSample : done
FMOD: CodecFSB::setPositionInternal : subsound 2 position 0 postype 8
FMOD: CodecFSB::setPositionInternal : done
FMOD: SystemI::createSoundInternal : No name found in file, use filename.
FMOD: SystemI::createSoundInternal : done. OpenState now = FMOD_OPENSTATE_READY.
[/i:3w5afyas]

2) Error : I do not hear sound after phone call
[i:3w5afyas]FMOD: CodecFSB::setPositionInternal : subsound 13 position 0 postype 2
FMOD: CodecFSB::setPositionInternal : done
FMOD: OutputCoreAudio::handleInterruption : Audio has been interrupted by an external event… stopping output.
FMOD: Thread::callback : * FMOD mixer thread finished
FMOD: Thread::close : FMOD mixer thread thread destroyed
FMOD: EventGroupI::freeEventDataInternal : eventgroup [SE] 0x440001
FMOD: EventI::release : [Hit_Wall]
FMOD: EventI::stopInternal : 0x606b380 1
FMOD: EventI::release : done
FMOD: SoundI::release : Hit_Wall.wav (0x606d488)
FMOD: SoundI::release : free this. (0x606d488)
FMOD: SoundI::release : done (0x606d488)
FMOD: SoundI::release : Probaseball_bank01.fsb (0x606d208)
FMOD: SoundI::release : release codec. (0x606d208)
FMOD: Codec::release :
FMOD: CodecFSB::closeInternal :
FMOD: Codec::release :
FMOD: Plugin::release : (0x606cd80)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecFSB::closeInternal : done
FMOD: Plugin::release : (0x606cab0)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: SoundI::release : free this. (0x606d208)
FMOD: SoundI::release : done (0x606d208)
FMOD: EventGroupI::freeEventDataInternal : done
FMOD: OutputCoreAudio::handleRouteChange : Audio route has change from ‘Speaker’ to ‘Speaker’ (Reason 3).
FMOD: EventI::stopInternal : 0x606b380 1
FMOD: EventGroupI::loadEventDataInternal : m_flags: 00000000
FMOD: SystemI::createSoundInternal : filename = /var/mobile/Applications/041B5F33-494D-453F-9B78-00BF1D2774FB/Template.app/Probaseball_bank01.fsb : mode 00000202
FMOD: SystemI::createSoundInternal : exinfo->cbsize = 124
FMOD: SystemI::createSoundInternal : exinfo->inclusionlist = 0x2fffd29c
FMOD: SystemI::createSoundInternal : exinfo->inclusionlistnum = 1
FMOD: SystemI::createSoundInternal : exinfo->suggestedsoundtype = 8
FMOD: SystemI::createSoundInternal : 17 codecs found. Scan all until one succeeds
FMOD: CodecFSB::openInternal : attempting to open as FSB..
FMOD: CodecFSB::openInternal : found FSB4
FMOD: CodecFSB::openInternal : FSB contains 51 sounds
FMOD: CodecFSB::openInternal : done.
FMOD: SystemI::createSoundInternal : Format has 51 subsounds.
FMOD: SystemI::createSoundInternal : Create as FMOD_CREATESAMPLE
FMOD: SystemI::createSoundInternal : Multi-sample sound (51 subsounds), create a sample container.
FMOD: SystemI::createSoundInternal : creating subsound 2/51
FMOD: SystemI::createSample : mode 00000202 length 20672 samples, lengthbytes 11648
FMOD: SystemI::createSample : subsamples = 1, channels = 1
FMOD: SystemI::createSample : subsample 0. output = 0x6014708
FMOD: SystemI::createSample : mSoftware = 0x6014708
FMOD: OutputSoftware::createSample : lengthpcm 20672, lengthbytes 11648, channels 1, format 7, mode 0000024a
FMOD: OutputSoftware::createSample : done
FMOD: SystemI::createSample : done
FMOD: CodecFSB::setPositionInternal : subsound 2 position 0 postype 8
FMOD: CodecFSB::setPositionInternal : done
FMOD: SystemI::createSoundInternal : No name found in file, use filename.
FMOD: SystemI::createSoundInternal : done. OpenState now = FMOD_OPENSTATE_READY.[/i:3w5afyas]

  • You must to post comments
0
0

And Test on alram trigger
I can hear Sound.

FMOD: OutputCoreAudio::handleInterruption : Audio has been interrupted by an external event… stopping output.
FMOD: Thread::callback : * FMOD mixer thread finished
FMOD: Thread::close : FMOD mixer thread thread destroyed
FMOD: OutputCoreAudio::handleInterruption : External audio interruption has been resolved… restarting output.
FMOD: Thread::initThread : Initializing FMOD mixer thread. priority 1
FMOD: Thread::initThread : – Stacksize 0. Stack pointer 0x0 : usesemaphore = 1 : sleeptime = 0
FMOD: Thread::callback : * FMOD mixer thread started
FMOD: Thread::initThread : done.
FMOD: OutputCoreAudio::start : Hardware buffer size: 1024 samples, hardware sample rate: 24000Hz.

  • You must to post comments
0
0

I wish it will fix all issues too. don’t worry if it does not come before Xmas, we can wait, and happy hollidays Mathew.

  • You must to post comments
0
0

[quote="mathew":uar4d3kv]Can you post the TTY output from the playstream example?[/quote:uar4d3kv]

of course, but there is no error or anything, I let you appreciate:

FMOD: SystemI::init : FMOD Ex Version: 00043200
FMOD: SystemI::init : maxchannels = 32, flags = 00000020, extradriverdata = 0x0
FMOD: SystemI::close :
FMOD: SystemI::close : Stop all sounds
FMOD: SystemI::close : Remove miscllaneous DSP stuff.
FMOD: SystemI::close : done.

FMOD: OutputCoreAudio::init : Initializing…
FMOD: OutputCoreAudio::prepareAudioSession : Setting override to force output through main speaker while recording.
FMOD: OutputCoreAudio::prepareAudioSession : Setting override to force mixing when usually not permitted.
FMOD: OutputCoreAudio::init : Maximum hardware read size: 4096 samples, Software buffer size: 1024 samples, Number of software buffers: 4.
FMOD: OutputCoreAudio::init : Hardware buffer size: 1024 samples, hardware sample rate: 24000Hz.
FMOD: OutputCoreAudio::init : Done.
FMOD: SystemI::init : Set up software engine
FMOD: Thread::initThread : Initializing FMOD mixer thread. priority 1
FMOD: Thread::initThread : – Stacksize 32768. Stack pointer 0x0 : usesemaphore = 1 : sleeptime = 0
FMOD: Thread::callback : * FMOD mixer thread started
FMOD: Thread::initThread : done.
FMOD: SystemI::init : Set up emulated output
FMOD: SystemI::init : create the channel pool
FMOD: SystemI::init : Set up streamer
FMOD: Thread::initThread : Initializing FMOD stream thread. priority 2
FMOD: Thread::initThread : – Stacksize 49152. Stack pointer 0x0 : usesemaphore = 0 : sleeptime = 10
FMOD: Thread::callback : * FMOD stream thread started
FMOD: Thread::initThread : done.
FMOD: Profile::init : Profiler listening on port: 9264
FMOD: SystemI::init : done

FMOD: SystemI::createSoundInternal : filename = /var/mobile/Applications/4317C1E1-CCAE-4922-8F11-BAC20D11C555/playstream.app/wave.mp3 : mode 000000c2
FMOD: SystemI::createSoundInternal : 17 codecs found. Scan all until one succeeds
FMOD: CodecTag::openInternal : attempting to open ID3 or ASF tags..
FMOD: Codec::release :
FMOD: Plugin::release : (0x2428b0)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecFSB::openInternal : attempting to open as FSB..
FMOD: CodecFSB::openInternal : Header check failed. Not an FSB
FMOD: Codec::release :
FMOD: CodecFSB::closeInternal :
FMOD: CodecFSB::closeInternal : done
FMOD: Plugin::release : (0x242b00)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecWav::openInternal : attempting to open as WAV..
FMOD: Codec::release :
FMOD: Plugin::release : (0x242b00)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecOggVorbis::openInternal : attempting to open as OGG..
FMOD: CodecOggVorbis::openInternal : failed to open as ogg
FMOD: Codec::release :
FMOD: Plugin::release : (0x838a10)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecAIFF::openInternal : attempting to open as AIFF..
FMOD: Codec::release :
FMOD: Plugin::release : (0x2428b0)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecFLAC::openInternal : attempting to open as FLAC..
FMOD: Codec::release :
FMOD: Plugin::release : (0x242b00)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecMOD::openInternal : attempting to open as MOD..
FMOD: CodecMOD::openInternal : ‘M.K.’ etc ID check failed [RE]
FMOD: Codec::release :
FMOD: Plugin::release : (0x839010)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecS3M::openInternal : attempting to open as S3M..
FMOD: CodecS3M::openInternal : ‘SCRM’ ID check failed [FMOD: Codec::release :
FMOD: Plugin::release : (0x83a010)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecXM::openInternal : attempting to open as XM..
FMOD: CodecXM::openInternal : ‘Extended Module: ‘ ID check failed [pP]
FMOD: Codec::release :
FMOD: CodecXM::closeInternal : 3586
FMOD: CodecXM::closeInternal : done
FMOD: Plugin::release : (0x838a10)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecIT::openInternal : attempting to open as IT..
FMOD: CodecIT::openInternal : ‘IMPM’ etc ID check failed [pP]
FMOD: Codec::release :
FMOD: Plugin::release : (0x657e010)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecMIDI::openInternal : attempting to open as MIDI..
FMOD: CodecMIDI::openInternal : ‘HThd’ ID check failed [pP]
FMOD: Codec::release :
FMOD: Plugin::release : (0x83be10)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecDLS::openInternal : attempting to open as DLS..
FMOD: Codec::release :
FMOD: Plugin::release : (0x242b00)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecAudioQueue::openInternal : attempting to open as audio queue..
FMOD: CodecAudioQueue::setupAudioFile : format identified as: ‘.mp3’
FMOD: SystemI::createSoundInternal : Format has 0 subsounds.
FMOD: SystemI::createSoundInternal : Create as FMOD_CREATESTREAM
FMOD: System::createSoundInternal : decode buffersize = 16384 : blocksize = 4096 : format = 2
FMOD: SystemI::createSample : mode 000000c2 length 16384 samples, lengthbytes 138368
FMOD: SystemI::createSample : subsamples = 1, channels = 2
FMOD: SystemI::createSample : subsample 0. output = 0x2415d0
FMOD: SystemI::createSample : mSoftware = 0x2415d0
FMOD: OutputSoftware::createSample : lengthpcm 16384, lengthbytes 138368, channels 2, format 2, mode 000000ca
FMOD: OutputSoftware::createSample : done
FMOD: SystemI::createSample : done
FMOD: System::createSoundInternal : Seek stream to start
FMOD: System::createSoundInternal : flush stream buffer
FMOD: System::createSoundInternal : flush successful.
FMOD: System::createSoundInternal : switch file handle from small blocking single buffered to large nonblocking doublebuffered.
FMOD: Thread::initThread : Initializing FMOD file thread. priority 1
FMOD: Thread::initThread : – Stacksize 8192. Stack pointer 0x0 : usesemaphore = 0 : sleeptime = 10
FMOD: Thread::callback : * FMOD file thread started
FMOD: Thread::initThread : done.
FMOD: SystemI::createSoundInternal : No name found in file, use filename.
FMOD: SystemI::createSoundInternal : done. OpenState now = FMOD_OPENSTATE_READY.

At this point the stream is playing, everything is fine. now I press the home button and I click on "playstream" icon again. There is nothing in the console.

If I do the same with this in the code:

-(void) applicationWillEnterForeground:(UIApplication *)application
{
FMOD_IPhone_RestoreAudioSession();
}

there will be this in the console when the app will go in foreground:

FMOD: OutputCoreAudio::restoreAudioSession : Restoring audio session.

but in both case, there is no sound. I have to wait the end of the loop to hear the sound again. what means that the audio session still work, but the stream is not recovered.

Moreover, it does exactly the same if I lock the iPhone and unlock it -> no sound until the end of the loop.

  • You must to post comments
0
0

First, as part of the function of the problem will be added so happy.
Takes issue with the original call is restored when the application went to the backgound sound problems, but….

I can make that
This problem has been fixed as follows. yesterday
//————————————————-
– (Void) applicationDidEnterBackground: (UIApplication *) application
(

DreamKnight_RealeaseSoundSystem (); / / FMOD Sound System relase
AudioSessionSetActive (false);

)

  • (Void) applicationWillEnterForeground: (UIApplication *) application
    (

    AudioSessionSetActive (false);
    DreamKnight_InitializeSoundSystem (true); / / FMOD Sound System initialize

    )
    //————————-

Unfortunately, if the phone call that denial, but the sound is not output yet.
this situation make that application do not go background state.
Please look at this part.

and iPhone Game bejeweled 2 solve thease problems..
I want to know how to have resolved.

  • You must to post comments
0
0

Thanks Mathew!

multitasking resume now works, but not resume from sleep/suspend :(

I’ve tried calling FMOD_IPhone_RestoreAudioSession from applicationDidBecomeActive but no luck.

  • You must to post comments
Showing 1 - 20 of 48 results
Your Answer

Please first to submit.