0
0

When multiple soundcards are supported by calling System_Create multiple times, is there any clever way to figure out how many physical sound cards do exist? That means, how many systems would I need to instantiate when the user may have 0..N cards in his box? I assume I could always call System_Create say 16 times and only handle the pointers I get. I noticed the example was just using ‘Sound card A’ and ‘Sound card B’ so there was an assumption that there would always be two.

Also, if a user has two physical sound cards of the same type connected, will there be any difference in the driver names so that I could provide some help to identify which of the two cards is the correct one?

  • You must to post comments
0
0

FMOD will simply display the list of available devices, depending on which output mode and hence underlying API you choose will affect what is displayed in the list. We don’t provide any information about which devices belong to which soundcards, only the devices reported by the system.

  • You must to post comments
0
0

I have never done this, however, I believe that the theory is that you use FMOD::System_Create() to create an FMOD::System object. You then call System::getNumDrivers() to get the number of soundcard devices on the machine. If you want to create one System object per device, then you can do so and use System::setDriver() to set which device you want to use. This should work on systems with multiple identical sound cards.

In pseudocode:
[code:2ifna9kw]FMOD::System* pSystem = NULL;
System_Create(&pSystem);

int numDrivers = pSystem->getNumDrivers();
if(i == 0)
{
pSystem->setOutput(FMOD_OUTPUTTYPE_NOSOUND);
return;
}

vector<FMOD::System> systems;
pSystem->setDriver(0);
InitializeSystem(pSystem);
systems.push_back(pSystem);
for(int i=1; i<numDrivers; i++)
{
FMOD::System
pNewSystem = NULL;
FMOD::System_Create(&pNewSystem);
pNewSystem->setDriver(i);
InitializeSystem(pNewSystem);
systems.push_back(pNewSystem);
}
[/code:2ifna9kw]

Again, I’ve never done this, but I believe that that’s the proper set of operations to perform.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.