WavePCI Audio and GetPosition RRS feed

  • Question

  • In a WavePCI audio driver I am  developing for a customer I have since learned that the customers audio application never stops. This means that ResetDMA gets called just once at the very beginning. The application constantly rearranges playlists (well, whenever the user presses the right buttons) so a new or modified playlist just means that the previous one drains or occasionally the driver gets a RevokeMappings(). I have compared this for instance with WinAmp which seems to run the same way. I only ever get a ResetDMA if I actually start and stop WinAmp.

    Now in my customers case, the application program could run on for days, maybe even longer. My hardware register for stream position is thirty-two bit so what implication does this behaviour have? Must the stream-position counter always run linearly, wrapping at 2**32 - 1 or can I reset it to zero if for instance I currently find I have no mappings outstanding (e.g. in RevokeMappings() or ReleaseUsedMappings().

    The reason I ask is that I have noticed the only calls that regularly come from the system are GetPosition(). Anytime the system hangs (I am still in the debugging phase) I just see windows constantly sending the driver calls to GetPostion(). If the driver and hardware think they are finished there are no more interrupts and hence no more calls to GetNewMappings(). But windows audio is stubborn about the GetPosition(), it just refuses to see anything else.

    What is Windows looking for here? Just signs of movement in the audio stream or absolute position values derived from current Mapping, number of previous Mappings, Mapping sizes etc. etc.  

    Wednesday, July 24, 2013 4:45 PM