CI130X SDK API手册  2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
宏定义 | 类型定义 | 函数
sonic.h 文件参考

浏览源代码.

宏定义

#define SONIC_MIN_PITCH   65
 
#define SONIC_MAX_PITCH   400
 
#define SONIC_AMDF_FREQ   4000
 

类型定义

typedef struct sonicStreamStructsonicStream
 

函数

sonicStream sonicCreateStream (int sampleRate, int numChannels)
 
void sonicDestroyStream (sonicStream stream)
 
int sonicWriteFloatToStream (sonicStream stream, float *samples, int numSamples)
 
int sonicWriteShortToStream (sonicStream stream, short *samples, int numSamples)
 
int sonicWriteUnsignedCharToStream (sonicStream stream, unsigned char *samples, int numSamples)
 
int sonicReadFloatFromStream (sonicStream stream, float *samples, int maxSamples)
 
int sonicReadShortFromStream (sonicStream stream, short *samples, int maxSamples)
 
int sonicReadUnsignedCharFromStream (sonicStream stream, unsigned char *samples, int maxSamples)
 
int sonicFlushStream (sonicStream stream)
 
int sonicSamplesAvailable (sonicStream stream)
 
float sonicGetSpeed (sonicStream stream)
 
void sonicSetSpeed (sonicStream stream, float speed)
 
float sonicGetPitch (sonicStream stream)
 
void sonicSetPitch (sonicStream stream, float pitch)
 
float sonicGetRate (sonicStream stream)
 
void sonicSetRate (sonicStream stream, float rate)
 
float sonicGetVolume (sonicStream stream)
 
void sonicSetVolume (sonicStream stream, float volume)
 
int sonicGetChordPitch (sonicStream stream)
 
void sonicSetChordPitch (sonicStream stream, int useChordPitch)
 
int sonicGetQuality (sonicStream stream)
 
void sonicSetQuality (sonicStream stream, int quality)
 
int sonicGetSampleRate (sonicStream stream)
 
int sonicSetSampleRate (sonicStream stream, int sampleRate)
 
int sonicGetNumChannels (sonicStream stream)
 
int sonicSetNumChannels (sonicStream stream, int numChannels)
 
void sonicCleanStream (sonicStream stream)
 
int sonicChangeFloatSpeed (float *samples, int numSamples, float speed, float pitch, float rate, float volume, int useChordPitch, int sampleRate, int numChannels)
 
int sonicChangeShortSpeed (short *samples, int numSamples, float speed, float pitch, float rate, float volume, int useChordPitch, int sampleRate, int numChannels)
 

宏定义说明

◆ SONIC_AMDF_FREQ

#define SONIC_AMDF_FREQ   4000

◆ SONIC_MAX_PITCH

#define SONIC_MAX_PITCH   400

◆ SONIC_MIN_PITCH

#define SONIC_MIN_PITCH   65

类型定义说明

◆ sonicStream

typedef struct sonicStreamStruct* sonicStream

函数说明

◆ sonicChangeFloatSpeed()

int sonicChangeFloatSpeed ( float *  samples,
int  numSamples,
float  speed,
float  pitch,
float  rate,
float  volume,
int  useChordPitch,
int  sampleRate,
int  numChannels 
)

◆ sonicChangeShortSpeed()

int sonicChangeShortSpeed ( short *  samples,
int  numSamples,
float  speed,
float  pitch,
float  rate,
float  volume,
int  useChordPitch,
int  sampleRate,
int  numChannels 
)

◆ sonicCleanStream()

void sonicCleanStream ( sonicStream  stream)

◆ sonicCreateStream()

sonicStream sonicCreateStream ( int  sampleRate,
int  numChannels 
)

◆ sonicDestroyStream()

void sonicDestroyStream ( sonicStream  stream)

◆ sonicFlushStream()

int sonicFlushStream ( sonicStream  stream)

◆ sonicGetChordPitch()

int sonicGetChordPitch ( sonicStream  stream)

◆ sonicGetNumChannels()

int sonicGetNumChannels ( sonicStream  stream)

◆ sonicGetPitch()

float sonicGetPitch ( sonicStream  stream)

◆ sonicGetQuality()

int sonicGetQuality ( sonicStream  stream)

◆ sonicGetRate()

float sonicGetRate ( sonicStream  stream)

◆ sonicGetSampleRate()

int sonicGetSampleRate ( sonicStream  stream)

◆ sonicGetSpeed()

float sonicGetSpeed ( sonicStream  stream)

◆ sonicGetVolume()

float sonicGetVolume ( sonicStream  stream)

◆ sonicReadFloatFromStream()

int sonicReadFloatFromStream ( sonicStream  stream,
float *  samples,
int  maxSamples 
)

◆ sonicReadShortFromStream()

int sonicReadShortFromStream ( sonicStream  stream,
short *  samples,
int  maxSamples 
)

◆ sonicReadUnsignedCharFromStream()

int sonicReadUnsignedCharFromStream ( sonicStream  stream,
unsigned char *  samples,
int  maxSamples 
)

◆ sonicSamplesAvailable()

int sonicSamplesAvailable ( sonicStream  stream)

◆ sonicSetChordPitch()

void sonicSetChordPitch ( sonicStream  stream,
int  useChordPitch 
)

◆ sonicSetNumChannels()

int sonicSetNumChannels ( sonicStream  stream,
int  numChannels 
)

◆ sonicSetPitch()

void sonicSetPitch ( sonicStream  stream,
float  pitch 
)

◆ sonicSetQuality()

void sonicSetQuality ( sonicStream  stream,
int  quality 
)

◆ sonicSetRate()

void sonicSetRate ( sonicStream  stream,
float  rate 
)

◆ sonicSetSampleRate()

int sonicSetSampleRate ( sonicStream  stream,
int  sampleRate 
)

◆ sonicSetSpeed()

void sonicSetSpeed ( sonicStream  stream,
float  speed 
)

◆ sonicSetVolume()

void sonicSetVolume ( sonicStream  stream,
float  volume 
)

◆ sonicWriteFloatToStream()

int sonicWriteFloatToStream ( sonicStream  stream,
float *  samples,
int  numSamples 
)

◆ sonicWriteShortToStream()

int sonicWriteShortToStream ( sonicStream  stream,
short *  samples,
int  numSamples 
)

◆ sonicWriteUnsignedCharToStream()

int sonicWriteUnsignedCharToStream ( sonicStream  stream,
unsigned char *  samples,
int  numSamples 
)