Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: activating SPDIF using DirectSound (Read 3978 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

activating SPDIF using DirectSound

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! 

activating SPDIF using DirectSound

Reply #1
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).

activating SPDIF using DirectSound

Reply #2
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.

activating SPDIF using DirectSound

Reply #3
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 ...

activating SPDIF using DirectSound

Reply #4
But I doubt they are using DirectSound directly, they are most likely using DirectShow.