Hi,
I am trying the netstream example on the iPhone. The sample works fine for streaming mp3s off the hard drive. (Eg: /test.mp3 ) however, for remote URLs, it fails.
Is this a limitation, or is there some small change required?
The URL I am using is: http://ff123.net/samples/unt.mp3
The logs are pasted after this email.
Thanks,
-Vamshi
[Session started at 2010-09-08 17:07:47 -0400.]
FMOD: SystemI::init : FMOD Ex Version: 00043201
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::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 = http://ff123.net/samples/unt.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 : (0x4d2cb50)
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 : (0x4b45160)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecWav::openInternal : attempting to open as WAV..
FMOD: Codec::release :
FMOD: Plugin::release : (0x4b45160)
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 : (0x505c610)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecAIFF::openInternal : attempting to open as AIFF..
FMOD: Codec::release :
FMOD: Plugin::release : (0x4b4bcb0)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecFLAC::openInternal : attempting to open as FLAC..
FMOD: Codec::release :
FMOD: Plugin::release : (0x4b4bcb0)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: Codec::release :
FMOD: Plugin::release : (0x505cc10)
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 : (0x5071810)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: Codec::release :
FMOD: CodecXM::closeInternal : 3586
FMOD: CodecXM::closeInternal : done
FMOD: Plugin::release : (0x505c610)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: Codec::release :
FMOD: Plugin::release : (0x5073610)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecMIDI::openInternal : attempting to open as MIDI..
FMOD: CodecMIDI::openInternal : ‘HThd’ ID check failed [\377\373\220d]
FMOD: Codec::release :
FMOD: Plugin::release : (0x5077610)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecDLS::openInternal : attempting to open as DLS..
FMOD: Codec::release :
FMOD: Plugin::release : (0x4b45160)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecAudioQueue::openInternal : attempting to open as audio queue..
FMOD: CodecAudioQueue::setupAudioFile : Cannot open audio file. (err: 1685348671)
FMOD: Codec::release :
FMOD: CodecAudioQueue::closeInternal : Cannot dispose audio queue. (err: -50)
FMOD: Plugin::release : (0x4b45160)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecMPEG::openInternal : attempting to open as MPEG..
FMOD: Codec::release :
FMOD: Plugin::release : (0x4d2cd30)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: System::createSoundInternal : Fatal error (20) scanning the codecs. (ie not FMOD_ERR_FORMAT or FMOD_ERR_FILE_EOF)
FMOD error! (20) Couldn’t perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.
- vraghu asked 8 years ago
- You must login to post comments
Can you also try the FMOD_MPEGSEARCH flag?
- Mathew Block answered 8 years ago
- You must login to post comments
Tried this also, no change. Logs remain the same.
- vraghu answered 8 years ago
- You must login to post comments
The original example also included:
FMOD_NONBLOCKING
in the createSound call. Have you tried putting it back in?
From what I can tell, the examples need to be updated to the iOS 4.1 SDK. It’s worth noting that just importing an SDK 2.0 project into the latest XCode may not be completely clean. We’ve had to re-do entire projects because of strange artifacts in the project files and interface builder files that could not be seen in the interface, but caused EXC_BAD_ACCESS errors.
- George
- CuriousG answered 8 years ago
- You must login to post comments
The problem is the AudioQueue codec isn’t really designed with net streaming in mind, it does internal seeks larger than the net stream block size.
My recommendation would be to ensure the FMOD software MPEG decoder is used for net streams instead. You can do this by using FMOD_CREATESOUNDEXINFO and setting the suggestedsoundtype member to FMOD_SOUND_TYPE_MPEG.
- Mathew Block answered 8 years ago
- You must login to post comments
Thanks much, this works to fix it!
I’m having trouble when the filename has spaces. Tried both %20 and a regular space character.
Thanks,
-Vamshi
- vraghu answered 8 years ago
- You must login to post comments
This is probably due to tags, for net streams you can’t seek, so reading the tags from MP3s can be problematic. I would recommend using the FMOD_IGNORETAGS flags in createSound.
- Mathew Block answered 8 years ago
- You must login to post comments
Hi,
Thanks for your recommendation. I am now trying it with:
[code:3pxksoxv]
result = system->createStream(buffer, FMOD_SOFTWARE | FMOD_LOOP_NORMAL | FMOD_IGNORETAGS, NULL, &sound);
ERRCHECK(result);
[/code:3pxksoxv]
Still get the same results. Logs attaached below (on simulator).
Thanks,
-Vamshi
[Session started at 2010-09-12 16:01:01 -0400.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1469) (Wed May 5 04:36:56 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 432.
FMOD: SystemI::init : FMOD Ex Version: 00043201
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::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 = http://ff123.net/samples/unt.mp3 : mode 020000c2
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 : (0x9f050e0)
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 : (0x9f050e0)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecWav::openInternal : attempting to open as WAV..
FMOD: Codec::release :
FMOD: Plugin::release : (0x4b71930)
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 : (0x50db210)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecAIFF::openInternal : attempting to open as AIFF..
FMOD: Codec::release :
FMOD: Plugin::release : (0x4b71930)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecFLAC::openInternal : attempting to open as FLAC..
FMOD: Codec::release :
FMOD: Plugin::release : (0x4b71930)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: Codec::release :
FMOD: Plugin::release : (0x50db810)
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 : (0x50dc810)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: Codec::release :
FMOD: CodecXM::closeInternal : 3586
FMOD: CodecXM::closeInternal : done
FMOD: Plugin::release : (0x507a810)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: Codec::release :
FMOD: Plugin::release : (0x50de610)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecMIDI::openInternal : attempting to open as MIDI..
FMOD: CodecMIDI::openInternal : ‘HThd’ ID check failed [\377\373\220d]
FMOD: Codec::release :
FMOD: Plugin::release : (0x50db210)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecDLS::openInternal : attempting to open as DLS..
FMOD: Codec::release :
FMOD: Plugin::release : (0x4b71930)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecAudioQueue::openInternal : attempting to open as audio queue..
FMOD: CodecAudioQueue::setupAudioFile : Cannot open audio file. (err: 1685348671)
FMOD: Codec::release :
FMOD: CodecAudioQueue::closeInternal : Cannot dispose audio queue. (err: -50)
FMOD: Plugin::release : (0x4b71ab0)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecMPEG::openInternal : attempting to open as MPEG..
FMOD: Codec::release :
FMOD: Plugin::release : (0x9f05200)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: System::createSoundInternal : Fatal error (20) scanning the codecs. (ie not FMOD_ERR_FORMAT or FMOD_ERR_FILE_EOF)
FMOD error! (20) Couldn’t perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.
Debugger stopped.
Program exited with status value:255.(gdb)
- vraghu answered 8 years ago
- You must login to post comments
Please login first to submit.