org.qtunes.speaker.spi.justeport.javasoundspi
Class AirtunesMixerProvider

java.lang.Object
  extended by javax.sound.sampled.spi.MixerProvider
      extended by org.qtunes.speaker.spi.justeport.javasoundspi.AirtunesMixerProvider

public class AirtunesMixerProvider
extends MixerProvider

A MixerProvider that can be used to access AirtunesMixer objects via the javax.sound.sampled.spi approach. Unlike other mixers, Airtunes receivers are not discovered by the audio system on loading. Instead the register() and unregister() factory methods can be called to manually add or remove Mixers that are discovered.


Constructor Summary
AirtunesMixerProvider()
           
 
Method Summary
 Mixer getMixer(Mixer.Info info)
          Return a new AirtunesMixer that matches the specified AirtunesInfo.
 Mixer.Info[] getMixerInfo()
          Return the list of AirtunesInfo objects that have been manually registered with this class
static void register(AirtunesInfo host)
          Register a new Airtunes receiver
static void register(String host)
          Register a new Airtunes receiver
static void unregister(AirtunesInfo host)
          Deregiser an Airtunes receiver
static void unregister(String host)
          Deregister an Airtunes receiver
 
Methods inherited from class javax.sound.sampled.spi.MixerProvider
isMixerSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AirtunesMixerProvider

public AirtunesMixerProvider()
Method Detail

register

public static void register(String host)
Register a new Airtunes receiver

Parameters:
host - the Airtunes address

unregister

public static void unregister(String host)
Deregister an Airtunes receiver

Parameters:
host - the Airtunes address

register

public static void register(AirtunesInfo host)
Register a new Airtunes receiver

Parameters:
host - the Airtunes address

unregister

public static void unregister(AirtunesInfo host)
Deregiser an Airtunes receiver

Parameters:
host - the Airtunes host

getMixerInfo

public Mixer.Info[] getMixerInfo()
Return the list of AirtunesInfo objects that have been manually registered with this class

Specified by:
getMixerInfo in class MixerProvider

getMixer

public Mixer getMixer(Mixer.Info info)
Return a new AirtunesMixer that matches the specified AirtunesInfo.

Specified by:
getMixer in class MixerProvider
Parameters:
info - an AirtunesInfo object
Throws:
IllegalArgumentException - if the parameter is of the wrong type