BSAPI
Public Types | Public Member Functions
SWaveformSourceCallbackI Class Reference

An interface that allows to receive waveform. More...

#include <bsapi.h>

Inheritance diagram for SWaveformSourceCallbackI:
SActiveWaveformPartSelectorI SChannelSplitterI SF0EstimatorI SFeatureExtractionI SFrequencyFilterI SOnlineWaveformSegmenterI SSegmentationI SSignalModelling2I SSignalModellingI SSignalModellingSubsystemI SWaveformFilterI SWaveformFormatConvertorI SWaveformJoinerI SWaveformMemoryI SWaveformNodeI SWaveformResamplerI SWaveformResegmenterI SWaveformSegmenterI SWaveformSelectorI SWaveformSplitterI SWaveformTargetI

List of all members.

Public Types

enum  wave_format_type {
  wfUnknown, wfUnsupported, wfLin16, wfLin8,
  wfALaw, wfMuLaw, wfFloat
}
 Waveform format. More...

Public Member Functions

virtual bool BSAPI_METHOD OnWaveform (SUnknownI *pSender, wave_format_type waveformFormat, int sampleFreq, int nChannels, void *pData, int nBytes, unsigned int flags)=0
 This function will receive waveform data from sender.

Detailed Description

An interface that allows to receive waveform.

SWaveformSourceCallbackI is an interface that must each class that wants to receive waveform from the SAudioWaveformSourceI, SFileWaveformSourceI, SWaveformFormatConvertorI or SWaveformFilterI must implement.


Member Enumeration Documentation

Waveform format.

Enumerator:
wfUnknown 

The waveform format is not known.

wfUnsupported 

The waveform format does not have its own ID. It is not supported by SWaveformFormatConvertorI.

wfLin16 

Linear coding, 16 bits per sample.

wfLin8 

Linear coding, 8 bit per sample.

wfALaw 

A-law compression, 8 bits per sample.

wfMuLaw 

Mu-law compression, 8 bits per sample.

wfFloat 

Linear coding, array of floats.


Member Function Documentation

virtual bool BSAPI_METHOD SWaveformSourceCallbackI::OnWaveform ( SUnknownI pSender,
wave_format_type  waveformFormat,
int  sampleFreq,
int  nChannels,
void *  pData,
int  nBytes,
unsigned int  flags 
) [pure virtual]

This function will receive waveform data from sender.

Parameters:
pSenderpointer to source object
waveformFormatformat of the recived data.
sampleFreqsampling frequency
nChannelsnumber of channels
pDatapointer to received data
nBytesnumber of bytes received
flagsbinary flags characterizing the transfer
  • PF_OFFLINEPROC - the whole segment/file was sent during this one call. This is usable for some offline normalizations later in processing.
  • PF_LASTFRAME - the last part of segment/file was recived. This flag is always set if the PF_OFFLINEPROC is set.

The documentation for this class was generated from the following file: