move dummy sound card device selection code in base class
This commit is contained in:
parent
cc6b8a85f8
commit
1345eac823
4 changed files with 23 additions and 34 deletions
|
@ -66,12 +66,6 @@ public:
|
||||||
virtual void Start();
|
virtual void Start();
|
||||||
virtual void Stop();
|
virtual void Stop();
|
||||||
|
|
||||||
// not implemented yet, always return one device and default string
|
|
||||||
int GetNumDev() { return 1; }
|
|
||||||
QString GetDeviceName ( const int ) { return "wave mapper"; }
|
|
||||||
QString SetDev ( const int ) { return ""; } // dummy
|
|
||||||
int GetDev() { return 0; }
|
|
||||||
|
|
||||||
// these variables should be protected but cannot since we want
|
// these variables should be protected but cannot since we want
|
||||||
// to access them from the callback function
|
// to access them from the callback function
|
||||||
CVector<short> vecsTmpAudioSndCrdStereo;
|
CVector<short> vecsTmpAudioSndCrdStereo;
|
||||||
|
@ -102,12 +96,6 @@ public:
|
||||||
CSoundBase ( false, fpNewProcessCallback, pParg ) {}
|
CSoundBase ( false, fpNewProcessCallback, pParg ) {}
|
||||||
virtual ~CSound() {}
|
virtual ~CSound() {}
|
||||||
|
|
||||||
// not used
|
|
||||||
int GetNumDev() { return 1; }
|
|
||||||
QString GetDeviceName ( const int ) { return "wave mapper"; }
|
|
||||||
QString SetDev ( const int ) { return ""; } // dummy
|
|
||||||
int GetDev() { return 0; }
|
|
||||||
|
|
||||||
// dummy definitions
|
// dummy definitions
|
||||||
virtual int Init ( const int iNewPrefMonoBufferSize ) { return CSoundBase::Init ( iNewPrefMonoBufferSize ); }
|
virtual int Init ( const int iNewPrefMonoBufferSize ) { return CSoundBase::Init ( iNewPrefMonoBufferSize ); }
|
||||||
virtual bool Read ( CVector<short>& ) { printf ( "no sound!" ); return false; }
|
virtual bool Read ( CVector<short>& ) { printf ( "no sound!" ); return false; }
|
||||||
|
|
|
@ -45,12 +45,6 @@ public:
|
||||||
virtual void Start();
|
virtual void Start();
|
||||||
virtual void Stop();
|
virtual void Stop();
|
||||||
|
|
||||||
// not implemented yet, always return one device and default string
|
|
||||||
int GetNumDev() { return 1; }
|
|
||||||
QString GetDeviceName ( const int ) { return "CoreAudio"; }
|
|
||||||
QString SetDev ( const int ) { return ""; } // dummy
|
|
||||||
int GetDev() { return 0; }
|
|
||||||
|
|
||||||
// these variables should be protected but cannot since we want
|
// these variables should be protected but cannot since we want
|
||||||
// to access them from the callback function
|
// to access them from the callback function
|
||||||
CVector<short> vecsTmpAudioSndCrdStereo;
|
CVector<short> vecsTmpAudioSndCrdStereo;
|
||||||
|
|
|
@ -46,6 +46,13 @@ public:
|
||||||
virtual int Init ( const int iNewPrefMonoBufferSize );
|
virtual int Init ( const int iNewPrefMonoBufferSize );
|
||||||
virtual void Start();
|
virtual void Start();
|
||||||
virtual void Stop();
|
virtual void Stop();
|
||||||
|
|
||||||
|
// dummy implementation in base class
|
||||||
|
virtual int GetNumDev() { return 1; }
|
||||||
|
virtual QString GetDeviceName ( const int ) { return "Default"; }
|
||||||
|
virtual QString SetDev ( const int ) { return ""; }
|
||||||
|
virtual int GetDev() { return 0; }
|
||||||
|
|
||||||
bool IsRunning() const { return bRun; }
|
bool IsRunning() const { return bRun; }
|
||||||
|
|
||||||
virtual void OpenDriverSetup() {}
|
virtual void OpenDriverSetup() {}
|
||||||
|
|
|
@ -64,10 +64,10 @@ public:
|
||||||
virtual void OpenDriverSetup() { ASIOControlPanel(); }
|
virtual void OpenDriverSetup() { ASIOControlPanel(); }
|
||||||
|
|
||||||
// device selection
|
// device selection
|
||||||
int GetNumDev() { return lNumDevs; }
|
virtual int GetNumDev() { return lNumDevs; }
|
||||||
QString GetDeviceName ( const int iDiD ) { return cDriverNames[iDiD]; }
|
virtual QString GetDeviceName ( const int iDiD ) { return cDriverNames[iDiD]; }
|
||||||
QString SetDev ( const int iNewDev );
|
virtual QString SetDev ( const int iNewDev );
|
||||||
int GetDev() { return lCurDev; }
|
virtual int GetDev() { return lCurDev; }
|
||||||
|
|
||||||
// channel selection
|
// channel selection
|
||||||
int GetNumInputChannels() { return static_cast<int> ( lNumInChan ); }
|
int GetNumInputChannels() { return static_cast<int> ( lNumInChan ); }
|
||||||
|
|
Loading…
Reference in a new issue