When starting the SequencerDemo in debug mode, I get an error as soon as I try to play a loaded midi file:
at MidiFileProperties.AssertValid() ... (248)
It's in this code, the last line "Debug.Assert(Division >= PpqnClock.PpqnMinValue);":
[Conditional("DEBUG")]
private void AssertValid()
{
if(trackCount > 1)
{
Debug.Assert(Format == 1 || Format == 2);
}
if(IsSmpte(Division))
{
Debug.Assert(SequenceType == SequenceType.Smpte);
}
else
{
Debug.Assert(SequenceType == SequenceType.Ppqn);
Debug.Assert(Division >= PpqnClock.PpqnMinValue);
}
}
Commenting out this line solves the problem for me. I don't really understand what's going on on this part of the code. I just wanted to give some feedback.
Just a side note. I have seen, that the demo code still comes with a target of .Net framework 2. Is there a reason for v2? Could I also go with v4.5?