Hello, this is my first post..!
I want to make a kind og music tracker using FMOD Ex, so my question is how to play sequences of samples precisely? For example, how do I play one sample at one moment and then play two other samples exactly one second after and at the same time (I would like an example in C#).
- Noufardn asked 12 years ago
[quote:8n9t8zcx]The delay you’re talkin about (the delay causing the stereo effect like the one achieved with the Offset command in FT2) can happen in FMOD ? [/quote:8n9t8zcx]
If you make two calls to playsound I think you can be unlucky that they are put into different buffers..
[quote:8n9t8zcx]Some sample code on what you’ve managed doing would be a cool thing.[/quote:8n9t8zcx]
Don’t know if you’re a PureBasic user..? (see http://www.purebasic.com) this is the very simple code:
[code:8n9t8zcx]#FMOD_INIT_NORMAL = $00000000
FMOD_HARDWARE = $00000020
FMOD_LOOP_OFF = $00000001
FMOD_CHANNEL_FREE = -1
Procedure DSPCallback(a, b, c, d, e, f)
CallFunction(0, "FMOD_System_Init", system, 32, #FMOD_INIT_NORMAL, 0)
description\read_ = @DSPCallback()
CallFunction(0, "FMOD_System_CreateDSP", system, description, @dsp)
CallFunction(0, "FMOD_System_AddDSP", system, dsp)
CallFunction(0, "FMOD_DSP_Remove", dsp)
CallFunction(0, "FMOD_Sound_Release", sound)
CallFunction(0, "FMOD_System_Close", system)
CallFunction(0, "FMOD_System_Release", system)
[quote:3ekxgc47]So the mixer has to write its sound in the next free available block. [/quote:3ekxgc47]
Then I don’t understand why my first sample code doesn’t sound right – in that code PlaySound is called from a DSP playback that is called once for each block – so every time I call PlaySound the sound should be put exactly at the start of the following block? it does not sound like that..
Please login first to submit.