RawOutgoingAudioStream Class
- java.
lang. Object - CallAudioStream
- OutgoingAudioStream
- com.
azure. android. communication. calling. RawOutgoingAudioStream
- com.
public class RawOutgoingAudioStream extends OutgoingAudioStream
An audio stream that utilizes a virtual device for sending audio
Constructor Summary
Constructor | Description |
---|---|
RawOutgoingAudioStream(RawOutgoingAudioStreamOptions options) |
Default constructor |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
addOnStateChangedListener(AudioStreamStateChangedListener listener)
Adds the specified listener to receive OnStateChanged events. An event that occurs when a given audio stream state changes. |
long |
getExpectedBufferSizeInBytes()
Expected buffer size of Audio Buffer |
Raw |
getProperties()
RawOutgoingAudioStreamProperties that this CallAudioStream is set to |
void |
removeOnStateChangedListener(AudioStreamStateChangedListener listener)
Removes the specified listener to receive OnStateChanged events. An event that occurs when a given audio stream state changes. |
CompletableFuture<Void> |
sendRawAudioBuffer(final RawAudioBuffer rawAudioBuffer)
Method for sending audio buffer. The buffer should match the format, sample rate and channel mode specified in the stream properties. For data per block property, we recommend sending data in the specified size, but additionally, we support sending larger buffers limited to 100ms as long as it can be evenly divided by the specified data per block. |
Inherited Members
Constructor Details
RawOutgoingAudioStream
public RawOutgoingAudioStream(RawOutgoingAudioStreamOptions options)
Default constructor
Parameters:
Method Details
addOnStateChangedListener
public void addOnStateChangedListener(AudioStreamStateChangedListener listener)
Adds the specified listener to receive OnStateChanged events. An event that occurs when a given audio stream state changes.
Parameters:
getExpectedBufferSizeInBytes
public long getExpectedBufferSizeInBytes()
Expected buffer size of Audio Buffer
getProperties
public RawOutgoingAudioStreamProperties getProperties()
RawOutgoingAudioStreamProperties that this CallAudioStream is set to
removeOnStateChangedListener
public void removeOnStateChangedListener(AudioStreamStateChangedListener listener)
Removes the specified listener to receive OnStateChanged events. An event that occurs when a given audio stream state changes.
Parameters:
sendRawAudioBuffer
public CompletableFuture
Method for sending audio buffer. The buffer should match the format, sample rate and channel mode specified in the stream properties. For data per block property, we recommend sending data in the specified size, but additionally, we support sending larger buffers limited to 100ms as long as it can be evenly divided by the specified data per block.
Parameters: