Sound processing. Should I use DirectSound or directly Win32 API?

I am making an application in which I will:

  • Recording from a microphone and performing real-time processing at the input
  • MP3 file playback (regular song) but real-time output control
  • From time to time, I will also need to play additional sounds over this song, but I think I can do this by simply adding buffers.

In short, I need to have circular buffers for recording and playback, and I need to “feed” the output buffer every 20 ms or so with new data that is about to be played.

I watched DirectSound and it does not seem to help. Reading and writing output buffers seems very similar to Win32, the only place where, apparently, this would help to play “extra sounds” over the main song.

Should I use DirectSound, or should I go straight to the raw Windows APIs?
Can DirectSound do anything for me?

Thank Advance

+4
source share
4 answers

The Directsound API gives you the best real-time control. They also support the way you use sound in Windows. I had the impression that win32 api were corrupted, but I could be wrong.

https://stackoverflow.com/questions/314522/what-is-the-best-c-sound-api-for-windows

DirectSound Windows?

, : , Microsoft http://msdn.microsoft.com/en-us/library/dd370784(VS.85).aspx

+5

? :)

, DirectSound waveOut, DirectSound DirectInput API Vista WASAPI. DirectSound waveOut WASAPI Vista. XP waveOut DirectSound API- Mixer .

, - OpenAL, , OpenGL.

+5

, . , ASIO

+3

Harmony Central - Audio Programming. w: DirectSound.

Windows Vista . , DirectSound .

- Xbox 360 Microsoft Windows, Microsoft Xbox API, XAudio XACT.

OpenAL looks promising.

+2
source

Source: https://habr.com/ru/post/1703011/


All Articles