Help - Search - Members - Calendar
Full Version: activating SPDIF using DirectSound
Hydrogenaudio Forums > Hydrogenaudio Forum > Scientific Discussion
vin2chayank
i'm writing a program to play a wave file using SPDIF out. so far i can only use the analog out.
i'm using DirectSound, and the program is written in VC++6.

i'm wondering if DS has any class to handle SPDIF-in/out specifically. Does anyone know which class it is?

if there's no such class, does anybody know any reference on programming SPDIF?

btw, i'm using SBLive, Windows XP SP1

Thanks! smile.gif
Jasper
Usually it's just a question of opening the right device, you normally don't have to do anything special to use your SPDIF output.
For your program you could just let it output to the standard device and select the right device in Windows' control panel, or you could let the user select a device from within your program (you can enumerate DirectSound devices with DirectSoundEnumerate).
Pio2001
I had two soundcards with SPDIF out, the SB Live and the Marian Marc 2.

In the SB live, the output of the soundcard was directed to both analog and digital out. There was no difference between the two outputs from a software point of view. It's like it would have been a headphone out.

In the Marian Marc 2, the driver installs two audio devices, the "Marc 2 analog" and the "Marc 2 digital". You can choose digital like a separate soundcard.
ChristianHJW
TCMP, as well as any other advanced DirectShow player, will allow to select SPDIF for audio, so there has to be a way. TCMP is using semi-automatic graph generation, so i assume it will simply insert a special SPDIF out filter in the graph before building it.

Drop an email to tcmp-devel AT freelists.org, i guess the guys will tell you how its done ...
Jasper
But I doubt they are using DirectSound directly, they are most likely using DirectShow.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.