[wdmaudiodev] Re: Vista AVStream MIDI input

  • From: Matt Gonzalez <matt@xxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 24 May 2007 16:46:58 -0700

It looks like I just needed to implement my own software FIFO; that way, if KS does not provide a buffer, I can keep the data in my own FIFO until a buffer is available. Never mind.


Matt Gonzalez wrote:
I'm having a problem with legacy MIDI input with AVStream on Windows Vista.

The driver works fine on Windows XP. I receive MIDI data from the hardware, assemble it into a short MIDI message, and then request the leading edge stream pointer for my pin. KS gives me a 20 byte buffer, which I fill with a KSMUSICFORMAT structure followed by the MIDI data. Since KSMUSICFORMAT needs to be DWORD aligned, I set the byte count in the KSMUSICFORMAT to the actual MIDI message size and the DataUsed member of the leading edge stream pointer to the total buffer size, rounded up to the next DWORD.

On Windows Vista, the problem is that requesting that the leading edge stream pointer for my pin fails on occasion, so I have nowhere to store the incoming data.

I could buffer the data internally until my process handler is called. On Vista, KS provides 264 byte buffers, so I thought I could use the larger buffers to store multiple MIDI messages. The problem here is that I have not been able to put more than one MIDI message into a buffer at a time. I've tried doing this:

KSMUSICFORMAT
three byte MIDI messageof
KSMUSICFORMAT
three byte MIDI message

with each of the segments DWORD aligned, for a total of 24 bytes. My test application only receives the first message.

I tried some other approaches with no success.  So I'm a little stumped.



******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: