1

I have couple of waveout handles in my code that playing in parallel.

Now i want to set different volume for each waveout handle.

There is a waveOutSetVolume win32api function: http://msdn.microsoft.com/en-us/library/ms713762%28v=vs.85%29.aspx

The problem is, that it completly ignores the handle I sending, it setting the volume for all waveout handles in my program.

How to make it set the volume to specific waveout handle?

DxCK
  • 4,402
  • 7
  • 50
  • 89

1 Answers1

1

I'm guessing you're writing to the same device.

To adjust the volume for each playback 'stream' scale the audio samples before writing them to the device.

Also keep in mind that is unnecessary to use two device handles to effectively mix your playback streams. It's trivial to do that in your code.

Nikos
  • 787
  • 1
  • 8
  • 19
  • I need real time mixing with minimum delay. Mixing/changing volume before writing to the device creating a noticeable delay. – DxCK Jun 08 '11 at 07:54
  • what is the latency you're aiming for? Changing the volume (by scaling the audio samples) doesn't require buffering so adds no latency. If you do mixing you can keep the buffer size small and minimize the latency. If you require absolute minimal latency have a look at Kernel Streaming. – Nikos Jun 08 '11 at 13:32