moved GetSelCHAndAddCH in the base class
This commit is contained in:
parent
166c6fca0e
commit
1c3c2e7315
3 changed files with 25 additions and 26 deletions
|
@ -31,11 +31,11 @@ CSoundBase::CSoundBase ( const QString& strNewSystemDriverTechniqueName,
|
|||
void (*fpNewProcessCallback) ( CVector<int16_t>& psData, void* pParg ),
|
||||
void* pParg,
|
||||
const int iNewCtrlMIDIChannel ) :
|
||||
fpProcessCallback ( fpNewProcessCallback ),
|
||||
pProcessCallbackArg ( pParg ), bRun ( false ),
|
||||
bIsCallbackAudioInterface ( bNewIsCallbackAudioInterface ),
|
||||
fpProcessCallback ( fpNewProcessCallback ),
|
||||
pProcessCallbackArg ( pParg ), bRun ( false ),
|
||||
bIsCallbackAudioInterface ( bNewIsCallbackAudioInterface ),
|
||||
strSystemDriverTechniqueName ( strNewSystemDriverTechniqueName ),
|
||||
iCtrlMIDIChannel ( iNewCtrlMIDIChannel )
|
||||
iCtrlMIDIChannel ( iNewCtrlMIDIChannel )
|
||||
{
|
||||
// initializations for the sound card names (default)
|
||||
lNumDevs = 1;
|
||||
|
|
|
@ -97,6 +97,27 @@ protected:
|
|||
virtual void UnloadCurrentDriver() {}
|
||||
QVector<QString> LoadAndInitializeFirstValidDriver ( const bool bOpenDriverSetup = false );
|
||||
|
||||
static void GetSelCHAndAddCH ( const int iSelCH, const int iNumInChan,
|
||||
int& iSelCHOut, int& iSelAddCHOut )
|
||||
{
|
||||
// we have a mixed channel setup, definitions:
|
||||
// - mixed channel setup only for 4 physical inputs:
|
||||
// SelCH == 4: Ch 0 + Ch 2
|
||||
// SelCh == 5: Ch 0 + Ch 3
|
||||
// SelCh == 6: Ch 1 + Ch 2
|
||||
// SelCh == 7: Ch 1 + Ch 3
|
||||
if ( iSelCH >= iNumInChan )
|
||||
{
|
||||
iSelAddCHOut = ( ( iSelCH - iNumInChan ) % 2 ) + 2;
|
||||
iSelCHOut = ( iSelCH - iNumInChan ) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
iSelAddCHOut = -1; // set it to an invalid number
|
||||
iSelCHOut = iSelCH;
|
||||
}
|
||||
}
|
||||
|
||||
// function pointer to callback function
|
||||
void (*fpProcessCallback) ( CVector<int16_t>& psData, void* arg );
|
||||
void* pProcessCallbackArg;
|
||||
|
|
|
@ -87,28 +87,6 @@ protected:
|
|||
bool CheckSampleTypeSupportedForCHMixing ( const ASIOSampleType SamType );
|
||||
void ResetChannelMapping();
|
||||
|
||||
static void GetSelCHAndAddCH ( const int iSelCH, const int iNumInChan,
|
||||
int& iSelCHOut, int& iSelAddCHOut )
|
||||
{
|
||||
// we have a mixed channel setup
|
||||
// definitions:
|
||||
// - mixed channel setup only for 4 physical inputs:
|
||||
// SelCH == 4: Ch 0 + Ch 2
|
||||
// SelCh == 5: Ch 0 + Ch 3
|
||||
// SelCh == 6: Ch 1 + Ch 2
|
||||
// SelCh == 7: Ch 1 + Ch 3
|
||||
if ( iSelCH >= iNumInChan )
|
||||
{
|
||||
iSelAddCHOut = ( ( iSelCH - iNumInChan ) % 2 ) + 2;
|
||||
iSelCHOut = ( iSelCH - iNumInChan ) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
iSelAddCHOut = -1;
|
||||
iSelCHOut = iSelCH;
|
||||
}
|
||||
}
|
||||
|
||||
int iASIOBufferSizeMono;
|
||||
int iASIOBufferSizeStereo;
|
||||
|
||||
|
|
Loading…
Reference in a new issue