Photon Voice  v2.8
English | 日本語 | 한국
Public Member Functions | List of all members
BufferReaderPushAdapterAsyncPoolFloatToShort Class Reference

BufferReaderPushAdapter implementation using asynchronous LocalVoice.PushDataAsync, converting float samples to short. More...

Inherits BufferReaderPushAdapterBase< float >.

Public Member Functions

 BufferReaderPushAdapterAsyncPoolFloatToShort (LocalVoice localVoice, IDataReader< float > reader)
 Create a new BufferReaderPushAdapter instance More...
 
override void Service (LocalVoice localVoice)
 Do the actual data read/push. More...
 
- Public Member Functions inherited from BufferReaderPushAdapterBase< float >
 BufferReaderPushAdapterBase (IDataReader< T > reader)
 Create a new BufferReaderPushAdapterBase instance More...
 
void Dispose ()
 Release resources associated with this instance. More...
 

Additional Inherited Members

- Protected Attributes inherited from BufferReaderPushAdapterBase< float >
IDataReader< T > reader
 

Detailed Description

BufferReaderPushAdapter implementation using asynchronous LocalVoice.PushDataAsync, converting float samples to short.

This adapter works exactly like BufferReaderPushAdapterAsyncPool, but it converts float samples to short. Acquires a buffer from pool before each Read, releases buffer after last Read.

Expects localVoice to be a LocalVoiceFramed<T> of same T.

Constructor & Destructor Documentation

Create a new BufferReaderPushAdapter instance

Parameters
localVoiceLocalVoice instance to push data to.
readerDataReader to read from.

Member Function Documentation

override void Service ( LocalVoice  localVoice)
virtual

Do the actual data read/push.

Parameters
localVoiceLocalVoice instance to push data to. Must be a LocalVoiceFramed<T> of same T.

Implements BufferReaderPushAdapterBase< float >.