Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

Interface IAudioStreamListener

Package
com.smartdevicelink.proxy.interfaces
All Known Implementing Classes
com.smartdevicelink.streaming.StreamPacketizer

Overview

A listener that receives audio streaming data from app.

Methods

sendAudio( byte[] data, int offset, int length, long presentationTimeUs )

Sends a chunk of audio data to SDL Core.

Note: this method must not be called after SdlProxyBase.endAudioStream() is called.

public void sendAudio(byte[] data,int offset,int length,long presentationTimeUs) throws java.lang.ArrayIndexOutOfBoundsException

Parameters

data
Byte array containing audio data
offset
Starting offset in 'data'
length
Length of the data
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.

Throws

  • java.lang.ArrayIndexOutOfBoundsException

sendAudio( ByteBuffer data, long presentationTimeUs )

Sends a chunk of audio data to SDL Core.

Note: this method must not be called after SdlProxyBase.endAudioStream() is called.

public void sendAudio(ByteBuffer data,long presentationTimeUs)

Parameters

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.
View on GitHub.com
Previous Section Next Section