class Audio::PushAudioInputStream

class Audio::PushAudioInputStream
  : public Audio::AudioInputStream

Represents memory backed push audio input stream used for custom audio input configurations.

Members

~PushAudioInputStream

Syntax: public inline virtual ~PushAudioInputStream ( );

Destructor; closes the underlying stream if not already closed.

Write

Syntax: public inline void Write ( uint8_t * dataBuffer , uint32_t size );

Writes the audio data specified by making an internal copy of the data. Note: The dataBuffer should not contain any audio header.

Parameters

  • dataBuffer The pointer to the audio buffer of which this function will make a copy.

  • size The size of the buffer.

SetProperty

Syntax: public inline void SetProperty ( PropertyId id , const SPXSTRING & value );

Set value of a property. The properties of the audio data should be set before writing the audio data. Added in version 1.5.0.

Parameters

  • id The id of property. See PropertyId

  • value value to set

SetProperty

Syntax: public inline void SetProperty ( const SPXSTRING & propertyName , const SPXSTRING & value );

Set value of a property. The properties of the audio data should be set before writing the audio data. Added in version 1.5.0.

Parameters

  • propertyName The name of property.

  • value value to set

Close

Syntax: public inline void Close ( );

Closes the stream.

Create

Syntax: public inline static std::shared_ptr< PushAudioInputStream > Create ( );

Creates a memory backed PushAudioInputStream using the default format (16 kHz, 16 bit, mono PCM).

Returns

A shared pointer to PushAudioInputStream

Create

Syntax: public inline static std::shared_ptr< PushAudioInputStream > Create ( std::shared_ptr< AudioStreamFormat > format );

Creates a memory backed PushAudioInputStream with the specified audio format.

Parameters

  • format Audio stream format.

Returns

A shared pointer to PushAudioInputStream