Jump to content

Sound from Mic

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1
heba

heba

    Newbie

  • Members
  • Pip
  • 4 posts
I need a very simple code to get the sound value from the microphone as int;
when pressing a button or on timer.
I don't want to use any complex libraries such "Direct X", No recording, No saving file, Just the sound from the mic buffer
any idea?


#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Which sound value? There's amplitude, frequency, etc. Regardless of what value you want, you will need to use a library to connect to the mic buffer, and may want to use a sound library to analyze the waveform for the desired value.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
heba

heba

    Newbie

  • Members
  • Pip
  • 4 posts
Just the amplitude value with no processing or analyzing !
suggest any library, a simple 'free' one
and a couple lines of code
:)
thanks for your attention



#4
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Take a look at this namespace: Microsoft.DirectX.DirectSound

#5
heba

heba

    Newbie

  • Members
  • Pip
  • 4 posts
using Microsoft.DirectX.DirectSound;

i get this error:

Error 1 The type or namespace name 'DirectX' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) E:\Todays Folder\April 2009\26 4 2009\dx\dx\Form1.cs 8 17 dx




#6
barkermn01

barkermn01

    Newbie

  • Members
  • PipPip
  • 15 posts

heba said:

using Microsoft.DirectX.DirectSound;

i get this error:

Error 1 The type or namespace name 'DirectX' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) E:\Todays Folder\April 2009\26 4 2009\dx\dx\Form1.cs 8 17 dx



I don't think Microsoft have a DirectX namespace, install XNA Framework that is Microsoft's c# GDK(Gaming Development Kit) works best and gives full handles for DirectX

#7
barkermn01

barkermn01

    Newbie

  • Members
  • PipPip
  • 15 posts
Sorry XNA dont support sound the one part of DriectX they dont lol,

microsoft.com /downloads/details.aspx?FamilyID=24a541d6-0486-4453-8641-1eee9e21b282&displaylang=en

That gives you the Microsoft.DirectX.DirectSound