startAudioStreaming()
Starts streaming audio using the specified settings.
int startAudioStreaming(Microphone microphone,
int bitrate,
int sampleRate,
AudioChannel channelCount,
StreamingBufferCallback audioBufferCallback,
StreamingEventCallback streamingEventCallback)
Parameters
microphone
This specifies the directional pickup pattern of the microphone.
bitrate
This determines the amount of data processed per unit of time, affecting the overall audio quality and file size.
samplRate
This specifies the number of audio samples captured per second.
channelCount
This specifies the number of audio channels.
audioBufferCallback
This is the callback that receives the audio data.
streamingEventCallback
This is the callback that receives the streaming event.
Return value
0 if function calling is successful; otherwise, -1 .
Exception
The following exceptions may be thrown: UnregisteredAppException, GlassesPermissionDeniedException
See also
Audio streaming
void stopAudioStreaming ()
Stops the audio session and releases all associated resources.
boolean isAudioStreaming ()
Checks if there is an ongoing audio session.
Responding from VIVE AI Glasses event
interface StreamingEventCallback
This protocol defines the methods for handling the asynchronous streaming event received from VIVE AI Glasses.
interface StreamingBufferCallback
This protocol defines the methods for handling asynchronous streaming data transmissions received from VIVE AI Glasses.
Enumerations
enum AudioChannel
This defines the number of audio channels.
enum Microphone
This defines the directional pickup pattern of the microphone.
enum StreamingEvent
This defines the lifecycle state of a media stream.
Error handling and exceptions
This represents an error thrown by the VIVE AI Glasses SDK.