Sc0tty

Hi,

I'm working with the WinAudio sample trying to route sound from capture devices to render devices and observe that when the Speakers device is configured for 5.1 surround, WinAudio fails to stream from the capture devices. The WinAudio sample calls GetMixFormat on the capture device (2 channel device) and tries to initialize the rendering stream (on a 6 channel device -- the speakers) with the returned WAVEFORMATEX structure, which fails with AUDCLNT_E_UNSUPPORTED_FORMAT. If the code is modified to initialize the stream with the value returned by calling GetMixFormat on the rendering device, it succeeds and audio is routed from the capture device to the speakers, but the resulting sound is just a buzz as the code is not suitable to convert the packets accordingly. Is there a straightforward way to convert the sound from the 2 channel capture device to be played on the 6 channel speaker configuration

Thanks,

Scott



Re: Vista Pro-Audio Application Development Rendering Mono Capture Device to Stereo Stream

Maurits

One possibility is to go frame-by-frame, copying the two channels you have into the first two channels of the speaker buffer, and filling the other four channels with silence. The speaker buffer will necessarily be three times the size of the capture buffer.

What wave format are you capturing in What happens if you try to initialize the speaker stream with a stereo format





Re: Vista Pro-Audio Application Development Rendering Mono Capture Device to Stereo Stream

Sc0tty

Hello Maurits,

Thanks for the resonse.

When I try to initialize the render stream with the stereo format by using the WAVEFORMATEX structure returned from the GetMixFormat call on the stereo capture device, the initialize call fails with AUDCLNT_E_UNSUPPORTED_FORMAT.

I was able to implement the frame by frame copy of data to the render buffer, skipping 4 channels worth of bytes after every copy and it seems to work -- is that really the best way It seems like there should be a way to initialize the render stream for a 6 channel device with only two channels to match the desired capture stream, just not the other way around.

Thanks,

Scott





Re: Vista Pro-Audio Application Development Rendering Mono Capture Device to Stereo Stream

Sc0tty

FYI - I have now found that when the "Speaker Fill" enhancement is enabled, the initialize call will succeed even when it is called with a structure that has fewer channels than the render device itself.

-Scott





Re: Vista Pro-Audio Application Development Rendering Mono Capture Device to Stereo Stream

Maurits

Interesting. Who provides the "Speaker Fill" enhancement What driver are you using





Re: Vista Pro-Audio Application Development Rendering Mono Capture Device to Stereo Stream

Sc0tty

I am using the default Microsoft High Definition Audio driver.