public class PortAudioRenderer extends AbstractAudioRenderer<PortAudioSystem>
audioSystem, dataFlow, JAVA_AUDIO_FORMAT_ENDIAN, NATIVE_AUDIO_FORMAT_ENDIAN
inputFormat
EMPTY_CONTROLS
Constructor and Description |
---|
PortAudioRenderer()
Initializes a new PortAudioRenderer instance.
|
PortAudioRenderer(boolean enableVolumeControl)
Initializes a new PortAudioRenderer instance which is to either
perform playback or sound a notification.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this PlugIn.
|
java.lang.String |
getName()
Gets the descriptive/human-readable name of this JMF plug-in.
|
javax.media.Format[] |
getSupportedInputFormats()
Gets the list of JMF Formats of audio data which this
Renderer is capable of rendering.
|
void |
open()
Opens the PortAudio device and output stream represented by this instance
which are to be used to render audio.
|
protected void |
playbackDevicePropertyChange(java.beans.PropertyChangeEvent ev)
Notifies this instance that the value of the
AudioSystem#PROP_PLAYBACK_DEVICE property of its associated
AudioSystem has changed. |
int |
process(javax.media.Buffer buffer)
Renders the audio data contained in a specific Buffer onto the
PortAudio device represented by this Renderer.
|
void |
setLocator(javax.media.MediaLocator locator)
Sets the MediaLocator which specifies the device index of the
PortAudio device to be used by this instance for rendering.
|
void |
start()
Starts the rendering process.
|
void |
stop()
Stops the rendering process.
|
getControls, getGainControl, getLocator, setVolumeControl, useAudioThreadPriority
reset, setInputFormat, useThreadPriority
getControl, getControl, queryInterface, queryInterface
public PortAudioRenderer()
public PortAudioRenderer(boolean enableVolumeControl)
playback
- true if the new instance is to perform playback
or false if the new instance is to sound a notificationpublic void close()
close
in interface javax.media.PlugIn
close
in class AbstractAudioRenderer<PortAudioSystem>
public java.lang.String getName()
public javax.media.Format[] getSupportedInputFormats()
getSupportedInputFormats
in interface javax.media.Renderer
getSupportedInputFormats
in class AbstractAudioRenderer<PortAudioSystem>
public void open() throws javax.media.ResourceUnavailableException
open
in interface javax.media.PlugIn
open
in class AbstractAudioRenderer<PortAudioSystem>
javax.media.ResourceUnavailableException
- if the PortAudio device or output
stream cannot be created or openedprotected void playbackDevicePropertyChange(java.beans.PropertyChangeEvent ev)
AudioSystem#PROP_PLAYBACK_DEVICE
property of its associated
AudioSystem has changed.playbackDevicePropertyChange
in class AbstractAudioRenderer<PortAudioSystem>
ev
- a PropertyChangeEvent which specifies details about
the change such as the name of the property and its old and new valuespublic int process(javax.media.Buffer buffer)
buffer
- the Buffer which contains the audio data to be
renderedpublic void setLocator(javax.media.MediaLocator locator)
setLocator
in class AbstractAudioRenderer<PortAudioSystem>
locator
- a MediaLocator which specifies the device index
of the PortAudio device to be used by this instance for renderingpublic void start()
public void stop()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.