none
WaveRT Audio Buffer Size RRS feed

  • Question

  • Is it possible to get the Port class driver to increase the value of requestedSize that it passes to IMiniportWaveRTStream::AllocateAudioBuffer, this seems to provide an upper limit on the size of the buffer shared between the DMA engine and the Windows audio engine. When using the WaveRT model I always get a size of 0x3000 or 60ms of audio buffer. I'd like to increase this size due to the latency of the "hardware", the driver is running on a virtual machine...
    Thursday, May 2, 2013 1:32 PM

Answers

  • The interface IMiniportWaveRTStream supports also the GetHWLatency method. The OS uses this info to make sure the buffer is big enough for the underline h/w latency.

    Thursday, May 2, 2013 3:13 PM

All replies

  • Which os version and architecture?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, May 2, 2013 2:26 PM
  • The interface IMiniportWaveRTStream supports also the GetHWLatency method. The OS uses this info to make sure the buffer is big enough for the underline h/w latency.

    Thursday, May 2, 2013 3:13 PM
  • Vista, Win7 and Win8 32 and 64bit. I'm mainly testing on WIn7 at the moment though.

    Friday, May 3, 2013 1:39 PM
  • As far as I can tell on Win7 x64 at least, GetHWLatency is called after AllocateAudioBuffer and therefore has no effect on the size of the audio buffer.
    Friday, May 3, 2013 1:52 PM
  • yes, you are correct. it is called after allocate-buffer to make sure the returned buffer size is correct in relation to your h/w latency.

    About the buffer size, yes, you can allocate a bigger buffer that meets your h/w needs. And you should return that length to the caller.

    Friday, May 3, 2013 6:06 PM
  • Thanks that seems to do the trick. I think I'd previously tried that but set it to too large a value. Is there a maximum supported buffer size.
    Wednesday, May 8, 2013 3:26 PM