Click here to Skip to main content
15,166,099 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff11-Oct-12 9:21
MemberJumpin' Jeff11-Oct-12 9:21 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6911-Oct-12 11:40
professionalDaveyM6911-Oct-12 11:40 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff12-Oct-12 2:42
MemberJumpin' Jeff12-Oct-12 2:42 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6911-Oct-12 11:51
professionalDaveyM6911-Oct-12 11:51 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff11-Oct-12 15:34
MemberJumpin' Jeff11-Oct-12 15:34 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff11-Oct-12 11:20
MemberJumpin' Jeff11-Oct-12 11:20 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6911-Oct-12 11:52
professionalDaveyM6911-Oct-12 11:52 
GeneralRe: C# MIDI controller interface. Pin
DaveyM692-Nov-12 9:54
professionalDaveyM692-Nov-12 9:54 
I've done some more investigation into this and have found others that have had this problem with different hardware.

The problem seems to be that some drivers block on the Reset call until all the MIDIHDRs are returned. This means that UnprepareHeader cannot be called on any buffer (during a reset only) until they have all been returned to windows, so can't be done in the callback!

I have managed to code around this by setting an IsResetting flag when Reset is called, having an IsReturned flag on each buffer that is set it is returned and when the last buffer is returned - launch a thread (so the callback returns!) that unprepares and frees the buffers. A bit of a pain but it appears to work and should do on all systems Smile | :)
Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff2-Nov-12 13:23
MemberJumpin' Jeff2-Nov-12 13:23 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff16-Nov-12 6:36
MemberJumpin' Jeff16-Nov-12 6:36 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6916-Nov-12 7:22
professionalDaveyM6916-Nov-12 7:22 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff16-Nov-12 14:17
MemberJumpin' Jeff16-Nov-12 14:17 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6916-Nov-12 21:32
professionalDaveyM6916-Nov-12 21:32 
QuestionC# 2008 with linq reference problem Pin
dcof5-Sep-12 13:17
Memberdcof5-Sep-12 13:17 
AnswerRe: C# 2008 with linq reference problem Pin
Shameel5-Sep-12 21:35
professionalShameel5-Sep-12 21:35 
QuestionLoosley Coupled Events Pin
Member 81371055-Sep-12 11:21
MemberMember 81371055-Sep-12 11:21 
AnswerRe: Loosley Coupled Events Pin
Pete O'Hanlon5-Sep-12 11:27
mvaPete O'Hanlon5-Sep-12 11:27 
GeneralRe: Loosley Coupled Events Pin
Member 81371055-Sep-12 11:30
MemberMember 81371055-Sep-12 11:30 
GeneralRe: Loosley Coupled Events Pin
Pete O'Hanlon5-Sep-12 11:33
mvaPete O'Hanlon5-Sep-12 11:33 
GeneralRe: Loosley Coupled Events Pin
Member 81371055-Sep-12 11:35
MemberMember 81371055-Sep-12 11:35 
GeneralRe: Loosley Coupled Events Pin
Pete O'Hanlon5-Sep-12 11:44
mvaPete O'Hanlon5-Sep-12 11:44 
GeneralRe: Loosley Coupled Events Pin
Member 81371055-Sep-12 11:46
MemberMember 81371055-Sep-12 11:46 
GeneralRe: Loosley Coupled Events Pin
SledgeHammer015-Sep-12 12:53
MemberSledgeHammer015-Sep-12 12:53 
GeneralRe: Loosley Coupled Events Pin
Member 81371055-Sep-12 12:56
MemberMember 81371055-Sep-12 12:56 
GeneralRe: Loosley Coupled Events Pin
SledgeHammer015-Sep-12 13:05
MemberSledgeHammer015-Sep-12 13:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.