Detect the Audio And Microphone Level In Windows
I am trying to write an equalizer in C, that opens in Windows as a console program. The problem is that I'm stuck on the retrieving data of audio levels from Windows. I've been searching the web for a couple days, and the only thing I found was:
MMRESULT WINAPI waveOutGetVolume(hwo,pdwVolume);
I can't seem to get it to work though. Current code just to check that function is:
Code:
#include<stdio.h>
#include<Windows.h>
int main()
{
HWAVEOUT hwo;
PDWORD pdwVolume;
while(6)
{
MMRESULT WINAPI waveOutGetVolume(hwo,pdwVolume);
printf("%d\n",(int) pdwVolume);
Sleep(100);
}
getch();
return(0);
}
I think part of the problem is in the PDWORD to int display, but I'm not sure how to fix it. Currently it displays one number, never changing.
Also, in case this is needed, I an using Dev-C++ to edit and compile. Thank you for the help.