Quantcast
Channel: Visual Leak Detector for Visual C++ 2008-2015
Viewing all articles
Browse latest Browse all 704

Created Unassigned: waveOutOpen bug [10623]

$
0
0
Hi
I found bug in VLD. If you use waveOutOpen function VLD will crash. I use waveOutOpen with following parameters:
``` c
HWAVEOUT waveOut;
WAVEFORMATEX waveFormat;
DWORD idThread;
HANDLE thread;

thread = CreateThread(0, 0, AudioThread, 0, 0, &idThread);

waveFormat.wFormatTag = WAVE_FORMAT_PCM;
waveFormat.nChannels = 2;
waveFormat.nSamplesPerSec = 8000;
waveFormat.wBitsPerSample = 16;
waveFormat.nBlockAlign = (waveFormat.nChannels * waveFormat.wBitsPerSample) / 8;
waveFormat.nAvgBytesPerSec = waveFormat.nSamplesPerSec * waveFormat.nBlockAlign;
waveFormat.cbSize = 0;


waveOutOpen(&waveOut, WAVE_MAPPER, &waveFormat, (DWORD_PTR)idThread, 0, CALLBACK_THREAD);
```
This is my output if i run my program:
```
Visual Leak Detector read settings from: C:\Program Files\Visual Leak Detector\vld.ini
Visual Leak Detector Version 2.5 installed.
... (some PDB files error)
The thread 0x1340 has exited with code 0 (0x0).
The thread 0x15f0 has exited with code -1073741749 (0xc000004b).
The program '[2788] xaudio.exe' has exited with code 0 (0x0).
```
If i comment waveOutOpen line, I've got correct output:
```
... (some PDB files error)
Visual Leak Detector read settings from: C:\Program Files\Visual Leak Detector\vld.ini
Visual Leak Detector Version 2.5 installed.
The thread 0x11fc has exited with code 0 (0x0).
No memory leaks detected.
Visual Leak Detector is now exiting.
The program '[7152] xaudio.exe' has exited with code 0 (0x0).
```

Viewing all articles
Browse latest Browse all 704

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>