Click here to Skip to main content
15,895,142 members

Comments by András Naszály (Top 6 by date)

András Naszály 14-Nov-13 16:10pm View    
Hi, tried following code:

int query()
{
UINT deviceCount = waveInGetNumDevs();

for (UINT deviceIndex = 0;
deviceIndex < deviceCount; deviceIndex++)
{
WAVEINCAPS woc;

MMRESULT result = waveInGetDevCaps(
deviceIndex, &woc, sizeof(woc));

printf("Device: %u-%u : %s\n",
woc.wMid, woc.wPid, woc.szPname);

printf("%u\n", woc.wMid);
printf("%u\n", woc.wPid);
printf("%s\n", woc.szPname);
printf("%d\n", woc.dwFormats);
printf("%u\n", woc.wChannels);

}

printf("Any key...");
_getch();
return 0;
}

but cant figure out the result, dwformats is 1048575.
András Naszály 14-Nov-13 9:17am View    
How can i check the capabilities?
András Naszály 13-Nov-13 3:28am View    
Error message during program run:
"The specified format is not supported or cannot be translated. Use the Capabilities function to determine the supported formats."
András Naszály 12-Nov-13 15:32pm View    
Hi, thanks for the help. First of all i switched to VS2013 from quincy.

I tried Your changes, builds now, but cant open device with waveformatextensible. Im trying 16bit since it should be working, but it doesnt:

<pre>
WAVEFORMATEXTENSIBLE pFormat; // 24 bit format - not working
pFormat.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; // bővített formátum lesz, később
pFormat.Format.nChannels = 1; // 1=mono, 2=stereo
pFormat.Format.nSamplesPerSec = sampleRate; // 44100
pFormat.Format.nAvgBytesPerSec = sampleRate * 2; // = nSamplesPerSec * n.Channels * wBitsPerSample/8
pFormat.Format.nBlockAlign = 2; // = n.Channels * wBitsPerSample/8
pFormat.Format.wBitsPerSample = 16; // 16 for high quality, 8 for telephone-grade
//pFormat.Format.wValidBitsPerSample = 20;
pFormat.Format.cbSize = 22;
pFormat.dwChannelMask = SPEAKER_FRONT_LEFT;
pFormat.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
</pre>

How come i can open device with same settings through waveformatex but not with waveformatextensible structure?
András Naszály 11-Nov-13 3:11am View    
JOB OFFER!

If anybody would like to solve this, i am willing to pay for it!