GameZelda
GameZelda

Reputation: 834

What's the lowest level Windows function(s) to play sound?

What's the lowest level Windows function(s) to play sound? (The function(s) that are called by any other functions that play sound).

For example, fopen() calls CreateFileA(), and CreateFileA() calls CreateFileW(), and CreateFileW() calls NtCreateFile(), etc. I want to know what's the lowest-level one for sound (without comunicating with the sound driver directly).

Upvotes: 0

Views: 1353

Answers (2)

selbie
selbie

Reputation: 104559

On Vista and Win7, you can use WASAPI. If that's too low level (as much of it is geared for pro-audio tools), you can look at the Wave and DirectSound APIs to stream buffers of audio out to the speakers. There's also the XACT/XNA stuff for games. All of these APIs ultimately sit on top of WASAPI, but are likely easier to use.

If you just want to Play a WAV file from time to time without any notification or mixing support, its hard to beat PlaySound.

Upvotes: 1

Caladain
Caladain

Reputation: 4934

PlaySound would be as low as i would go.

http://msdn.microsoft.com/en-us/library/aa909766.aspx

But check out all the winapi sound functions on MSDN
http://msdn.microsoft.com/en-us/library/aa909811.aspx

Upvotes: 1

Related Questions