• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1405
  • Last Modified:

Recording sound using .net and DirectSound

Can anyone point me towards some good tutorials (pref. in vb.net) or provide me with some sample code on how to record sound in my application using DirectSound?
0
garethh86
Asked:
garethh86
  • 4
  • 3
1 Solution
 
nomooseCommented:
Hey Garethh86,

I think this site is a great place to get started!

http://www.freevbcode.com/showcode.asp?id=1082

Hope it helps,
Elliot
0
 
garethh86Author Commented:
Not only is that tuturial in vb6 not .net as requested, it also doesn't cover anything to do with recording, only playing sound.
0
 
nomooseCommented:
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
garethh86Author Commented:
That is only to do with playback of sound NOT recording.

Seriously, I can use google - I'm asking here because I can't find anything of worth.

I need sample code, preferably in VB.net, will manage with C# though, describing how to RECORD sound using DirectSound.

Thanks.
0
 
nomooseCommented:
I'm not sure if you've come across this, but MSDN has a lot of literature on DirectSound.  If you search there you can find the following:
"Capturing Waveforms"
http://msdn.microsoft.com/en-us/library/ms804985.aspx

All of those articles are pieces of the whole picture.  They all provide code and thorough explanation.  The code is available in a variety of languages, you just have to click on the links for the definitions in the articles for it to take you to the code.

From what I can tell with this you should be able to record sound from a mic or other audio devices in the computer as long as you set up the device object.

- Elliot
0
 
garethh86Author Commented:
That still doesn't help me, I've already been through the documentation, I need sample code please, starting from the beginning (init directsound, capturing the sound) to the end (formatting the captured audio and saving it to disk.)
0
 
garethh86Author Commented:
Turns out this can only be done using 'stereo mix' or 'what you hear' which is only supported by certain sound cards.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now