[wdmaudiodev] Re: Return value for IMiniportWaveRTStream::AllocateAudioBuffer method

  • From: Surabhi Ghaisas <ghaisas.surabhi@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Fri, 19 Dec 2014 14:29:10 +0530

Thanks Mathew.

regards,
Surabhi

On Thu, Dec 18, 2014 at 11:09 PM, Matthew van Eerde <
Matthew.van.Eerde@xxxxxxxxxxxxx> wrote:
>
>  Hmm… it appears MSDN is incorrect.
>
>
>
> KSPROPERTY_RTAUDIO_BUFFER
>
>
> http://msdn.microsoft.com/en-us/library/windows/hardware/ff537370(v=vs.85).aspx
>
>
>
> IMiniportWaveRTStream::AllocateAudioBuffer
>
>
> http://msdn.microsoft.com/en-us/library/windows/hardware/ff536744(v=vs.85).aspx
>
>
>
> Both of these claim it is OK to return a smaller buffer than requested.
> That is not correct.
>
>
>
> The rule is you have to allocate a buffer that is *at least as big* as
> requested.
>
>
>
> It is fine to allocate a bigger buffer and return success.
>
>
>
> But if you can only allocate a smaller buffer, Windows won’t use it.
>
>
>
> *From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:
> wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of *Surabhi Ghaisas
> *Sent:* Wednesday, December 17, 2014 9:30 PM
> *To:* wdmaudiodev@xxxxxxxxxxxxx
> *Subject:* [wdmaudiodev] Return value for
> IMiniportWaveRTStream::AllocateAudioBuffer method
>
>
>
> Hi,
>
>
>
> In case we can't allocate the requested buffer size in AllocateAudioBuffer
> method as per the call description we are allocating smaller buffer and
> returning it in requested size. However we are not getting next calls for
> stream as expected.
>
>
>
> Currently on allocating smaller buffer we are returning STATUS_SUCCESS
> from AllocateAudioBuffer. Do we need to return some other value if the
> allocated size is smaller than requested size?
>
>
>
> regards,
>
> Surabhi
>

Other related posts: