0
0

Hey folks,

I’m integrating fmod into our iOS engine. I noticed that the feature set claims that streaming works in both the regular and reduced versions of the static libraries shipped with the iphone build. However, when I use the reduced version, fmod crashes and/or hangs forever on update() – almost always at the following:

[b:19446mbj]0x0febee38 in SpectralData::Deserialize(BitstreamReader&, ICSInfo const&, SectionData const&, ScaleFactorData const&, SFBOffsets const&, std::valarray<float>&) ()[/b:19446mbj]

Unfortunately I can’t examine the stack in gdb because the binaries are private. Here’s how I call createStream:

[b:19446mbj]system->createStream( filename.c_str(), FMOD_DEFAULT, 0, &sound );
system->playSound( FMOD_CHANNEL_FREE, sound, false, 0 );[/b:19446mbj]

Switching to the full binary instead of the reduced one fixes this issue, but I’d rather use the smaller reduced binary if possible. Any ideas? We’re linking to CoreAudio and AudioToolbox as required. The file type is mp3. Here’s the log output:

[b:19446mbj]FMOD: OutputCoreAudio::init : Done.
FMOD: SystemI::init : Set up software engine
FMOD: Thread::initThread : Initializing FMOD mixer thread. priority 1
FMOD: Thread::initThread : – Stacksize 16384. 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 16384. Stack pointer 0x0 : usesemaphore = 0 : sleeptime = 10
FMOD: Thread::callback : * FMOD stream thread started
FMOD: Thread::initThread : done.
FMOD: SystemI::init : done

luaL_loadfile: lua://engine.lua
luaL_loadfile: lua://common/class.lua
device: iphone
luaL_loadfile: lua://platform/iphone/constants.lua
luaL_loadfile: lua://chunks.lua
luaL_loadfile: lua://common/pool.lua
luaL_loadfile: lua://common/util.lua
luaL_loadfile: lua://common/meshes.lua
luaL_loadfile: lua://common/textures.lua
luaL_loadfile: lua://common/sounds.lua
luaL_loadfile: lua://assets.lua
luaL_loadfile: lua://menu/main/mainmenuwindow.lua
luaL_loadfile: lua://menu/main/mainmenu.lua
luaL_loadfile: lua://games/maingamewindow.lua
luaL_loadfile: lua://games/maingame.lua
LuaMainMenuGame:created
Resources::load – ‘texture://menu/main/background.png’
Resources::load – ‘texture://menu/main/start_button_bg.png’
FMOD: SystemI::createSoundInternal : filename = /Users/it3ration/Library/Application Support/iPhone Simulator/5.0/Applications/194A3F29-ABE0-47E2-A395-BDBF9BD277EC/LuaGameEngine.app/regular.archondb/music/intro.m4a : mode 00000080
FMOD: SystemI::createSoundInternal : 5 codecs found. Scan all until one succeeds
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 : (0x9c2ab28)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecWav::openInternal : attempting to open as WAV..
FMOD: Codec::release :
FMOD: Plugin::release : (0x9c2ab28)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecIT::openInternal : attempting to open as IT..
FMOD: CodecIT::openInternal : ‘IMPM’ etc ID check failed [FMOD: Codec::release :
FMOD: Plugin::release : (0xa8d7608)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecAudioQueue::openInternal : attempting to open as audio queue..
FMOD: CodecAudioQueue::setupAudioFile : format identified as: ‘aac ‘
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 2016939
FMOD: SystemI::createSample : subsamples = 1, channels = 2
FMOD: SystemI::createSample : subsample 0. output = 0x9c1c4a8
FMOD: SystemI::createSample : mSoftware = 0x9c1c4a8
FMOD: OutputSoftware::createSample : lengthpcm 16384, lengthbytes 2016939, 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.[/b:19446mbj]

Best,

Kevin

  • You must to post comments
0
0

I inspected the audio format of the mp3 file we were using and it turned out to be the following format:

[b:cdfr2yqo][faad] AAC (MPEG2/4 Advanced Audio Coding)[/b:cdfr2yqo]

Isn’t AAC supported in the reduced binary? When using ffmpeg to convert it to an mp3 it plays using the reduced binary.

Thanks in advance! :)

Kevin

  • You must to post comments
0
0

FMOD supports the playback of AAC in an MP4 container through the native AudioQueue API, this is available in both normal and reduced versions. As you can see by the log file it correctly identifies and opens it as an AAC file during System::createSound.

I have quickly tested playback of a similar file and it’s working here in both normal and reduced versions. Would it be possible for you to send us your AAC file that is causing problems? Also are you using the latest version of FMOD for iPhone?

  • You must to post comments
0
0

I should clarify a bit – fmod only crashes/hangs on streaming, but if the file is loaded fully into memory and played, it works fine. What email address can I use to send you the file?

Thanks for the response! :)

Best,

Kevin

  • You must to post comments
0
0

Please send the file to support@fmod.org, I’ll access it from there.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.