# Fmod Studio API - How to play in a specific soundcard

**URL:** <https://qa.fmod.com/t/fmod-studio-api-how-to-play-in-a-specific-soundcard/13963>\
**Category:** FMOD Studio\
**Created:** [June 23, 2018, 7:27pm UTC](https://qa.fmod.com/t/fmod-studio-api-how-to-play-in-a-specific-soundcard/13963 "2018-06-23T19:27:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcelomanzo](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@marcelomanzo](https://qa.fmod.com/u/marcelomanzo)\
**Post date:** [June 23, 2018, 7:27pm UTC](https://qa.fmod.com/t/fmod-studio-api-how-to-play-in-a-specific-soundcard/13963/1 "2018-06-23T19:27:25Z")

</div>

Hello,

I’m very familiar with the fmodex and know how the setdriver works.  
I’ve started a new project using the studio api, and I can’t get the api to play sounds in a soundcard that is not the default.

Using ObjectPan.cpp

```
FMOD::Studio::System *system = NULL;
ERRCHECK( FMOD::Studio::System::create(&system) );

FMOD::System* lowLevelSystem = NULL;
ERRCHECK( lowLevelSystem->setDriver(1) );

```

The line above looks like it’s ignored and the sound is always playing in the default soundcard.

I’m using the latest version of studio dll.

---

<div class="post-metadata">

**Author:** ![marcelomanzo](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@marcelomanzo](https://qa.fmod.com/u/marcelomanzo)\
**Post date:** [June 24, 2018, 11:42am UTC](https://qa.fmod.com/t/fmod-studio-api-how-to-play-in-a-specific-soundcard/13963/2 "2018-06-24T11:42:24Z")

</div>

> [@](#):
>
> Hello,
> 
> I’m very familiar with the fmodex and know how the setdriver works.  
> I’ve started a new project using the studio api, and I can’t get the api to play sounds in a soundcard that is not the default.
> 
> Using ObjectPan.cpp
> 
> ```
> FMOD::Studio::System *system = NULL;
> ERRCHECK( FMOD::Studio::System::create(&system) );
> 
> FMOD::System* lowLevelSystem = NULL;
> ERRCHECK( lowLevelSystem->setDriver(1) );
> 
> ```
> 
> The line above looks like it’s ignored and the sound is always playing in the default soundcard.
> 
> I’m using the latest version of studio dll.

I did some more research, and it seems related to the sound\_output

If I comment:  
FMOD\_RESULT result = lowLevelSystem-\>setOutput(FMOD\_OUTPUTTYPE\_AUDIO3D);

It plays fine in the driver 1,

but if the output it’s AUDIO3D, does not matter what I do, it will play in the default soundcard driver = 0

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [June 27, 2018, 2:27am UTC](https://qa.fmod.com/t/fmod-studio-api-how-to-play-in-a-specific-soundcard/13963/3 "2018-06-27T02:27:57Z")

</div>

What you will want to do is use System::getNumDrivers and iterate over the drivers, using System::getDriverInfo to determine the driver you are looking for. Then use setDriver with the index of the driver you want to use.

[https://fmod.com/resources/documentation-api?page=content/generated/FMOD\_System\_GetDriverInfo.html](https://fmod.com/resources/documentation-api?page=content/generated/FMOD_System_GetDriverInfo.html)

---

<div class="post-metadata">

**Author:** ![marcelomanzo](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@marcelomanzo](https://qa.fmod.com/u/marcelomanzo)\
**Post date:** [June 27, 2018, 2:30am UTC](https://qa.fmod.com/t/fmod-studio-api-how-to-play-in-a-specific-soundcard/13963/4 "2018-06-27T02:30:49Z")

</div>

Yes, I know, I’m just hard coding 1  
ERRCHECK( lowLevelSystem-\>setDriver(1) );  
to see if works.
