Known Direct Subclasses
AudioSource |
Use AudioSource as a generic source to send app-generated audio to the SDK in LPCM format. |
|
Class Overview
Audio input sources must conform to this interface
Summary
[Expand]
Inherited Methods |
From class
com.amazonaws.ivs.broadcast.Device
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
Public Methods
public
abstract
int
appendBuffer
(ByteBuffer buffer, long count, long presentationTimeUs)
Append an audio buffer. This can only be used with USER_AUDIO
Parameters
buffer |
The buffer of audio data to append. This must be allocated as a Direct ByteBuffer |
count |
The number of bytes to use |
presentationTimeUs |
The presentation time, in microseconds |
Returns
- The number of samples processed
public
abstract
void
setGain
(Float gain)
Parameters
gain |
Generally between 0 and 1, but values up to 2 are accepted. Any value over 1 amplifies the signal and may cause clipping.
|
Set a callback to receive audio stats for this device. This will be called on the main thread.
Parameters
callback |
A callback lambda that takes two floats: peak and rms.
|