0
0

Hi,

I would like to test sample code to play midi with fmod. But keep FMOD error! (67) A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback). I am sure the dls file inside project already. Please help, Thanks!

[code:10xrzp2h]
result = system->init(32, FMOD_INIT_NORMAL, NULL);
ERRCHECK(result);

/*Allocate memory for an instance of FMOD_CREATESOUNDEXINFO*/
/*This must be done to initialize the FMOD_CREATESOUNDEXINFO before midi playback*/
memset(&soundExInfo, 0, sizeof(FMOD_CREATESOUNDEXINFO));
soundExInfo.cbsize   = sizeof(FMOD_CREATESOUNDEXINFO);

/*Specify the .dls file*/
char dlsName[200] = {0};
[[NSString stringWithFormat:@"%@/gs_instruments.dls", [[NSBundle mainBundle] resourcePath]] getCString:dlsName maxLength:200 encoding:NSASCIIStringEncoding];
soundExInfo.dlsname = dlsName;
// midi one
char buffer[200] = {0};
[[NSString stringWithFormat:@"%@/p001.mid", [[NSBundle mainBundle] resourcePath]] getCString:buffer maxLength:200 encoding:NSASCIIStringEncoding];

result = system->createSound(buffer, FMOD_SOFTWARE | FMOD_CREATESTREAM, &soundExInfo, &sound);
ERRCHECK(result);

[/code:10xrzp2h]

Output
[code:10xrzp2h]
FMOD: SystemI::init : FMOD Ex Version: 00044003
FMOD: SystemI::init : maxchannels = 32, flags = 00000000, 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 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 49152. 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: SystemI::init : done

FMOD: SystemI::createSoundInternal : filename = /var/mobile/Applications/6843AF2D-1AE1-4732-9C7B-ED48B051C4AB/test.app/p001.mid : mode 000000c0
FMOD: SystemI::createSoundInternal : exinfo->cbsize = 136
FMOD: SystemI::createSoundInternal : exinfo->dlsname = /var/mobile/Applications/6843AF2D-1AE1-4732-9C7B-ED48B051C4AB/test.app/gs_instruments.dls
FMOD: SystemI::createSoundInternal : 18 codecs found. Scan all until one succeeds
FMOD: CodecTag::openInternal : attempting to open ID3 or ASF tags..
FMOD: Codec::release :
FMOD: Plugin::release : (0x29c3c8)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecFSB5::openInternal : attempting to open as FSB5..
FMOD: CodecFSB5::headerReadCheck : Header check failed. Not an FSB5
FMOD: Codec::release :
FMOD: CodecFSB5::closeInternal :
FMOD: CodecFSB5::closeInternal : done
FMOD: Plugin::release : (0x29c4e8)
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 : (0xfe847a8)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecWav::openInternal : attempting to open as WAV..
FMOD: Codec::release :
FMOD: Plugin::release : (0x29c3c8)
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 : (0x1090de08)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecAIFF::openInternal : attempting to open as AIFF..
FMOD: Codec::release :
FMOD: Plugin::release : (0xfe847a8)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecFLAC::openInternal : attempting to open as FLAC..
FMOD: Codec::release :
FMOD: Plugin::release : (0xfe847a8)
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 [@Åp]
FMOD: Codec::release :
FMOD: Plugin::release : (0x1090e408)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecS3M::openInternal : attempting to open as S3M..
FMOD: CodecS3M::openInternal : ‘SCRM’ ID check failed [kFMOD: Codec::release :
FMOD: Plugin::release : (0x10916608)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecXM::openInternal : attempting to open as XM..
FMOD: CodecXM::openInternal : ‘Extended Module: ‘ ID check failed [MThd]
FMOD: Codec::release :
FMOD: CodecXM::closeInternal : 3585
FMOD: CodecXM::closeInternal : done
FMOD: Plugin::release : (0x10135408)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecIT::openInternal : attempting to open as IT..
FMOD: CodecIT::openInternal : ‘IMPM’ etc ID check failed [MThd]
FMOD: Codec::release :
FMOD: Plugin::release : (0x64e6008)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: CodecMIDI::openInternal : attempting to open as MIDI..
FMOD: SystemI::createSoundInternal : filename = /var/mobile/Applications/6843AF2D-1AE1-4732-9C7B-ED48B051C4AB/test.app/gs_instruments.dls : mode 00000008
FMOD: SystemI::createSoundInternal : exinfo->cbsize = 136
FMOD: SystemI::createSoundInternal : exinfo->inclusionlist = 0x2fe379f0
FMOD: SystemI::createSoundInternal : exinfo->inclusionlistnum = 1
FMOD: Codec::release :
FMOD: Plugin::release : (0x10135e08)
FMOD: Plugin::release : done
FMOD: Codec::release : done
FMOD: System::createSoundInternal : Fatal error (67) scanning the codecs. (ie not FMOD_ERR_FORMAT or FMOD_ERR_FILE_EOF)
FMOD error! (67) A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback)
[/code:10xrzp2h]

  • You must to post comments
0
0

The only way to receive FMOD_ERR_PLUGIN_RESOURCE on iOS is if the path you have provided to the DLS is incorrect, i.e. file not found.

Are you super sure it’s at the location in the app bundle you think it is?

  • You must to post comments
0
0

[quote="mathew":22ezqkey]The only way to receive FMOD_ERR_PLUGIN_RESOURCE on iOS is if the path you have provided to the DLS is incorrect, i.e. file not found.

Are you super sure it’s at the location in the app bundle you think it is?[/quote:22ezqkey]

Yes, i tested rename the midi file and got can’t find midi error. So, the error should not be path not correct.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.