• 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: Unloading a sound driver
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unloading a sound driver


  • Subject: Re: Unloading a sound driver
  • From: Jeff Moore <email@hidden>
  • Date: Tue, 21 Jan 2003 16:34:45 -0800

There are at least two processes that I know of that are around for the entire login session that will retain references to all the audio devices on the system:

- The LoginWindow process will have a reference to all the audio devices in the system once an alert sound or an interface sound effect is played.

- The SystemUIServer process will also have references to all the devices if you use the volume keys on the keyboard or the menu bar volume widget.

As B.J. says, kextunload ought to force things to unload. I'm not certain as to how safe this option is. There may be issues if the device is actively doing IO.

Another way that is 100% safe is to log out, and log back in as ">console". This will drop you into the console shell without the window server running. From there, you can pretty much do whatever.

On Tuesday, January 21, 2003, at 03:43 PM, B.J. Buchalter wrote:

on 1/21/03 6:20 PM, Robert Penland at email@hidden wrote:

I read in a thread on this list back in June of 2002 that there was a bug in
place that wouldn't allow an audio driver to be unloaded because the system
was keeping an extra instance of the audio engine around. Has this issue
been addressed in any of the newer OS releases? I still seem to see a
problem some of the time. If I play a sound that is directed to my audio
driver, then even after it is over, the kextunload will fail, saying there
is an instance of my audio engine still open. If, however, I don't play a
sound after booting it will allow me to kextunload the driver. Is there a
prescribed method for getting a sound driver into a state that will allow it
to be kextunloaded?

In my experience, with current Mac OS X (ca 10.2 or 10.2.1), you can
kextunload your driver successfully. Even if apps are currently using it.
You *may*, in some instances, have to run kextunload twice in a row (once
gives an error, and the second time actually unloads the thing). Also, if
you have apps that are actively looking at the device (e.g. Audio/MIDI
Setup), they may crash [again, not always, but some times]. But even if they
do, all you have to do is relaunch. So, basically, it is not seamless yet,
but it is close enough to get work done.....

Best regards,


B.J. Buchalter

Metric Halo
M/S 601 - Building 8
Castle Point Campus
Castle Point, NY 12511-0601 USA
tel +1 845 831-8600
fax +1 603 250-2451

If you haven't heard ChannelStrip yet, you don't know what you're missing!

Check out SpectraFoo, ChannelStrip and Mobile I/O at http://www.mhlabs.com/

Download a 12 day demo from <http://www.mhlabs.com/demo/>
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.



--

Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Unloading a sound driver
      • From: "B.J. Buchalter" <email@hidden>
References: 
 >Re: Unloading a sound driver (From: "B.J. Buchalter" <email@hidden>)

  • Prev by Date: Re: Unloading a sound driver
  • Next by Date: Re: Unloading a sound driver
  • Previous by thread: Re: Unloading a sound driver
  • Next by thread: Re: Unloading a sound driver
  • Index(es):
    • Date
    • Thread