Questions tagged [directsound]

DirectSound is a software component of the multimedia API collection known as Microsoft DirectX. It is geared to play audio.

168 questions
2
votes
1 answer

Changing wave format at runtime with NAudio

I have initialized the device using: static IWavePlayer waveOut; static WaveFormat waveFormat; static BufferedWaveProvider waveProvider; private static int AudioDeviceInit() { waveOut = new DirectSoundOut(); …
John Smith
  • 1,351
  • 3
  • 16
  • 21
2
votes
1 answer

Writing contents of a DirectSound CaptureBuffer to a WAV file in C#

I have recorded audio to a CaptureBuffer, but I can't figure out how to save it into wav file. I have tried this (http://www.tek-tips.com/faqs.cfm?fid=4782), but it didn't work, or I didn't use it properly. Does anybody know how to solve this?…
Tofig Hasanov
  • 3,303
  • 10
  • 51
  • 81
2
votes
1 answer

C# Use camera microphone to record

I am making an application that record sound from a microphone and i don't know how to get all the microphones installed on the pc... i've tried with DirectSound but that gives me just the Audio Card MicIn. So, how can i get all the microphones?
Sp3ct3R
  • 715
  • 1
  • 12
  • 24
2
votes
0 answers

Trying to clone SecondaryBuffer but got an MemoryAccessViolation exception

I'm trying to clone SecondaryBuffer so I can play the same sound multiple times at the same time. this is the code I'm using: In the main thread: Device sounddevice = new Device(); sounddevice.SetCooperativeLevel(this,…
Daniel
  • 71
  • 1
  • 4
2
votes
1 answer

Detecting arrival/disconnection of audio device

I would like to add feature to my app that will allow detecting arrival and disconnection of playback/capture devices on Windows OS. Like in Skype - when you unplug the device - it show notification that device is lost and e.g. asks you to choose…
Dalamber
  • 1,009
  • 1
  • 12
  • 32
2
votes
1 answer

error LNK2019: unresolved external symbol Direct Sound

So I'm reading "Beginning Game Programming Third Edition" by Jonathan S. Harbour, and I've gotten to the point where he teaches us how to use Direct Sound. The book uses it's own DirectSound.h and DirectSound.cpp files, which were from a previous…
L.Moyer
  • 81
  • 1
  • 10
2
votes
1 answer

IDirectSoundBuffe Lock, why to pass 2 parts?

On the lock method of IDirectSoundBuffer8 we're suppose to pass 2 parts and their respective sizes. What are those? The fist part is the start and the second part is the end of the lock? They have to do with the primary and secondary buffers? Stereo…
2
votes
3 answers

how to record anything from soundcards?

i would like to record any sounds produced in my soundcard. please help, where i can get a freeware component or commercial(trial). delphi7/2009
XBasic3000
  • 3,418
  • 5
  • 46
  • 91
2
votes
3 answers

C# resample audio from 8khz to 44.1/48khz

I have encountered a bug in DirectShow .NET where I create a secondary buffer with a sample rate of 8khz, and upon playback, the sound plays back at approx. 8.1khz instead. Googling this, I discovered that I might be forced to upsample the 8khz…
Roey
  • 99
  • 5
  • 12
2
votes
2 answers

Is it possible to transcode audio in C# using DirectSound?

I want to transcode a lot of audio from its source format to PCM without resampling or messing with the sample size. I figure if Windows Media Player can play the file and it doesn't use a legacy ACM codecs it must be using DirectSound to do so…
Robert Davis
  • 2,255
  • 2
  • 21
  • 21
2
votes
2 answers

Why wont DirectSound Buffer play under debug conditions?

My wave won't play under debug. If I hit CTRL+F5 I get a nice WAV and the Console writes out the file cursor position (buf.PlayPosition) and then the method exits when the sound is over. Under debug (when I just hit F5) there is no audio output,…
gingerbreadboy
  • 7,386
  • 5
  • 36
  • 62
2
votes
1 answer

Capture Sound in C# using .Net Own libraries nothing else

I'm trying to capture Microphone sound using C#, and i have searched Google for this thing and all what i am getting is non .Net Libraries , i only get open source ones Like NAudio and other like DirectX and DirectX.DirectSound which are for managed…
Yaser Jaradeh
  • 322
  • 1
  • 6
  • 27
2
votes
0 answers

Capture Sound from microphone using Directx DirectSound

I am creating a simple application that records input from the microphone and store it into array of bytes. So I have searched a lot about this and eventually ended up using Directx DirectSound. Here is the code I am using: using…
BOSS
  • 1,828
  • 11
  • 34
  • 60
2
votes
2 answers

How can I make this code play the wave file for longer?

I couldn't figure out how to create my own sound player, so I have opted to use one from ChiliTomatoNoodle's framework. The issue I'm having, however, is I have a 180s wave file, that's only playing the first second or so. What do I have to do to…
2
votes
1 answer

C++ - DirectSoundBuffer stop playing at specific location - no notifications

I'm using DirectSound's DirectSoundBuffer to play voice data that I am streaming over a network. The nature of voice/speech is that it doesn't necessarily constantly stream (it starts and stops) and it also can come in varying packet sizes (which…
Jace
  • 3,052
  • 2
  • 22
  • 33
1 2
3
11 12