T
- the runtime type of the AudioSystem which provides the
playback device used by the AbstractAudioRendererpublic abstract class AbstractAudioRenderer<T extends AudioSystem> extends AbstractRenderer<javax.media.format.AudioFormat>
Modifier and Type | Field and Description |
---|---|
protected T |
audioSystem
The AudioSystem which provides the playback device used by this
Renderer.
|
protected AudioSystem.DataFlow |
dataFlow
The flow of the media data (to be) implemented by this instance which is
either
AudioSystem.DataFlow#NOTIFY or
AudioSystem.DataFlow#PLAYBACK . |
static int |
JAVA_AUDIO_FORMAT_ENDIAN
The byte order of the running Java virtual machine expressed in the
endian term of
AudioFormat . |
static int |
NATIVE_AUDIO_FORMAT_ENDIAN
The native byte order of the hardware upon which this Java virtual
machine is running expressed in the endian term of
AudioFormat . |
inputFormat
EMPTY_CONTROLS
Modifier | Constructor and Description |
---|---|
protected |
AbstractAudioRenderer(java.lang.String locatorProtocol)
Initializes a new AbstractAudioRenderer instance which is to use
playback devices provided by an AudioSystem specified by the
protocol of the MediaLocators of the CaptureDeviceInfos
registered by the AudioSystem.
|
protected |
AbstractAudioRenderer(java.lang.String locatorProtocol,
AudioSystem.DataFlow dataFlow)
Initializes a new AbstractAudioRenderer instance which is to use
notification or playback devices provided by an AudioSystem
specified by the protocol of the MediaLocators of the
CaptureDeviceInfos registered by the AudioSystem.
|
protected |
AbstractAudioRenderer(T audioSystem)
Initializes a new AbstractAudioRenderer instance which is to use
playback devices provided by a specific AudioSystem.
|
protected |
AbstractAudioRenderer(T audioSystem,
AudioSystem.DataFlow dataFlow)
Initializes a new AbstractAudioRenderer instance which is to use
notification or playback (as determined by dataFlow) devices
provided by a specific AudioSystem.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.lang.Object[] |
getControls()
Implements
Controls.getControls() . |
protected javax.media.GainControl |
getGainControl()
Gets the GainControl, if any, which controls the volume level of
the audio (to be) played back by this Renderer.
|
javax.media.MediaLocator |
getLocator()
Gets the MediaLocator which specifies the playback device to be
used by this Renderer.
|
javax.media.Format[] |
getSupportedInputFormats() |
void |
open() |
protected void |
playbackDevicePropertyChange(java.beans.PropertyChangeEvent ev)
Notifies this instance that the value of the property of
audioSystem which identifies the default notification or
playback (as determined by dataFlow ) device has changed. |
void |
setLocator(javax.media.MediaLocator locator)
Sets the MediaLocator which specifies the playback device to be
used by this Renderer.
|
void |
setVolumeControl(VolumeControl volumeControl)
Sets the VolumeControl which is to control the volume (level) of
the audio (to be) played back by this Renderer.
|
static void |
useAudioThreadPriority()
Changes the priority of the current thread to a value which is considered
appropriate for the purposes of audio processing.
|
reset, setInputFormat, useThreadPriority
getControl, getControl, queryInterface, queryInterface
public static final int JAVA_AUDIO_FORMAT_ENDIAN
AudioFormat
.public static final int NATIVE_AUDIO_FORMAT_ENDIAN
AudioFormat
.protected final T extends AudioSystem audioSystem
protected final AudioSystem.DataFlow dataFlow
AudioSystem.DataFlow#NOTIFY
or
AudioSystem.DataFlow#PLAYBACK
.protected AbstractAudioRenderer(T audioSystem)
audioSystem
- the AudioSystem which is to provide the
playback devices to be used by the new instanceprotected AbstractAudioRenderer(T audioSystem, AudioSystem.DataFlow dataFlow)
audioSystem
- the AudioSystem which is to provide the
notification or playback devices to be used by the new instancedataFlow
- the flow of the media data to be implemented by the new
instance i.e. whether notification or playback devices provided by the
specified audioSystem are to be used by the new instance. Must
be either AudioSystem.DataFlow#NOTIFY
or
AudioSystem.DataFlow#PLAYBACK
.java.lang.IllegalArgumentException
- if the specified dataFlow is
neither AudioSystem.DataFlow.NOTIFY nor
AudioSystem.DataFlow.PLAYBACKprotected AbstractAudioRenderer(java.lang.String locatorProtocol)
locatorProtocol
- the protocol of the MediaLocators of the
CaptureDeviceInfo registered by the AudioSystem which
is to provide the playback devices to be used by the new instanceprotected AbstractAudioRenderer(java.lang.String locatorProtocol, AudioSystem.DataFlow dataFlow)
locatorProtocol
- the protocol of the MediaLocators of the
CaptureDeviceInfo registered by the AudioSystem which
is to provide the notification or playback devices to be used by the new
instancedataFlow
- the flow of the media data to be implemented by the new
instance i.e. whether notification or playback devices provided by the
specified audioSystem are to be used by the new instance. Must
be either AudioSystem.DataFlow#NOTIFY
or
AudioSystem.DataFlow#PLAYBACK
.java.lang.IllegalArgumentException
- if the specified dataFlow is
neither AudioSystem.DataFlow.NOTIFY nor
AudioSystem.DataFlow.PLAYBACKpublic void close()
public java.lang.Object[] getControls()
Controls.getControls()
. Gets the available
controls over this instance. AbstractAudioRenderer returns a
GainControl
if available.getControls
in interface javax.media.Controls
getControls
in class ControlsAdapter
protected javax.media.GainControl getGainControl()
public javax.media.MediaLocator getLocator()
public javax.media.Format[] getSupportedInputFormats()
public void open() throws javax.media.ResourceUnavailableException
javax.media.ResourceUnavailableException
protected void playbackDevicePropertyChange(java.beans.PropertyChangeEvent ev)
audioSystem
which identifies the default notification or
playback (as determined by dataFlow
) device has changed. The
default implementation does nothing so extenders may safely not call back
to their AbstractAudioRenderer super.ev
- a PropertyChangeEvent which specifies details about
the change such as the name of the property and its old and new valuespublic void setLocator(javax.media.MediaLocator locator)
locator
- the MediaLocator which specifies the playback
device to be used by this Rendererpublic void setVolumeControl(VolumeControl volumeControl)
volumeControl
- the VolumeControl which is to control the
volume (level) of the audio (to be) played back by this Rendererpublic static void useAudioThreadPriority()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.