DirectSound is a software component of the multimedia API collection known as Microsoft DirectX. It is geared to play audio.
Questions tagged [directsound]
168 questions
22
votes
4 answers
How to produce precisely-timed tone and silence?
I have a C# project that plays Morse code for RSS feeds. I write it using Managed DirectX, only to discover that Managed DirectX is old and deprecated. The task I have is to play pure sine wave bursts interspersed with silence periods (the code)…

Bob Denny
- 1,306
- 1
- 11
- 18
18
votes
1 answer
How to make my application be considered as a communication program in Windows
I'm making a program that uses the Speech library and I'd like to get all other sounds muted or reduced when the lady is talking.
I've been looking for a way to mute other applications manually, but I've seen an option in Windows in the…

Pacane
- 20,273
- 18
- 60
- 97
9
votes
2 answers
Go, OpenAL, DirectSound and Heisenbug
I've already killed a week trying to solve a mysterious problem in a project of mine and I am out of ideas.
I wrote a Go package intended to play sounds which wraps OpenAL... pretty basic stuff. I got it working on my Xubuntu 14.04 (32-bit), so I…

MilanV
- 129
- 1
- 8
8
votes
1 answer
Acoustic Echo Cancellation (AEC) with Speex and DirectSound
I am trying to perform Acoustic Echo Cancellation (AEC) with the Speex codec library. According to the Speex documentation, I need to perform two calls:
speex_echo_playback(echo_state, echo_frame);
every time an audio frame is played, and
…

Wade
- 299
- 5
- 9
6
votes
2 answers
How to provide a HWND to DirectSound SetCooperativeLevel in a console program?
I'm writing a console program that uses DirectSound API to render some audio data. I stumbled on a curious problem when following the DirectSound Programming Guide (from Microsoft). According to the documentation :
After creating a device object,…

overcoder
- 1,523
- 14
- 24
6
votes
2 answers
Sound pressure display for WAVE PCM data
The digital sound is playing using DirectSound device. It is necessary to display sound activity in decibels - like analog devices do.
What is the right way to calculate sound pressure from the WAVE PCM data (44100 Hz, 16-bit)?

LicenseQ
- 1,721
- 1
- 15
- 21
6
votes
1 answer
Modify volume gain on audio sample buffer
I want to increase a volume on buffer with voice data. The point is I'm using DirectSound and I have one primary and one secondary buffer - all streams mixing is done by hand. In a voice chat all participants can have independent volume levels. I…

Dalamber
- 1,009
- 1
- 12
- 32
6
votes
1 answer
Directsound - Problems with playback of streaming buffer filled with data from network! Using ported DirectX headers for Delphi
Back again with yet another DirectSound question, this one regarding the ways DirectSound Buffers can be used:
I have packets coming in over the network at approximately 30ms intervals containing audio data that is decoded into raw wav data by other…

Michael Stahre
- 481
- 6
- 14
5
votes
2 answers
Detect headphones in Windows
I'm trying to detect if the headphones are plugged in on Windows. I've already tried DirectSound and the NAudio library and have not had any success. Does anyone have any suggestions?
NOTE: this question is a duplicate of this question, but the…

Izzy Rodriguez
- 2,097
- 3
- 21
- 32
5
votes
2 answers
How do I get a HWND from inside a DLL?
I have a DLL that I want to play sounds using Direct Sound. In order to play sounds, I need the HWND of the executable. I don't have a HWND of the executable that loads the DLL. How do I get that in the DLL without passing it in from the…

zooropa
- 3,929
- 8
- 39
- 61
4
votes
4 answers
Sound processing: Should I use DirectSound or directly Win32 APIs?
I'm making an application where I will:
Record from the microphone and do some realtime processing on the input
Play an MP3 file (a regular song), but manipulating the output in realtime
Every now and then I'll need to play additional sounds over…

Daniel Magliola
- 30,898
- 61
- 164
- 243
4
votes
2 answers
What causes poor network performance when playing audio or video in Windows Vista and newer?
The software in question is a native C++/MFC application that receives a large amount of data over UDP and then processes the data for display, sound output, and writing to disk among other things. I first encountered the problem when the…

bsruth
- 5,372
- 6
- 35
- 44
4
votes
1 answer
playing sound with SlimDX and DirectSound (C#)
(apologies if this is a duplicate ... i posted but saw no evidence that it actually made it to the forum)
I've been trying to get SlimDX DirectSound working. Here's the code I have. It fills the secondary buffer from a wav file and then, in a…

blearyeye
- 255
- 4
- 14
4
votes
1 answer
Set audio input level using portaudio
I am dealing with a legacy code that uses portaudio on windows. The code grabs audio from desktop mic and has ability to configure input volume. It worked perfectly under windows xp, but tuning audio input level is broken under windows 7, changing…

capone
- 728
- 5
- 17
4
votes
6 answers
Is DirectSound the best audio abstraction layer for Windows?
Is DirectSound the best audio abstraction layer for Windows?
Switching my app from a very bad sound implementation, built to a specific chipset, to an abstration layer.
App is native Winform, .net 3.5. DirectX/DirectSound is the likely choice, but…

pearcewg
- 9,545
- 21
- 79
- 125