0
0

I have a small question.
Is there some way that I can use 2 soundcards with Fmod?
Can I init the dll two times if I have the dll in two different places??

I would like to make a player where I can choose between two cards.

  • You must to post comments
0
0

Did anybody check this code out?

I’d be interested to hear what you thought…

C U later,

Paul.

  • You must to post comments
0
0

Hey,
I have tried it quickly and it seems to work.
I think it would be cool if it were complete and all functions were properly implemented.
I will properly experiment some more with it in the following months, but I think the major problem will be synchronisation for my purposes.

  • You must to post comments
0
0

It didn’t work at my place so here’s my solution:

http://52.88.2.202/forum/viewtopic.php?t=1145

  • You must to post comments
0
0

FMOD does not support multiple soundcards. To do so would require a major revision of the FMOD codebase.

  • You must to post comments
0
0

Hi again,
I have here put down one version of the code that I have tested.
I haven´t got any of all my tests to work.
The Declare I found in Fmod and then oI have made the changes I kfound here om this forum.
Can anyone please see what I have made wrong….

//Bosse

‘************
‘* FSOUND CD
‘************
Public Declare Function FSOUND_CD_Play Lib “fmod.dll” Alias “_FSOUND_CD_Play@4 (ByVal Drive As Byte, ByVal Track As Long) As Byte” ()
Public Declare Function FSOUND_CD_SetPlayMode Lib “fmod.dll” Alias “_FSOUND_CD_SetPlayMode@4” (ByVal Drive As Byte, ByVal mode As FSOUND_CDPLAYMODES) As Long
Public Declare Function FSOUND_CD_Stop Lib “fmod.dll” Alias “_FSOUND_CD_Stop@0” (ByVal Drive As Byte) As Byte
Public Declare Function FSOUND_CD_SetPaused Lib “fmod.dll” Alias “_FSOUND_CD_SetPaused@4” (ByVal Drive As Byte, ByVal Paused As Byte) As Byte
Public Declare Function FSOUND_CD_SetVolume Lib “fmod.dll” Alias “_FSOUND_CD_SetVolume@4” (ByVal Drive As Byte, Volume As Long) As Byte
Public Declare Function FSOUND_CD_Eject Lib “fmod.dll” Alias “_FSOUND_CD_Eject@0” (ByVal Driver As Byte) As Byte

Public Declare Function FSOUND_CD_GetPaused Lib “fmod.dll” Alias “_FSOUND_CD_GetPaused@0” (ByVal Driver As Byte) As Byte
Public Declare Function FSOUND_CD_GetTrack Lib “fmod.dll” Alias “_FSOUND_CD_GetTrack@0” (ByVal Driver As Byte) As Long
Public Declare Function FSOUND_CD_GetNumTracks Lib “fmod.dll” Alias “_FSOUND_CD_GetNumTracks@0” (ByVal Driver As Byte) As Long
Public Declare Function FSOUND_CD_GetVolume Lib “fmod.dll” Alias “_FSOUND_CD_GetVolume@0” (ByVal Driver As Byte) As Long
Public Declare Function FSOUND_CD_GetTrackLength Lib “fmod.dll” Alias “_FSOUND_CD_GetTrackLength@4” (ByVal Driver As Byte, ByVal Track As Long) As Long
Public Declare Function FSOUND_CD_GetTrackTime Lib “fmod.dll” Alias “_FSOUND_CD_GetTrackTime@0” (ByVal Driver As Byte) As Long

Public Sub CDPlay(Driver As String, Track As Integer) As Byte
Dim x As Byte

FSOUND_CD_Play(Driver, Track)

End Function

Public Sub CDStop(Driver As String) As Byte

CDStop = FSOUND_CD_Stop(Driver)

End Function

  • You must to post comments
0
0

Driver is not a String.
In the declaration it says Byte, and your function passes a String.

  • You must to post comments
0
0

If you create two “ActiveEXE server” in VB (with different names) that “talks” to the fmod dll (need only one dll), then you call the ActiveEXE server from a normal VB form. It works fine I run it with four soundcards, and can play different sounds on the card at the same time.

  • You must to post comments
0
0

Have you some code that I can use??

/Bosse

  • You must to post comments
0
0

Excellent idea Ken 8)

I’ve just whipped up a quick test and although I only have one soundcard in this computer, I am still able to init two completely seperate coppies of the fmod dll.

So basically all we have to do now is the tedious task of making a complete activex exe wrapper for fmod. I guess it shouldn’t be too much of a problem, just a bit time consuming 😕 But worth it when you look at the CPU useage compared to DMC2/BASS that I was gonna use 😀

C U Later,

Paul.

  • You must to post comments
0
0

If anyone has tested this already : Is it possible to get the two soundcards synchronized?
I want to play the same song on both souncards, but they should be synchronized very accurate.

  • You must to post comments
0
0

OK, I have tidied up my test (a bit!) and you can download the demo and source code at [url:1y66kmgr]http://www.onairsoftware.co.uk/fmod/vbfmodmultisoundcarddemo.zip[/url:1y66kmgr]

In the included demo prog, try changing soundcards mid stream… 😉

This isn’t a complete implementation of fmod, just the basics (init stuff, channel stuff and stream stuff) and probably needs a bit more carefull designing of properties/functions, but it proves it works. To use more than 2 soundcards, just alter the ‘fmod wrapper’ project and make new activex exe’s with different class names.

Please let me know what you think, and whether it’ll be worth finishing the wrapper properly (how long before fmod can do this anyway?)

Adion: sync isn’t perfect on my setup, but I do have a strange selection of soundcards. I put a ‘play both’ button on the demo so you can start both channels at the same time.

C U Later,

Paul.

  • You must to post comments
Showing 11 results
Your Answer

Please first to submit.