Photon Voice  v2.8
English | 日本語 | 한국
Public Member Functions | Protected Attributes | List of all members
AudioUtil.Resampler< T > Class Template Reference

Sample-rate conversion Audio Processor. More...

Inherits IProcessor< T >.

Public Member Functions

 Resampler (int dstSize, int channels)
 Create a new Resampler instance. More...
T[] Process (T[] buf)
 Process a frame of audio data. More...
void Dispose ()

Protected Attributes

T[] frameResampled

Detailed Description

Sample-rate conversion Audio Processor.

This processor converts the sample-rate of the source stream. Internally, it uses AudioUtil.Resample.

Constructor & Destructor Documentation

Resampler ( int  dstSize,
int  channels 

Create a new Resampler instance.

dstSizeFrame size of a destination frame. Determins output rate.
channelsNumber of audio channels expected in both in- and output.

Member Function Documentation

T [] Process ( T[]  buf)

Process a frame of audio data.

bufBuffer containing input audio data
Buffer containing output audio data

Implements IProcessor< T >.