public interface AudioDevice
| Modifier and Type | Method and Description |
|---|---|
void |
addFilter(AudioFilter filter)
Adds the filter to device with normal priority
|
void |
addFilter(AudioFilter filter,
AudioFilter.Priority priority)
Adds the filter to device with priority
|
void |
close()
Closes the device
|
int |
getBufferSize()
Gets the device buffer size calculated from format
|
java.util.Collection<AudioFilter> |
getFilters()
Gets the device filters
|
java.util.Optional<javax.sound.sampled.AudioFormat> |
getFormat()
Gets the device audio format
|
java.lang.String |
getName()
Gets the device name
|
java.util.Optional<Params> |
getParams()
Gets the device params
|
DeviceType |
getType()
Gets the device type
|
boolean |
isOpen() |
void |
open(@NotNull javax.sound.sampled.AudioFormat format,
@NotNull Params params)
Opens the device
|
default short[] |
processFilters(short[] samples)
Process all filters
|
short[] |
processFilters(short[] samples,
@Nullable java.util.function.Predicate<AudioFilter> excludeFilter)
Process all filters
|
void |
reload()
Reloads the device
|
void |
removeFilter(AudioFilter filter)
Removes the filter from device
|
void open(@NotNull
@NotNull javax.sound.sampled.AudioFormat format,
@NotNull
@NotNull Params params)
throws DeviceException
format - the audio formatparams - device paramsDeviceException - if the device cannot be openvoid reload()
throws DeviceException
DeviceExceptionvoid close()
boolean isOpen()
void addFilter(AudioFilter filter, AudioFilter.Priority priority)
void addFilter(AudioFilter filter)
void removeFilter(AudioFilter filter)
java.util.Collection<AudioFilter> getFilters()
short[] processFilters(short[] samples,
@Nullable
@Nullable java.util.function.Predicate<AudioFilter> excludeFilter)
default short[] processFilters(short[] samples)
java.lang.String getName()
java.util.Optional<javax.sound.sampled.AudioFormat> getFormat()
java.util.Optional<Params> getParams()
int getBufferSize()
DeviceType getType()