[PORTCLS] Fix audio stutter with official AC97 driver (#3225)
authorMichael Stamper <michaelstamper1@gmail.com>
Tue, 22 Sep 2020 13:49:34 +0000 (13:49 +0000)
committerGitHub <noreply@github.com>
Tue, 22 Sep 2020 13:49:34 +0000 (15:49 +0200)
commite45bacda07bd73be9e630fcd795640ad978c2c54
tree9fa9dee48c3447c59a7d449fb2a321e2265f0a65
parent0695ecbfd641306f9912af865010dbb0ccf20fbd
[PORTCLS] Fix audio stutter with official AC97 driver (#3225)

Replace call to AllocatedBufferSize(), with BufferSize().

Indeed (quoting https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/portcls/nf-portcls-idmachannel-buffersize ):

> The BufferSize() method returns the buffer size that was set by the previous call to IDmaChannel::SetBufferSize(). If SetBufferSize() has not been called since the IDmaChannel::AllocateBuffer() call, BufferSize returns the allocated buffer size. The DMA-channel object does not actually use this value internally. This value is maintained by the object to **allow its various clients to communicate the intended size of the buffer**.

And this is exactly what we want to do.
drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp