How can i play a sequence (mod/xm/etc) over multiple speakers?
I have a example using version 3.4 who does play on all speakers with only basic settings. Trying the same settings with v3.7.1 it would play only in stereo. How can i have FMUSIC_PlaySong play over all available speaker in version 3.7.1?
- xmm asked 15 years ago
I’m thinking it’s because of the way DirectMusic is initialized. DirectMusic Producer is able to play sequences over my front and back EAX (stereo) channel. WinAmp is also able to play sequences like this. FMOD however, only wants to play over my front channel.
If your saying FMOD doesn’t support this; it’s no wonder i couldn’t find a way to initialize FMOD this way.
No, we don’t use this command, the song in the example i’ve posted above hasn’t got such command either. I’ve changed the music file of Caleb’s example(using dll version 3.4) with a couple of other files, i’m sure don’t have this command, and it still plays happily over both the font AND back channel.
So, this behavior of v3.4 is actually a ‘bug’? 😀
My amp has no decoder in it, it’s a simple multi channel amplifier (6 channels). ‘speaker settings’ in windows is set to ‘5.1 surround sound speakers’, ‘digital output only’ is not checked; so my soundcard is configured in a analog multi-line output mode.
soundblaster live soundcard
desktop theather 5.1 DTT2200 amplifier
Well, I think I theoretically solved this – you should replace samples of your module by samples loaded with FSOUND_HW3D | FSOUND_FORCEMONO flags in FSOUND_Sample_Load
But there is a problem – when I try to call FMUSIC_SetSample it somehow screws the sample up and it sounds really weird. I tried to solve this, but when I play the sample to be replaced, it sounds ok, and when I put it into mod using FMUSIC_SetSample, it seems that sample shortens a bit and sounds weird… Isn’t it a bug in FMOD?
Well, I tried it without FSOUND_HW3D, and still sounds weird.
Following proc loads mod in my app, in mods, there are 8bit mono samples with no looping. If this proc is wrong, please tell me where, because I really don’t know what to do to make this work 😥
Copied sample plays ok, but when I put in into module, it sounds bad…
count:=FMUSIC_GetNumSamples(module); for i:=0 to count-1 do begin oldSample:=FMUSIC_GetSample(module,i); len:=FSOUND_Sample_GetLength(oldSample); if len=0 then continue; FSOUND_Sample_GetDefaultsEx(oldSample,freq,vol,pan,pri,freq2,vol2,pan2); mode:=FSOUND_Sample_GetMode(oldSample); newSample:=FSOUND_Sample_Alloc(FSOUND_FREE,len,mode,freq,vol,pan,pri); FSOUND_Sample_Lock(newSample,0,len,newPtr1,newPtr2,newLen1,newLen2); FSOUND_Sample_Lock(oldSample,0,newLen1,oldPtr1,oldPtr2,oldLen1,oldLen2); Move(oldPtr1^,newPtr1^,newLen1); FSOUND_Sample_Unlock(oldSample,oldPtr1,oldPtr2,oldLen1,oldLen2); FSOUND_Sample_Unlock(newSample,newPtr1,newPtr2,newLen1,newLen2); FSOUND_Sample_SetDefaultsEx(newSample,freq,vol,pan,pri,freq2,vol2,pan2); FSOUND_Sample_GetLoopPoints(oldSample,freq,vol); FSOUND_Sample_SetLoopPoints(newSample,freq,vol); FMUSIC_SetSample(module,i,newSample); end; FMUSIC_SetRowCallback(module,CallBackProc,1);
no, setting loop point using FSOUND_Sample_GetLoopPoints and FSOUND_Sample_SetLoopPoints also don’t work. It seems, that it is problem with sample frequencies, because sample is there, it has the given length and looping but is about three octaves lower than it should be… I used FSOUND_Sample_GetDefaults and FSOUND_Sample_SetDefaults but it seems, sample in the mod is unaffected by this… I really don’t know what’s wrong 😕
// module is loaded, file SAMPLE.WAV is the first sample of mod and it still doesn’t work
sample:=FSOUND_Sample_Load(FSOUND_FREE,’sample.wav’,FSOUND_LOOP_OFF or FSOUND_FORCEMONO,0,0);
Please login first to submit.