Can I use all the Windows WAVE record and playing APIs using just a simple non-windows console?
I have a project coming up that needs do the following:
1. Receive audio input from the mic/input device.
2. Packetize it.
3. Send it to a receiving client through unicast UDP.
4. Play the audio.
5. Repeat from 1.
Ideally this will be a 2 way application.
My question is, I am not familiar enough with the Windows framework to program it using all the winmain stuff yet. So I am not sure if I can do what I want just through a main() application. It looks as though alot of the stuff might require handlers and such and I want to avoid this if possible since I don't need any GUI, just a command prompt.
Can you please verify if I can or cannot do this?
I am marking this as fairly urgent b/c I would like to know if I should abandon this project or not.
wfx.wFormatTag = WAVE_FORMAT_GSM610;
wfx.nChannels = 1; //mono
wfx.nSamplesPerSec = 11025;
wfx.wBitsPerSample = 0;
wfx.nBlockAlign = 65;
wfx.nAvgBytesPerSec = 1625;
wfx.cbSize = 2; // from sizeof(GSM610WAVEFORMAT)-s
MMRESULT mmri = waveInOpen(
NULL, // ptr can be NULL for query
WAVE_MAPPER, // the device identifier
&wfx, // defines requested format
NULL, // no callback
NULL, // no instance data
WAVE_FORMAT_QUERY); // query only, do not open device
if(!mmri == MMSYSERR_NOERROR )
printf("error getting GSM caps\n");