waveout

Playing wave file ends immediatly (C++, Windows)

I've got a following situation. On a machine there is a Fritz ISDN card. There is a process that is responsible for playing a certain wave file on this device's wave out (ISDN connection is made at startup and made persistent). The scenario is easy, whenever needed the process calls waveOutWrite() on the previously opened wave device (ev...

vhost.exe crashes when trying to make waveout work in C#.

I tried to use waveout in C# to play more wav files simultaneously (at least the different ones). (SoundPlayer object only plays one in a time, and I don't want to use DirectSound and MediaPlayer objects or any other advenced technologies for this simple goal.) I ported a working C++ code to C# and it works (after a research how to mars...

What is the latency (or delay) time for callbacks from the waveOutWrite API method?

I'm having a debate with some developers on another forum about accurately generating MIDI events (Note On messages and so forth). The human ear is pretty sensitive to slight timing inaccuracies, and I think their main problem comes from their use of relatively low-resolution timers which quantize their events around 15 millisecond inte...

Query wave format for a HWAVEOUT handle

Context: I have a piece of code that knows the value of a waveOut handle (HWAVEOUT). However the code did not create the handle, thus the WAVEFORMATEX that was passed to waveOutOpen when creating the handle is unknown. I want to find out the contents of that WAVEFORMATEX struct that was passed to the waveOutOpen call. Some more details...

waveOut (Win32API) and multithreading

Hi I cannot find any information about the thread-safety of the waveOut API. After i creating new waveOut handle, i have those threads: Thread 1: Buffers handling. Uses those API functions: waveOutPrepareHeader waveOutWrite waveOutUnprepareHeader Thread 2: Gui, Controller thread. Uses those API functions: waveOutPause waveOutRes...

DirectSound affects system volume on WinXP

Hello guys, I'm currently developing an audio engine that is used in voice network chat software. Everything is working fine - capture/playback/mixing channels. The problem is in using it under Windows XP. I've been getting user reports with information that their global system volume is set to zero after launching the application. I...

Maintaining encapsulation when wrapping native libraries

I'm writing a C# library to wrap a Win32 API (the waveOut... family of functions), and have reached a point where I'm unsure how to manage the interaction between different parts of my code without breaking encapsulation. So far, I have a setup like this: public class AudioDevice { ... private WaveOutSafeHandle hWaveOut; ......