0
0

I’m working on integrating FMOD with a game I am creating as part of a game development class I am taking, and cannot get the FMOD.MusicSystem to work either inside of an XNA game, or inside of a simple C# console application. All I get is silence. specifically, neither
[code:1plpd7o9]MusicSystem.prepareCue(uint, ref MusicPrompt);
MusicPrompt.begin();
[/code:1plpd7o9]
nor
[code:1plpd7o9]MusicSystem.promptCue(uint);
[/code:1plpd7o9]

return errors or play music. I have tested the Designer project both with fmod_musicplayer.exe and a C++ project; both are able to play the music cue with no problems. The libraries I am using are version 4.42.04 and the version of designer I am using is 4.43.04.

Starting an event does work with no problems.

sample non-working code snipit
[code:1plpd7o9]FMOD.EventSystem eventSystem = null;
FMOD.MusicSystem musicSystem = null;
FMOD.MusicPrompt musicPrompt = null;
FMOD.RESULT result;
ERRCHECK(result = FMOD.Event_Factory.EventSystem_Create(ref eventSystem));
ERRCHECK(result = eventSystem.init(64, FMOD.INITFLAGS.NORMAL, (IntPtr)null, FMOD.EVENT_INITFLAGS.NORMAL));
ERRCHECK(result = eventSystem.setMediaPath("../../TestProject/"));//relative to bin/debug!!!!!!!
ERRCHECK(result = eventSystem.load("testproject1.fev"));
ERRCHECK(result = eventSystem.getMusicSystem(ref musicSystem));
ERRCHECK(result = musicSystem.setVolume((float)1.0));
ERRCHECK(result = musicSystem.prepareCue((uint)1, ref musicPrompt));
ERRCHECK(result = musicPrompt.begin());
Console.Read();[/code:1plpd7o9]

Any ideas?

Thanks a lot in advance!

  • You must to post comments
0
0

I seem to have solved my own problem. I don’t think I was using EventSystem.Update() in the right place and I might have been trying to play the cue before it had finished loading. either way, I have it working now.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.