Audio : DirectSound vs Win32 API ?
-
I want to start with audio programming and want to know the advantages and disadvantages of using DirectSound and of the Windows SDK audio functions (waveIn and waveOut). Which is better to handle? Which is faster or more powerfull? Which is better to use? Thanks for helping Heiko Voss
-
I want to start with audio programming and want to know the advantages and disadvantages of using DirectSound and of the Windows SDK audio functions (waveIn and waveOut). Which is better to handle? Which is faster or more powerfull? Which is better to use? Thanks for helping Heiko Voss
-
I want to start with audio programming and want to know the advantages and disadvantages of using DirectSound and of the Windows SDK audio functions (waveIn and waveOut). Which is better to handle? Which is faster or more powerfull? Which is better to use? Thanks for helping Heiko Voss
DirectSound is faster and mroe Powerful. waveOut is better to use. It all depends on what you want to do. What do you want to do?
Pandoras Gift #44: Hope. The one that keeps you on suffering.
aber.. "Wie gesagt, der Scheiss is' Therapie"
boost your code || Fold With Us! || sighist | doxygen -
DirectSound is faster and mroe Powerful. waveOut is better to use. It all depends on what you want to do. What do you want to do?
Pandoras Gift #44: Hope. The one that keeps you on suffering.
aber.. "Wie gesagt, der Scheiss is' Therapie"
boost your code || Fold With Us! || sighist | doxygenI want to do ALL :-) Record, play, save as WAV and read WAV. Perhaps some processing. But my actual task is a full duplex application. I tried the FullDuplex example of DirectX SDK (9.0c) and got a latency of nearly a second!!! I build also a full duplex application with Win API and got a latency in "normal" range (smaller than 0.1s). I was surprised and posted my question. If DirectX is more powerfull i want to use it. But what's with this really long latency time? I tried the original example! Greetings Heiko
-
I want to do ALL :-) Record, play, save as WAV and read WAV. Perhaps some processing. But my actual task is a full duplex application. I tried the FullDuplex example of DirectX SDK (9.0c) and got a latency of nearly a second!!! I build also a full duplex application with Win API and got a latency in "normal" range (smaller than 0.1s). I was surprised and posted my question. If DirectX is more powerfull i want to use it. But what's with this really long latency time? I tried the original example! Greetings Heiko
-
Hey Heiko, Can you exactly tell me how do you measure the Latency. It will be helpfull for me. Regards Anil Kumar
Hi Anil, I speak in a microphone, the signal is going through the application, send to the output and i listen to it with headphones. The time between talking and hearing is my latency. It's not really a scientific method but for a first test it's ok. And the difference between the two used samples is clearly to hear. Later i will measure the latency between input and output with a more exact method. Greetings Heiko
-
I want to do ALL :-) Record, play, save as WAV and read WAV. Perhaps some processing. But my actual task is a full duplex application. I tried the FullDuplex example of DirectX SDK (9.0c) and got a latency of nearly a second!!! I build also a full duplex application with Win API and got a latency in "normal" range (smaller than 0.1s). I was surprised and posted my question. If DirectX is more powerfull i want to use it. But what's with this really long latency time? I tried the original example! Greetings Heiko
I don't know much about the original example :) With DS, I have a playback/capture offset of about 500 samples in a release build (this includes codec delay, but not playback latency - but that's a few ms) There might be some processing in the default sample (e.g. capturing 1 s of data, processing it, and playing it back), some bad SC config or whatever. DirectSound shines for playback when you are mixing multiple buffers, do 3D sound effects, etc. Capture is a bit neglected in the DirectSound API. I am not sure if the waveOut API supports more than the 2 channels / 48kHz API - check that if you need it! OTOH, the waveI/O is extremely simple compared to DirectSound. In DirectSound, you cannot get robust duplex without running your own threads. You need some basic understanding of COM, and you have gazillions of soundcard configuraiton options, which you will spend a lot of frustrating time fine-tuning them.
Pandoras Gift #44: Hope. The one that keeps you on suffering.
aber.. "Wie gesagt, der Scheiss is' Therapie"
boost your code || Fold With Us! || sighist | doxygen