[wdmaudiodev] Re: SYSVAD source code has changed , not for the best.

  • From: Jerry Evans <jerry@xxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 30 May 2018 17:19:26 +0100

Cher Vincent, 

some of the comments you have identified are amusing/worrying in equal degree. 
But perhaps a lighter touch when passing judgement here? We all appreciate the 
fun and frustration of audio on Windows, second only to the consistently 
excellent help afforded by MVE. Just a thought ...

Jerry.

Sent from my iPad

On 30 May 2018, at 16:17, Matthew van Eerde (Redacted sender 
"Matthew.van.Eerde" for DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:

File an issue and create a pull request.
 
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Vincent Burel (VB-Audio) <vincent.burel@xxxxxxxxxxxx>
Sent: Wednesday, May 30, 2018 8:10:06 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] SYSVAD source code has changed , not for the best.
 
Hello,
 
SYSVAD Sample Code changed since January 2018 and I don’t know why , except 
to bring confusion !?
https://github.com/Microsoft/Windows-driver-samples/blob/master/audio/sysvad/EndpointsCommon/minwavertstream.cpp
 
Today the code is like below, but for a circular buffer, we need to manage 2 
buffer areas max (like it was before), not an undefined number of buffer 
part… what is that ?
 
VOID CMiniportWaveRTStream::WriteBytes( _In_ ULONG ByteDisplacement)
{
    //this first line just says “I’m not a DSP programmer, I’ve no clue about 
real time general rules”.
    ULONG bufferOffset = m_ullLinearPosition % m_ulDmaBufferSize;
 
    // this comment below is just incredible !
    // Normally this will loop no more than once for a single wrap, but if
    // many bytes have been displaced then this may loops many times.
    while (ByteDisplacement > 0)
    {
        ULONG runWrite = min(ByteDisplacement, m_ulDmaBufferSize - 
bufferOffset);
        m_ToneGenerator.GenerateSine(m_pDmaBuffer + bufferOffset, runWrite);
       // again a fucking div for what ? or BufferOffset goes back to zero or 
its finished
        bufferOffset = (bufferOffset + runWrite) % m_ulDmaBufferSize;
        ByteDisplacement -= runWrite;
    }
 
}
 
it’s a nightmare ! I’m going to wake up…
Regards
Vincent Burel

Other related posts: