for ASIO and 4 channel input, support mixing channels 1&2 with 3&4
This commit is contained in:
parent
a7454095d3
commit
5d15ca6a23
1 changed files with 27 additions and 2 deletions
|
@ -58,8 +58,8 @@ public:
|
||||||
virtual void OpenDriverSetup() { ASIOControlPanel(); }
|
virtual void OpenDriverSetup() { ASIOControlPanel(); }
|
||||||
|
|
||||||
// channel selection
|
// channel selection
|
||||||
virtual int GetNumInputChannels() { return static_cast<int> ( lNumInChan ); }
|
virtual int GetNumInputChannels() { return static_cast<int> ( lNumInChanPlusAddChan ); }
|
||||||
virtual QString GetInputChannelName ( const int iDiD ) { return channelInfosInput[iDiD].name; }
|
virtual QString GetInputChannelName ( const int iDiD ) { return channelInputName[iDiD]; }
|
||||||
virtual void SetLeftInputChannel ( const int iNewChan );
|
virtual void SetLeftInputChannel ( const int iNewChan );
|
||||||
virtual void SetRightInputChannel ( const int iNewChan );
|
virtual void SetRightInputChannel ( const int iNewChan );
|
||||||
virtual int GetLeftInputChannel() { return vSelectedInputChannels[0]; }
|
virtual int GetLeftInputChannel() { return vSelectedInputChannels[0]; }
|
||||||
|
@ -80,12 +80,36 @@ protected:
|
||||||
int GetActualBufferSize ( const int iDesiredBufferSizeMono );
|
int GetActualBufferSize ( const int iDesiredBufferSizeMono );
|
||||||
QString CheckDeviceCapabilities();
|
QString CheckDeviceCapabilities();
|
||||||
bool CheckSampleTypeSupported ( const ASIOSampleType SamType );
|
bool CheckSampleTypeSupported ( const ASIOSampleType SamType );
|
||||||
|
bool CheckSampleTypeSupportedForCHMixing ( const ASIOSampleType SamType );
|
||||||
void ResetChannelMapping();
|
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 iASIOBufferSizeMono;
|
||||||
int iASIOBufferSizeStereo;
|
int iASIOBufferSizeStereo;
|
||||||
|
|
||||||
long lNumInChan;
|
long lNumInChan;
|
||||||
|
long lNumInChanPlusAddChan; // includes additional "added" channels
|
||||||
long lNumOutChan;
|
long lNumOutChan;
|
||||||
double dInOutLatencyMs;
|
double dInOutLatencyMs;
|
||||||
CVector<int> vSelectedInputChannels;
|
CVector<int> vSelectedInputChannels;
|
||||||
|
@ -113,6 +137,7 @@ protected:
|
||||||
ASIODriverInfo driverInfo;
|
ASIODriverInfo driverInfo;
|
||||||
ASIOBufferInfo bufferInfos[2 * MAX_NUM_IN_OUT_CHANNELS]; // for input and output buffers -> "2 *"
|
ASIOBufferInfo bufferInfos[2 * MAX_NUM_IN_OUT_CHANNELS]; // for input and output buffers -> "2 *"
|
||||||
ASIOChannelInfo channelInfosInput[MAX_NUM_IN_OUT_CHANNELS];
|
ASIOChannelInfo channelInfosInput[MAX_NUM_IN_OUT_CHANNELS];
|
||||||
|
QString channelInputName[MAX_NUM_IN_OUT_CHANNELS];
|
||||||
ASIOChannelInfo channelInfosOutput[MAX_NUM_IN_OUT_CHANNELS];
|
ASIOChannelInfo channelInfosOutput[MAX_NUM_IN_OUT_CHANNELS];
|
||||||
bool bASIOPostOutput;
|
bool bASIOPostOutput;
|
||||||
ASIOCallbacks asioCallbacks;
|
ASIOCallbacks asioCallbacks;
|
||||||
|
|
Loading…
Reference in a new issue