10-25-2015 06:38 PM
Hi
I use for years an application working on sound cards with low level Microsoft functions (Winmm.lib) like waveInAddBuffer, waveInProc, WveInOpen, waveInPrepareHeader... with the well-known double buffer mechanism. No problem with Windows XP, and development under Labwindows 2010 or older versions.
As soon as I tried this application on a PC under Windows 8.1 64 bits, the mechanism of sending buffers and getting callback when filled doesn't works correctly, callback comes too late, buffer content is corrupted, Same problem if I use Windows 10, and if I build the project with Labwindows 2013 or 2015. The project include the 64 bits version of winMM.lib (same problem with the 32 bits version).
Any idea ? Could I use a DirectX solution instead to get data from (and send to) the sound card ?
Thanks in advance.
JP
12-08-2015 05:21 PM
Hi
No success with my post... nobody use Labwindows with sound cards ?
In fact the problem can be easily found also by generating a sound.
I join a simple project sending 1s 16 bits buffers at 44100Hz sample/s in stereo to the sound card 0.
The frequencies are 1000Hz (left) and 10000Hz (right).
Running this code generates continuous pure tones without any problem.
Now I add a loop in the Callback to simulate a time consuming process (for instance generating a complex waveformat for each new buffer).
On my 64bits Windows10 PC, sound cracks occurs as soon as the duration of this loop is 50ms or more, to be compared to 1s buffer length : very short time !!! why?
On a 32bits XP PC, the same application allows a duration very close to 1s (0.95) without any perturbation, which is absolutely normal.
Anybody could test this code on his Windows 10 and/or 64bits PC ?
And find the bug ?
Thanks in advance.
JP