0
0

New question :

What do I have to do to have a clean release of all objects ?
In VB.Net :

[code:o5dk3lww]
PCheck(FMOD.Factory.System_Create(moSystem))
PCheck(moSystem.init(32, FMOD.INITFLAG.NORMAL, Nothing))

        PCheck(moSystem.createSound(sFile, FMOD.MODE._2D + FMOD.MODE.SOFTWARE + FMOD.MODE.CREATESTREAM, moSound))
        PCheck(moSound.setMode(FMOD.MODE.LOOP_OFF))
        PCheck(moSystem.playSound(FMOD.CHANNELINDEX.FREE, moSound, True, moChannel))
        PCheck(moChannel.setPaused(False))

[/code:o5dk3lww]

then to release objects :

[code:o5dk3lww]
PCheck(moChannel.stop)
PCheck(moSound.release)
PCheck(moSystem.release)
moSound = Nothing
moChannel = Nothing
moSystem = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
[/code:o5dk3lww]

It crashes on the first line after 12 played MP3. What do I missed ?

Previous question :

Hi, I’m looking at your API, trying the simpliest things.

I have MP3 stereo files, And I would like to play them on one speaker, thus mixing both stereo channel into one mono.

I can play the stereo sound on 2 spekers, but if I use the pan, I loose half of the signal.

Is there an easy way to downmix the stereo to mono ?

  • You must to post comments
0
0

Ok, I see. What I want to do exactly :

I want to play multiple MP3 files (usually in stereo) in mono on multiple channels outputs.

For example 2 MP3 on output 1, one MP3 on output 2, one MP3 on output 3 …

The test audio device is an 8 output USB device (Giga Port AG).

I’m using all your examples to mix them into a prototype software. If I succeed passing the testing ground, I’ll include your API in our commercial software (for the moment I use DirectShow and filter graphs).

I’ll try what you propose.

  • You must to post comments
0
0

BTW, I tried System.setSpeakerMode(FMOD.SPEAKERMODE.MONO) (VB.Net) and it seems to be played as a downmix in mono.

Now, I just have to rout it to the correct speaker.

  • You must to post comments
0
0

New question :

What do I have to do to have a clean release of all objects ?
In VB.Net :

[code:1ggt59u8]
PCheck(FMOD.Factory.System_Create(moSystem))
PCheck(moSystem.init(32, FMOD.INITFLAG.NORMAL, Nothing))

        PCheck(moSystem.createSound(sFile, FMOD.MODE._2D + FMOD.MODE.SOFTWARE + FMOD.MODE.CREATESTREAM, moSound))
        PCheck(moSound.setMode(FMOD.MODE.LOOP_OFF))
        PCheck(moSystem.playSound(FMOD.CHANNELINDEX.FREE, moSound, True, moChannel))
        PCheck(moChannel.setPaused(False))

[/code:1ggt59u8]

then to release objects :

[code:1ggt59u8]
PCheck(moChannel.stop)
PCheck(moSound.release)
PCheck(moSystem.release)
moSound = Nothing
moChannel = Nothing
moSystem = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
[/code:1ggt59u8]

It crashes on the first line after 12 played MP3. What do I missed ?

  • You must to post comments
0
0

Ok, I’m replaying to myself. I forgot something elsewhere. Sorry 😳

BTW, is it better to use multiple Sound and Channel objects on ONE System object, or should I stick to One sound, One Channel, One System object ?

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.