類別:Core
音訊使用介面
類型 | 使用 | 成員 | 說明 |
建構子 | public | ||
解構子 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | int * hostSpecificDeviceIndex ) |
|
函式 | public | ||
函式 | public | CaHostApiTypeId type) |
|
函式 | public | int hostApiDeviceIndex) |
|
函式 | public | ||
函式 | public | ||
函式 | public | Conduit * conduit) |
|
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | Stream * stream, void * buffer, unsigned long frames) |
|
函式 | public | Stream * stream, const void * buffer, unsigned long frames) |
|
函式 | public | ||
函式 | public | ||
函式 | public | ||
函式 | public | Stream * stream , int atChannel = -1 ) |
|
函式 | public | Stream * stream , CaVolume volume , int atChannel = -1 ) |
|
函式 | public | Stream ** stream, const StreamParameters * inputParameters, const StreamParameters * outputParameters, double sampleRate, CaUint32 framesPerBuffer, CaStreamFlags streamFlags, Conduit * conduit) |
|
函式 | public | Stream ** stream, int inputChannelCount, int outputChannelCount, CaSampleFormat sampleFormat, double sampleRate, CaUint32 framesPerBuffer, Conduit * conduit) |
|
函式 | public | const StreamParameters * inputParameters, const StreamParameters * outputParameters, double sampleRate) |
|
函式 | public | Conduit * conduit , CaDeviceIndex deviceId , int channelCount , CaSampleFormat sampleFormat , int sampleRate , int frameCount , CaStreamFlags streamFlags = 0 , int sleepInterval = 50) |
|
函式 | public | Conduit * conduit , CaDeviceIndex deviceId , int channelCount , CaSampleFormat sampleFormat , int sampleRate , int frameCount , CaStreamFlags streamFlags = 0 , int sleepInterval = 50) |
|
資料 | protected | ||
資料 | protected | ||
函式 | protected | ||
函式 | protected | ||
函式 | protected | ||
函式 | protected | ||
函式 | protected | ||
函式 | protected | ||
函式 | protected | ||
函式 | protected | const StreamParameters * inputParameters, const StreamParameters * outputParameters, double sampleRate, CaUint32 framesPerBuffer, CaStreamFlags streamFlags, Conduit * conduit, HostApi ** hostApi, CaDeviceIndex * hostApiInputDevice, CaDeviceIndex * hostApiOutputDevice) |
|
資料 | private |
說明
C/C++定義
class Core
{
public:
explicit Core (void) ;
virtual ~Core (void) ;
static Core * instance (void) ;
static bool hasEncoder (void) ;
static bool hasDecoder (void) ;
static bool Play (const char * filename,bool threading = true) ;
static bool Play (const char * filename,int outputDevice,bool threading = true) ;
int Version (void) const ;
const char * VersionString (void) ;
virtual CaError Initialize (void) ;
virtual CaError Terminate (void) ;
static int SampleSize (int caSampleFormat) ;
static bool isValid (int caSampleFormat) ;
static bool IsLittleEndian (void) ;
static bool IsBigEndian (void) ;
void setDebugger (Debugger * debug) ;
virtual CaDeviceIndex DefaultInputDevice (void) ;
virtual CaDeviceIndex DefaultOutputDevice (void) ;
virtual int HostAPIs (void) ;
virtual CaHostApiIndex HostApiCount (void) ;
virtual CaDeviceIndex DeviceCount (void) ;
virtual CaHostApiIndex DefaultHostApi (void) ;
virtual CaHostApiIndex setDefaultHostApi (CaHostApiIndex index) ;
virtual int FindHostApi (CaDeviceIndex device ,
int * hostSpecificDeviceIndex ) ;
static CaHostApiIndex TypeIdToIndex (CaHostApiTypeId type ) ;
static CaError GetHostApi (HostApi ** hostApi ,
CaHostApiTypeId type ) ;
static CaDeviceIndex ToDeviceIndex (CaHostApiIndex hostApi ,
int hostApiDeviceIndex ) ;
virtual HostApiInfo * GetHostApiInfo (CaHostApiIndex hostApi ) ;
virtual DeviceInfo * GetDeviceInfo (CaDeviceIndex device ) ;
virtual CaError setConduit (Stream * stream ,
Conduit * conduit ) ;
virtual CaError Start (Stream * stream ) ;
virtual CaError Stop (Stream * stream ) ;
virtual CaError Close (Stream * stream ) ;
virtual CaError Abort (Stream * stream ) ;
virtual CaError IsStopped (Stream * stream ) ;
virtual CaError IsActive (Stream * stream ) ;
virtual CaTime GetTime (Stream * stream ) ;
virtual double GetCpuLoad (Stream * stream ) ;
virtual CaInt32 ReadAvailable (Stream * stream ) ;
virtual CaInt32 WriteAvailable (Stream * stream ) ;
virtual CaError Read (Stream * stream ,
void * buffer ,
unsigned long frames ) ;
virtual CaError Write (Stream * stream ,
const void * buffer ,
unsigned long frames ) ;
virtual bool hasVolume (Stream * stream) ;
virtual CaVolume MinVolume (Stream * stream) ;
virtual CaVolume MaxVolume (Stream * stream) ;
virtual CaVolume Volume (Stream * stream ,
int atChannel = -1 ) ;
virtual CaVolume setVolume (Stream * stream ,
CaVolume volume ,
int atChannel = -1 ) ;
virtual CaError Open (Stream ** stream ,
const StreamParameters * inputParameters ,
const StreamParameters * outputParameters ,
double sampleRate ,
CaUint32 framesPerBuffer ,
CaStreamFlags streamFlags ,
Conduit * conduit ) ;
virtual CaError Default (Stream ** stream ,
int inputChannelCount ,
int outputChannelCount ,
CaSampleFormat sampleFormat ,
double sampleRate ,
CaUint32 framesPerBuffer ,
Conduit * conduit ) ;
virtual CaError isSupported (const StreamParameters * inputParameters ,
const StreamParameters * outputParameters ,
double sampleRate ) ;
virtual bool Play (Conduit * conduit ,
CaDeviceIndex deviceId ,
int channelCount ,
CaSampleFormat sampleFormat ,
int sampleRate ,
int frameCount ,
CaStreamFlags streamFlags = 0 ,
int sleepInterval = 50 ) ;
virtual bool Record (Conduit * conduit ,
CaDeviceIndex deviceId ,
int channelCount ,
CaSampleFormat sampleFormat ,
int sampleRate ,
int frameCount ,
CaStreamFlags streamFlags = 0 ,
int sleepInterval = 50 ) ;
protected:
int defaultHostApiIndex ;
Stream * firstOpenStream ;
virtual CaError InitializeHostApis (void) ;
virtual void TerminateHostApis (void) ;
static bool isInitialized (void) ;
virtual void Add (Stream * stream) ;
virtual void Remove (Stream * stream) ;
virtual void CloseStreams (void) ;
virtual CaError ValidateStreamPointer (Stream * stream) ;
virtual CaError ValidateStream (const StreamParameters * inputParameters ,
const StreamParameters * outputParameters ,
double sampleRate ,
CaUint32 framesPerBuffer ,
CaStreamFlags streamFlags ,
Conduit * conduit ,
HostApi ** hostApi ,
CaDeviceIndex * hostApiInputDevice ,
CaDeviceIndex * hostApiOutputDevice ) ;
private:
Timer LocalTimer ;
};