• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bug in SampleUSBDriver/Shared/MIDIParser.cpp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in SampleUSBDriver/Shared/MIDIParser.cpp


  • Subject: Re: Bug in SampleUSBDriver/Shared/MIDIParser.cpp
  • From: Doug Wyatt <email@hidden>
  • Date: Mon, 16 Mar 2009 09:40:22 -0700

Hi,

Thanks for sharing that. I'm staring at this and to figure out why sysex isn't more broken in, say, the USB class driver which may use this source. It seems that what would happen on receipt of 0xf7, 0xf0 is:

- f7 triggers EmitPacket and returns
- f0 also falls into the in-sysex case, triggers a superfluous EmitPacket, but doesn't return
- starts a new sys-ex message


Doug


On Mar 16, 2009, at 5:25 , Daniel Mack wrote:

Hi,

there's a nasty bug in SampleUSBDriver/Shared/MIDIParser.cpp which
causes the state machine to get confused when 0xf7 and 0xf0 are fed into
the parser within a single message. Below is my patch - as reference for
others and hopefully to be merged upstream for furture releases of that
sample driver.


@@ -90,8 +92,10 @@
					// of whether one was sent (as per recommended practices)
					mPacket.data[mPacket.length++] = 0xF7;
					EmitPacket();
-					if (c == 0xF7)
+					if (c == 0xF7) {
+						mDataRequired = 0;
						return;			// nothing more to do
+					}
					// other status bytes start a new packet
				}

Daniel

_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Bug in SampleUSBDriver/Shared/MIDIParser.cpp
      • From: Daniel Mack <email@hidden>
References: 
 >Bug in SampleUSBDriver/Shared/MIDIParser.cpp (From: Daniel Mack <email@hidden>)

  • Prev by Date: What can cause an AUHAL sample timestamp to jump far into the future?
  • Next by Date: Re: Bug in SampleUSBDriver/Shared/MIDIParser.cpp
  • Previous by thread: Bug in SampleUSBDriver/Shared/MIDIParser.cpp
  • Next by thread: Re: Bug in SampleUSBDriver/Shared/MIDIParser.cpp
  • Index(es):
    • Date
    • Thread