public interface IAudioStreamListener
| Modifier and Type | Method and Description |
|---|---|
void |
sendAudio(byte[] data,
int offset,
int length,
long presentationTimeUs)
Sends a chunk of audio data to SDL Core.
|
void |
sendAudio(ByteBuffer data,
long presentationTimeUs,
CompletionListener completionListener)
Sends a chunk of audio data to SDL Core.
|
void sendAudio(byte[] data,
int offset,
int length,
long presentationTimeUs)
throws ArrayIndexOutOfBoundsException
Note: this method must not be called after SdlProxyBase.endAudioStream() is called.
data - Byte array containing audio dataoffset - Starting offset in 'data'length - Length of the datapresentationTimeUs - (Reserved for future use) Presentation timestamp (PTS) of the
last audio sample data included in this chunk, in microseconds.
It must be greater than the previous timestamp.
Specify -1 if unknown.ArrayIndexOutOfBoundsException - When offset does not satisfy
0 <= offset && offset <= data.length
or length does not satisfy
0 < length && offset + length <= data.lengthvoid sendAudio(ByteBuffer data, long presentationTimeUs, CompletionListener completionListener)
Note: this method must not be called after SdlProxyBase.endAudioStream() is called.
data - Data chunk to send. Its position will be updated upon return.presentationTimeUs - (Reserved for future use) Presentation timestamp (PTS) of the
last audio sample data included in this chunk, in microseconds.
It must be greater than the previous timestamp.
Specify -1 if unknown.completionListener - A completion listener that informs when the audio file is played