public interface DeviceManager
| Modifier and Type | Method and Description |
|---|---|
void |
add(@NotNull AudioDevice device)
Adds new device
|
void |
clear(@Nullable DeviceType type)
Removes all devices
|
SourceGroup |
createSourceGroup(@Nullable DeviceType type)
Creates a new source group
todo: doc
|
<T extends AudioDevice> |
getDevices(@Nullable DeviceType type)
Returns immutable collection of devices by type (if type is empty then all devices will be returned)
|
InputDevice |
openInputDevice(@Nullable javax.sound.sampled.AudioFormat format,
@NotNull Params params)
Opens a new input device from config device name
|
OutputDevice<AlSource> |
openOutputDevice(@Nullable javax.sound.sampled.AudioFormat format,
@NotNull Params params)
Opens a new output device from config device name
|
void |
remove(@NotNull AudioDevice device)
Removes the device
|
void |
replace(@Nullable AudioDevice oldDevice,
@NotNull AudioDevice newDevice)
Replaces old device with the new one
|
void add(@NotNull
@NotNull AudioDevice device)
device - the devicevoid replace(@Nullable
@Nullable AudioDevice oldDevice,
@NotNull
@NotNull AudioDevice newDevice)
oldDevice - old device
if null first device will be replacednewDevice - new devicevoid remove(@NotNull
@NotNull AudioDevice device)
device - the devicevoid clear(@Nullable
@Nullable DeviceType type)
type - the device type (if type is empty then all devices will be removed)<T extends AudioDevice> java.util.Collection<T> getDevices(@Nullable @Nullable DeviceType type)
type - the device typeSourceGroup createSourceGroup(@Nullable @Nullable DeviceType type)
InputDevice openInputDevice(@Nullable @Nullable javax.sound.sampled.AudioFormat format, @NotNull @NotNull Params params) throws java.lang.Exception
format - audio format
if null current ServerInfo voice format will be usedparams - device params, may be different depending on DeviceFactoryjava.lang.Exception - if device cannot be openOutputDevice<AlSource> openOutputDevice(@Nullable @Nullable javax.sound.sampled.AudioFormat format, @NotNull @NotNull Params params) throws java.lang.Exception
format - audio format
if null current ServerInfo voice format will be usedparams - device params, may be different depending on DeviceFactoryjava.lang.Exception - if device cannot be open