User Forum    :: Powered by YaBB
  « MIDI-OX User Forum - Closing MidiOutDevs needs a lot of time.... »
Welcome, Guest. Please Login or Register.
Apr 25th, 2024, 2:56pm


Home Home Help Help Search Search Members Members Login Login Register Register


   MIDI-OX User Forum
   MIDI-OX
   Questions and Discussion
(Moderator: Jamie OConnell)
   Closing MidiOutDevs needs a lot of time....
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Closing MidiOutDevs needs a lot of time....  (Read 1871 times)
TabSel
Member
**





   
Email

Posts: 13
Closing MidiOutDevs needs a lot of time....
« on: Aug 25th, 2001, 3:19pm »
Quote Quote Modify Modify

Hi all,
 
I am using a RME Hammerfall DSP cardbus card on a laptop here. MidiOX/Yoke does a great job routing/monitoring midi data on this machine, thanks again, jamie.
As I need to unplug the HDSP and plug in an ethernet/isdn cardbus card often, I quit MIDIOX, give the HDSP an "I want to unplug you"-signal (!?!), the unplug it and after a couple of seconds I get a a bluescreen....
 
I analyzed this and came to this: When I quit MIDIOX, there is a midiox.exe process still active! I think this is due to midiox releasing the midioutdevs. Now when I unplug the hdsp, midiox tries to release the hdsp midi ports and boom...
 
My question is: why does it take so long not just for midiox but for any application to release a midioutdev?
 
TabSel
IP Logged
Jamie OConnell
Administrator
*****






   
WWW Email

Gender: male
Posts: 2027
Re: Closing MidiOutDevs needs a lot of time....
« Reply #1 on: Aug 25th, 2001, 7:59pm »
Quote Quote Modify Modify

The time it takes to close MIDI devices is dependent on the drivers and the number of SysEx buffers allocated.
 
Actually the MIDI Output devices should be released pretty quickly, and it would take more time to release the MIDI Input devices.  The reason is because MIDI-OX supplies the input devices with all of the SysEx buffers.  Before an Input driver is closed, the application must issue a MIDI reset to tell the driver to give back the buffers.  The application must wait for the buffers to be released, and then free them before closing the port.
 
On my machine is doesn't take long at all to close MIDI-OX ports (it's fairly instantaneous). Perhaps there is some weird interaction with the Hammerfall?  Try closing the ports before closing MIDI-OX and see if that makes a difference (when you do this, is there still an instance in the task manager?)
« Last Edit: Aug 25th, 2001, 8:08pm by Jamie OConnell » IP Logged

--Jamie
Music is its own reward.

TabSel
Member
**





   
Email

Posts: 13
Re: Closing MidiOutDevs needs a lot of time....
« Reply #2 on: Aug 28th, 2001, 8:58am »
Quote Quote Modify Modify

I don't think that it has something to do with the hammerfall. In fact, it occurs on other machines as well even on those, that do not have any other midi device driver than yokes...
 
Whenever midiox closes its ports, for example when loading another (or the same....) midi device setup or quitting midiox, it takes a lot of time and the amount of time is dependant on the number of I/Os are to be closed...
 
Its not a "bug" or anything with midiox. The same occurs within reaktor for example. When I insert a midiport to be used, there is no delay, but whenever I remove the device again, it takes about a few seconds for reaktor to have the device removed (closed). Wondering!
 
TabSel
IP Logged
Jamie OConnell
Administrator
*****






   
WWW Email

Gender: male
Posts: 2027
Re: Closing MidiOutDevs needs a lot of time....
« Reply #3 on: Aug 28th, 2001, 10:42pm »
Quote Quote Modify Modify

I wasn't suggesting that there was a problem with the Hammerfall, only that there might be some strange interaction occuring, but apparently that's not the case. I am still wondering a few things:

  • How many buffers are assigned to each device?
  • When you close the ports before exiting MIDI-OX, does it still appear in the task manager?
  • Is this happening on Windows 2000?

IP Logged

--Jamie
Music is its own reward.

TabSel
Member
**





   
Email

Posts: 13
Re: Closing MidiOutDevs needs a lot of time....
« Reply #4 on: Aug 29th, 2001, 2:23am »
Quote Quote Modify Modify

Thanks Jamie for your efforts.
to answer your questions:
* yes, running on w2k
* no, midiox.exe-process quits immediately when closing the ports before quitting midiox
* how may I determine the number of buffers assigned to each device, to help you?
 
It really isn't that much of a problem once I get used to wait a little before unplugging a card prior to plug in another, so please don't spend too much of your time, if any....
IP Logged
Jamie OConnell
Administrator
*****






   
WWW Email

Gender: male
Posts: 2027
Re: Closing MidiOutDevs needs a lot of time....
« Reply #5 on: Aug 29th, 2001, 9:40am »
Quote Quote Modify Modify

on Aug 29th, 2001, 2:23am, TabSel wrote:

* how may I determine the number of buffers assigned to each device, to help you?

The number of buffers that need to be allocated and freed, can be accessed in 2 places: the SysEx View  SysEx | Configure...  and the main menu Options | Configure Buffers.  In both cases, the Num field controls the number of buffers allocated.  We recommend 16 - 32 buffers.
IP Logged

--Jamie
Music is its own reward.

TabSel
Member
**





   
Email

Posts: 13
Re: Closing MidiOutDevs needs a lot of time....
« Reply #6 on: Aug 29th, 2001, 1:34pm »
Quote Quote Modify Modify

I did not alter the default settings by installation:
16 In- and out Buffer with 256 Bytes, 60ms Delay between buffers and also 60ms after F7...
 
The full amount of supported yoke I/O devices are in use, plus the two hammerfall I/Os if the card's plugged in...
 
Did some testing
started each test with neither In- nor Out-port, changed settings and meassured the time until the MIDI port activity window got refreshed to reflect the new amount of I/O ports (opening the devices - (a) ) and then changed settings back to no port at all and meassured this time again (closing ports - (b) )
 
Test 1) Setup devices to one Input Port only
(a) no delay noticed, (b) about a second 'til refresh!
 
2) SetUp devices to one output port only
(a)  no delay noticed, (b) no delay noticed
 
3) SetUp devices to use all eight yoke input devices
(a) no delay noticed, (b) about 10 seconds to release all ports...
 
TabSel
IP Logged
Jamie OConnell
Administrator
*****






   
WWW Email

Gender: male
Posts: 2027
Re: Closing MidiOutDevs needs a lot of time....
« Reply #7 on: Aug 29th, 2001, 5:37pm »
Quote Quote Modify Modify

Thanks for the data.  This agrees with what I see under Win 2000 also.  I usually don't hook up anymore input devices than I'm using, and that reduces the time needed.
 
Interestingly, attaching and detaching the same devices under Win 98 is almost instananeous: clearly the MME stuff under Windows NT OS's is a different implementation  Shocked from 9x.
 
I do appreciate the report though, and I may add some code to keep the app visible until it's actually ready to exit, so that you don't get hosed by the Task Manager.
IP Logged

--Jamie
Music is its own reward.

Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »


MIDI-OX User Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.