class Audio::AudioInputStream

Represents audio input stream used for custom audio input configurations.

Members

operator SPXAUDIOSTREAMHANDLE

Syntax: public inline explicit operator SPXAUDIOSTREAMHANDLE ( ) const;

Internal operator used to get underlying handle value.

Returns

A handle.

CreatePushStream

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

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

Returns

A shared pointer to PushAudioInputStream

CreatePushStream

Syntax: public inline static std::shared_ptr< PushAudioInputStream > CreatePushStream ( 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

CreatePullStream

Syntax: public inline static std::shared_ptr< PullAudioInputStream > CreatePullStream ( void * pvContext , CUSTOM_AUDIO_PULL_STREAM_READ_CALLBACK readCallback , CUSTOM_AUDIO_PULL_STREAM_CLOSE_CALLBACK closeCallback );

Creates a PullAudioInputStream that delegates to the specified callback functions for Read() and Close() methods, using the default format (16 kHz, 16 bit, mono PCM).

Parameters

  • pvContext Context pointer to use when invoking the callbacks.

  • readCallback Read callback.

  • closeCallback Close callback.

Returns

A shared pointer to PullAudioInputStream

CreatePullStream

Syntax: public inline static std::shared_ptr< PullAudioInputStream > CreatePullStream ( void * pvContext , CUSTOM_AUDIO_PULL_STREAM_READ_CALLBACK readCallback , CUSTOM_AUDIO_PULL_STREAM_CLOSE_CALLBACK closeCallback , CUSTOM_AUDIO_PULL_STREAM_GET_PROPERTY_CALLBACK getPropertyCallback );

Creates a PullAudioInputStream that delegates to the specified callback functions for Read(), Close() and GetProperty() methods Added in version 1.5.0.

Parameters

  • pvContext Context pointer to use when invoking the callbacks.

  • readCallback Read callback.

  • closeCallback Close callback.

  • getPropertyCallback GetProperty callback.

Returns

A shared pointer to PullAudioInputStream

CreatePullStream

Syntax: public inline static std::shared_ptr< PullAudioInputStream > CreatePullStream ( ReadCallbackFunction_Type readCallback , CloseCallbackFunction_Type closeCallback );

Creates a PullAudioInputStream that delegates to the specified callback functions for Read() and Close() methods, using the default format (16 kHz, 16 bit, mono PCM).

Parameters

  • readCallback Read callback.

  • closeCallback Close callback.

Returns

A shared pointer to PullAudioInputStream

CreatePullStream

Syntax: public inline static std::shared_ptr< PullAudioInputStream > CreatePullStream ( ReadCallbackFunction_Type readCallback , CloseCallbackFunction_Type closeCallback , GetPropertyCallbackFunction_Type getPropertyCallback );

Creates a PullAudioInputStream that delegates to the specified callback functions for Read(), Close() and GetProperty() methods. Added in version 1.5.0.

Parameters

  • readCallback Read callback.

  • closeCallback Close callback.

  • getPropertyCallback Get property callback.

Returns

A shared pointer to PullAudioInputStream

CreatePullStream

Syntax: public inline static std::shared_ptr< PullAudioInputStream > CreatePullStream ( std::shared_ptr< PullAudioInputStreamCallback > callback );

Creates a PullAudioInputStream that delegates to the specified callback interface for the Read() and Close() methods, using the default format (16 kHz, 16 bit, mono PCM).

Parameters

  • callback Shared pointer to PullAudioInputStreamCallback instance.

Returns

A shared pointer to PullAudioInputStream

CreatePullStream

Syntax: public inline static std::shared_ptr< PullAudioInputStream > CreatePullStream ( std::shared_ptr< AudioStreamFormat > format , void * pvContext , CUSTOM_AUDIO_PULL_STREAM_READ_CALLBACK readCallback , CUSTOM_AUDIO_PULL_STREAM_CLOSE_CALLBACK closeCallback );

Creates a PullAudioInputStream that delegates to the specified callback functions for Read() and Close() methods.

Parameters

  • format Audio stream format.

  • pvContext Context pointer to use when invoking the callbacks.

  • readCallback Read callback.

  • closeCallback Close callback.

Returns

A shared pointer to PullAudioInputStream

CreatePullStream

Syntax: public inline static std::shared_ptr< PullAudioInputStream > CreatePullStream ( std::shared_ptr< AudioStreamFormat > format , void * pvContext , CUSTOM_AUDIO_PULL_STREAM_READ_CALLBACK readCallback , CUSTOM_AUDIO_PULL_STREAM_CLOSE_CALLBACK closeCallback , CUSTOM_AUDIO_PULL_STREAM_GET_PROPERTY_CALLBACK getPropertyCallback );

Creates a PullAudioInputStream that delegates to the specified callback functions for Read(), Close() and GetProperty() methods. Added in version 1.5.0.

Parameters

  • format Audio stream format.

  • pvContext Context pointer to use when invoking the callbacks.

  • readCallback Read callback.

  • closeCallback Close callback.

  • getPropertyCallback Get property callback.

Returns

A shared pointer to PullAudioInputStream

CreatePullStream

Syntax: public inline static std::shared_ptr< PullAudioInputStream > CreatePullStream ( std::shared_ptr< AudioStreamFormat > format , ReadCallbackFunction_Type readCallback , CloseCallbackFunction_Type closeCallback );

Creates a PullAudioInputStream that delegates to the specified callback functions for Read() and Close() methods.

Parameters

  • format Audio stream format.

  • readCallback Read callback.

  • closeCallback Close callback.

Returns

A shared pointer to PullAudioInputStream

CreatePullStream

Syntax: public inline static std::shared_ptr< PullAudioInputStream > CreatePullStream ( std::shared_ptr< AudioStreamFormat > format , ReadCallbackFunction_Type readCallback , CloseCallbackFunction_Type closeCallback , GetPropertyCallbackFunction_Type getPropertyCallback );

Creates a PullAudioInputStream that delegates to the specified callback functions for Read() and Close() methods. Added in version 1.5.0.

Parameters

  • format Audio stream format.

  • readCallback Read callback.

  • closeCallback Close callback.

  • getPropertyCallback Get property callback.

Returns

A shared pointer to PullAudioInputStream

CreatePullStream

Syntax: public inline static std::shared_ptr< PullAudioInputStream > CreatePullStream ( std::shared_ptr< AudioStreamFormat > format , std::shared_ptr< PullAudioInputStreamCallback > callback );

Creates a PullAudioInputStream that delegates to the specified callback interface for the Read() and Close() methods, using the specified format.

Parameters

  • format Audio stream format.

  • callback Shared pointer to PullAudioInputStreamCallback instance.

Returns

A shared pointer to PullAudioInputStream

ReadCallbackFunction_Type

Syntax: typedef ReadCallbackFunction_Type;

CloseCallbackFunction_Type

Syntax: typedef CloseCallbackFunction_Type;

GetPropertyCallbackFunction_Type

Syntax: typedef GetPropertyCallbackFunction_Type;

Added in version 1.5.0.