public abstract class AudioSystem2 extends AudioSystem
AudioSystem.DataFlow
FEATURE_AGC, FEATURE_DENOISE, FEATURE_ECHO_CANCELLATION, FEATURE_NOTIFY_AND_PLAYBACK_DEVICES, LOCATOR_PROTOCOL_AUDIORECORD, LOCATOR_PROTOCOL_AUDIOSILENCE, LOCATOR_PROTOCOL_JAVASOUND, LOCATOR_PROTOCOL_MACCOREAUDIO, LOCATOR_PROTOCOL_OPENSLES, LOCATOR_PROTOCOL_PORTAUDIO, LOCATOR_PROTOCOL_PULSEAUDIO, LOCATOR_PROTOCOL_WASAPI, PNAME_DENOISE, PNAME_ECHOCANCEL
FEATURE_REINITIALIZE, LOCATOR_PROTOCOL_ANDROIDCAMERA, LOCATOR_PROTOCOL_CIVIL, LOCATOR_PROTOCOL_DIRECTSHOW, LOCATOR_PROTOCOL_IMGSTREAMING, LOCATOR_PROTOCOL_MEDIARECORDER, LOCATOR_PROTOCOL_QUICKTIME, LOCATOR_PROTOCOL_VIDEO4LINUX2, PROP_DEVICES
Modifier | Constructor and Description |
---|---|
protected |
AudioSystem2(java.lang.String locatorProtocol,
int features) |
Modifier and Type | Method and Description |
---|---|
void |
addUpdateAvailableDeviceListListener(UpdateAvailableDeviceListListener listener)
Adds a listener which is to be notified before and after this
AudioSystem's method updateAvailableDeviceList() is
invoked.
|
protected static void |
bubbleUpUsbDevices(java.util.List<CaptureDeviceInfo2> devices)
Sorts a specific list of CaptureDeviceInfo2s so that the
ones representing USB devices appear at the beginning/top of the
specified list.
|
void |
didOpenStream()
Notifies this AudioSystem that an API client finished executing
a Pa_OpenStream-like function.
|
protected static void |
matchDevicesByName(java.util.List<CaptureDeviceInfo2> captureDevices,
java.util.List<CaptureDeviceInfo2> playbackDevices)
Attempts to reorder specific lists of capture and playback/notify
CaptureDeviceInfo2s so that devices from the same
hardware appear at the same indices in the respective lists.
|
protected void |
reinitialize()
Reinitializes this AudioSystem in order to bring it up to date
with possible changes in the list of available devices.
|
void |
removeUpdateAvailableDeviceListListener(UpdateAvailableDeviceListListener listener) |
protected abstract void |
updateAvailableDeviceList() |
void |
willOpenStream()
Notifies this AudioSystem that an API client will start
executing a Pa_OpenStream-like function.
|
createRenderer, createRenderer, getAudioInputStream, getAudioSystem, getAudioSystems, getDevice, getDevices, getFormat, getPropertyName, getSelectedDevice, isAutomaticGainControl, isDenoise, isEchoCancel, postInitialize, postInitializeSpecificDevices, preInitialize, propertyChange, setAutomaticGainControl, setCaptureDevices, setDenoise, setDevice, setEchoCancel, setPlaybackDevices
doInitialize, filterDeviceListByLocatorProtocol, getDeviceSystems, getFeatures, getFormat, getLocatorProtocol, getMediaType, getRendererClassName, initialize, initializeDeviceSystems, initializeDeviceSystems, invokeDeviceSystemInitialize, invokeDeviceSystemInitialize, toString
addPropertyChangeListener, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener
protected AudioSystem2(java.lang.String locatorProtocol, int features) throws java.lang.Exception
java.lang.Exception
public void addUpdateAvailableDeviceListListener(UpdateAvailableDeviceListListener listener)
Note: The AudioSystem2 class keeps a WeakReference to the specified listener in order to avoid memory leaks.
listener
- the UpdateAvailableDeviceListListener to be
notified before and after this AudioSystem's method
updateAvailableDeviceList() is invokedprotected static void bubbleUpUsbDevices(java.util.List<CaptureDeviceInfo2> devices)
devices
- the list of CaptureDeviceInfo2s to be
sorted so that the ones representing USB devices appear at the
beginning/top of the listpublic void didOpenStream()
protected static void matchDevicesByName(java.util.List<CaptureDeviceInfo2> captureDevices, java.util.List<CaptureDeviceInfo2> playbackDevices)
captureDevices
- playbackDevices
- protected void reinitialize() throws java.lang.Exception
DeviceSystem.initialize()
to reflect any changes on the
Java side. Invoked by the native side of this AudioSystem when
it detects that the list of available devices has changed.java.lang.Exception
- if there was an error during the invocation of
updateAvailableDeviceList() and
DeviceSystem.initialize()public void removeUpdateAvailableDeviceListListener(UpdateAvailableDeviceListListener listener)
protected abstract void updateAvailableDeviceList()
public void willOpenStream()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.