What I need to do is to output sounds from the default sound playback device. I'm guessing I have to use DirectSound or something.
What I basicly want to do is give it a Frequency and a duration, and it will output a sound of that frequency for that duration. Somehow like the Beep function, but that only works with the motherboard speaker (newer computers don't have any?) or is there a way to change the output of that?
Some people told me that I could maybe generate WAV, but that works with amplitude so I would have to use Fourier transform (FFTW?) or something. It all sounds to advanced for me.
Also, after that, I would need another program (the receiver) that would listen for these inputs and when it hears any sound, it writes down the frequency of it.
Yes, WAV stores volume levels, but you can generate a wave with
v(t)=sin(t*pi*f)*a
t being time in seconds, f being frequency, and a being amplitude (a value higher than 1.0 will generate clipping).
I was assuming you knew how to, judging by the fact that you didn't mention it as a problem.
You can use the technique I described above to generate the signal to send to sound output.
No, you don't need DS.
Just win32 MM api
The code (in C) had been posted on api ng news://comp.os.ms-windows.programmer.win32
like for all Win32 apis..
Well there's a reason why I posted in BEGGINERS and not in C++, my knowledge of C++ is VERY limited, and when it comes to generating sound, its close to 0.
Could I please have a short sample in C++ or some keywords to search on google about? I searched for hours and didn't find anything else than Beep().