Author: Chris P.Chris P. Date: Sep 18, 2008 11:13
On Thu, 18 Sep 2008 10:21:01 -0700, Rick Muething wrote:
> That sounds like it should do the trick. But I am having problems with the
> exact syntax and commands to set the GlobalFocus flag for the buffer.
> Can you prompt me with the sequence of actual commads to set the buffer
> flags and create the buffer with the global focus?
I haven't used the managed interfaces but it looks like you want the other
constructor that allows you to pass the BufferDescription as the second
parameter. There may be a problem however if the BufferDescription.Format
you create doesn't match the WaveFormat from the file, that part will have
to be tested.
wFormat = new WaveFormat()
wFormat.AverageBytesPerSecond = 'read these values from file
wFormat.BitsPerSample =
wFormat.BlockAlign =
wFormat.Channels =
wFormat.FormatTag = WaveFormatTag.Pcm
wFormat.SamplesPerSecond =
BuffDesc = new BufferDesc(wFormat)
devSelectedPlaybackDevice.SetCooperativeLevel(Me.Handle, CooperativeLevel.Priority)
|