Click here to Skip to main content
15,889,403 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi. After much reading on the subject, I still can't find any thing useful to me. What i'm trying to do is get a reading from the sound card as it plays an audio file. I have some experience in c# and tried several different libaries, but just cant find how to do this. Im running a very powerful win7 64bit pc. I want to grab the digital outputs the soundcard makes when it plays the wave file, simular to what happens when a sine table is shown. I just want a int I can assign values to. wav file is 32bit mono For example. I have mediocre experience with c#.

public int sound_level ; 

public void sound_analize()

{ 

if (sound_level ==0;) //no sound 

{do something;
 }

if (sound_level == 50)//low sound

{do something;

}

if (sound_level = 100)//meduim sound level

{do something else;

}

if (sound_level = 200)//loud sound

{do something else;

}

}

so, for example. no noise could be 0-49
50-99 low sound
100 - 199 med sound
200+ loud sound
It doesnt matter what these numbers are as long as I can detrmine some sort of range between nosound,lowsound,medsound and highsound.
Here we see I just need a way to meausure the noise level of the soundcard as It is playing the wav file and store it into a int called sound_level.

Help much welcome

Thanks
Posted
Updated 22-Dec-11 20:50pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900