MIDI driver hibernation problem
MIDI driver hibernation problem
- Subject: MIDI driver hibernation problem
- From: Daniel Mack <email@hidden>
- Date: Tue, 25 Mar 2008 15:37:22 +0800
[posted a similar questions some weeks ago, but got no answer to date]
Hi,
How is sleep mode in MIDI drivers supposed to be handled properly? In
an implementation of a MIDI driver plugin, I see the following
sequence of calls when forcing the computer to sleep after the
MIDIServer was started and my driver was started:
[start of MIDIServer]
MyMIDIDriver::Start()
MyMIDIDriver::EnableSource(1)
[machine put to sleep]
MyMIDIDriver::Stop()
MyMIDIDriver::EnableSource(0)
[machine woke up]
MyMIDIDriver::Start()
After the machine is back from sleep, applications which have active
MIDI connections (MIDIMonitor in that case but others are equally
affected) won't see MIDI messages anymore and obviously, the reason
for that is the missing call to ::EnableSource(1) after ::Start().
As a solution, I tried to ignore calls to ::EnableSource() and just
send out the inbound messages in every case, but they data won't reach
the application - the MIDIServer to swallow them away.
Is there anything a driver can do to prevent this behaviour? Or is it
the application's responsibility to refresh all its MIDI connections
once it detected hibernation? When I manually deselect and reselect
the input source in MIDIMonitor, ::EnableSource(1) is called and
everything works fine again.
I see that on both 10.4.11 and 10.5.2.
Thanks for any pointer,
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