Top Description Constructors Methods
javax.sound.sampled.spi

public abstract Class MixerProvider

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.media.sound.DirectAudioDeviceProvider, com.sun.media.sound.PortMixerProvider, com.sun.media.sound.SoftMixingMixerProvider
Imports
java.util.Arrays, javax.sound.sampled.Mixer

A provider or factory for a particular mixer type. This mechanism allows the implementation to determine how resources are managed in creation / management of a mixer.
Author
Kara Kytle
Since
1.3

Constructor Summary

AccessConstructor and Description
protected
MixerProvider()

Constructor for subclasses to call.

Method Summary

Modifier and TypeMethod and Description
public abstract Mixer

Returns:

mixer instance
getMixer
(Mixer.Info
an info object that describes the desired mixer, or null for the default mixer
info
)

Obtains an instance of the mixer represented by the info object.

public abstract Mixer.Info[]

Returns:

a set of mixer info objects
getMixerInfo
()

Obtains the set of info objects representing the mixer or mixers provided by this MixerProvider.

public boolean

Returns:

true if the specified mixer is supported, otherwise false
isMixerSupported
(final Mixer.Info
an info object that describes the mixer for which support is queried
info
)

Indicates whether the mixer provider supports the mixer represented by the specified mixer info object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MixerProviderback to summary
protected MixerProvider()

Constructor for subclasses to call.

Method Detail

getMixerback to summary
public abstract Mixer getMixer(Mixer.Info info)

Obtains an instance of the mixer represented by the info object. If null is passed, then the default mixer will be returned.

The full set of the mixer info objects that represent the mixers supported by this MixerProvider may be obtained through the getMixerInfo method. Use the isMixerSupported method to test whether this MixerProvider supports a particular mixer.

Parameters
info:Mixer.Info

an info object that describes the desired mixer, or null for the default mixer

Returns:Mixer

mixer instance

Exceptions
IllegalArgumentException:
if the info object specified does not match the info object for a mixer supported by this MixerProvider, or if this MixerProvider does not have default mixer, but default mixer has been requested
See Also
getMixerInfo(), isMixerSupported(Mixer.Info)
getMixerInfoback to summary
public abstract Mixer.Info[] getMixerInfo()

Obtains the set of info objects representing the mixer or mixers provided by this MixerProvider.

The isMixerSupported method returns true for all the info objects returned by this method. The corresponding mixer instances for the info objects are returned by the getMixer method.

Returns:Mixer.Info[]

a set of mixer info objects

See Also
getMixer(Mixer.Info), isMixerSupported(Mixer.Info)
isMixerSupportedback to summary
public boolean isMixerSupported(final Mixer.Info info)

Indicates whether the mixer provider supports the mixer represented by the specified mixer info object.

The full set of mixer info objects that represent the mixers supported by this MixerProvider may be obtained through the getMixerInfo method.

Parameters
info:Mixer.Info

an info object that describes the mixer for which support is queried

Returns:boolean

true if the specified mixer is supported, otherwise false

Exceptions
NullPointerException:
if info is null
See Also
getMixerInfo()