0
0

Hello,

Sorry for my English but I’m french….

I have an external sound card with multiple audio output (* 10). I want to read two audio file at the same time but send it to two different output. Must file playback is synchronized and does not shift. The audio output recognized as the number of sound card. It’s possible or not possible with Fmod Ex?

thank you

  • You must to post comments
0
0

You would have to use 2 System objects and load the sound for each system object (or load the sound once into ram, and then use FMOD_OPENMEMORY_POINT).
You would have to synchronize them manually, maybe with Channel::setDelay, by using an offset created by comparing the 2 System::getDSPClock values.

  • You must to post comments
0
0

Should we make a synchronization while playing regularly or just starting to read. Can you give an example in a few lines please?

Thank you very much for your first answer 😀

  • You must to post comments
0
0

You should only have to sync them when you start playing.

You could get an offset or just lock both dsps and schedule the channels to start sometime in the future. On both approaches you only need to sync once per play.
Have in mind that if you start more than one system they do not share the DSPClock and that is why you have to get an offset or schedule ahead.

Some example C# code that might put you in the right direction (not tested but I’m sure this wont compile 😉 ):
[code:39n7l75i]
FMOD.System systemA = null;
Factory.System_Create(ref systemA);
FMOD.System systemB = null;
Factory.System_Create(ref systemB);

            //Initialize systems pointing to your outputs.

            //Start your channels paused.
            systemA.playSound(CHANNELINDEX.FREE, yourSoundA, true, ref channelA);
            systemB.playSound(CHANNELINDEX.FREE, yourSoundB, true, ref channelB);

            systemA.lockDSP();
            systemB.lockDSP();

            systemA.getDSPClock(ref hiA, ref lowA);
            systemB.getDSPClock(ref hiB, ref lowB);

            //Lets schedule both to start in 448000 samples from now.

            DELAYTYPE_UTILITY.FMOD_64BIT_ADD(ref hiA, ref loA, ref 0u, ref 448000u);
            DELAYTYPE_UTILITY.FMOD_64BIT_ADD(ref hiB, ref lowB, ref 0u, ref 448000u);

            channelA.setDelay(DELAYTYPE.DSPCLOCK_START, hiA, loA);
            channelB.setDelay(DELAYTYPE.DSPCLOCK_START, hiB, lowB);

            systemA.unlockDSP();
            systemB.unlockDSP();

[/code:39n7l75i]

  • You must to post comments
0
0

Merci beaucoup . Ca me permet d’avancer… 😀

  • You must to post comments
0
0

De rien. J’espère que vous résoudre votre problème.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.