public class MacCoreaudioRenderer extends AbstractAudioRenderer<MacCoreaudioSystem>
audioSystem, dataFlow, JAVA_AUDIO_FORMAT_ENDIAN, NATIVE_AUDIO_FORMAT_ENDIAN
inputFormat
EMPTY_CONTROLS
Constructor and Description |
---|
MacCoreaudioRenderer()
Initializes a new MacCoreaudioRenderer instance.
|
MacCoreaudioRenderer(boolean enableVolumeControl)
Initializes a new MacCoreaudioRenderer 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 MacCoreaudio 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
MacCoreaudio device represented by this Renderer.
|
void |
setLocator(javax.media.MediaLocator locator)
Sets the MediaLocator which specifies the device index of the
MacCoreaudio device to be used by this instance for rendering.
|
void |
start()
Starts the rendering process.
|
void |
stop()
Stops the rendering process.
|
void |
writeOutput(byte[] buffer,
int bufferLength)
Writes the data received to the buffer give in arguments, which is
provided by the CoreAudio library.
|
getControls, getGainControl, getLocator, setVolumeControl, useAudioThreadPriority
reset, setInputFormat, useThreadPriority
getControl, getControl, queryInterface, queryInterface
public MacCoreaudioRenderer()
public MacCoreaudioRenderer(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<MacCoreaudioSystem>
public java.lang.String getName()
public javax.media.Format[] getSupportedInputFormats()
getSupportedInputFormats
in interface javax.media.Renderer
getSupportedInputFormats
in class AbstractAudioRenderer<MacCoreaudioSystem>
public void open() throws javax.media.ResourceUnavailableException
open
in interface javax.media.PlugIn
open
in class AbstractAudioRenderer<MacCoreaudioSystem>
javax.media.ResourceUnavailableException
- if the MacCoreaudio 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<MacCoreaudioSystem>
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<MacCoreaudioSystem>
locator
- a MediaLocator which specifies the device index
of the MacCoreaudio device to be used by this instance for renderingpublic void start()
public void stop()
public void writeOutput(byte[] buffer, int bufferLength)
buffer
- The buffer to fill in provided by the CoreAudio library.bufferLength
- The length of the buffer provided.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.