put ASIO member variables in class, prepared for ASIO input/output channel selection
This commit is contained in:
parent
29eb59d464
commit
9828ceec81
2 changed files with 557 additions and 511 deletions
1035
windows/sound.cpp
1035
windows/sound.cpp
File diff suppressed because it is too large
Load diff
|
@ -40,14 +40,14 @@
|
||||||
|
|
||||||
|
|
||||||
/* Definitions ****************************************************************/
|
/* Definitions ****************************************************************/
|
||||||
#define NUM_IN_OUT_CHANNELS 2 /* Stereo recording (but we only
|
// stereo for input and output
|
||||||
use one channel for recording) */
|
#define NUM_IN_OUT_CHANNELS 2
|
||||||
|
|
||||||
#define MAX_SND_BUF_IN 100
|
// define the maximum number of audio channel for input/output we can store
|
||||||
#define MAX_SND_BUF_OUT 100
|
// channel infos for (and therefore this is the maximum number of entries in
|
||||||
|
// the channel selection combo box regardless of the actual available number
|
||||||
#define NUM_SOUND_BUFFERS_IN 4
|
// of channels by the audio device)
|
||||||
#define NUM_SOUND_BUFFERS_OUT 4
|
#define MAX_NUM_IN_OUT_CHANNELS 32
|
||||||
|
|
||||||
|
|
||||||
/* Classes ********************************************************************/
|
/* Classes ********************************************************************/
|
||||||
|
@ -74,6 +74,17 @@ protected:
|
||||||
QString LoadAndInitializeDriver ( int iIdx );
|
QString LoadAndInitializeDriver ( int iIdx );
|
||||||
int GetActualBufferSize ( const int iDesiredBufferSizeMono );
|
int GetActualBufferSize ( const int iDesiredBufferSizeMono );
|
||||||
QString CheckDeviceCapabilities();
|
QString CheckDeviceCapabilities();
|
||||||
|
bool CheckSampleTypeSupported ( const ASIOSampleType SamType );
|
||||||
|
|
||||||
|
int iASIOBufferSizeMono;
|
||||||
|
int iASIOBufferSizeStereo;
|
||||||
|
|
||||||
|
CVector<int> vSelectedInputChannels;
|
||||||
|
CVector<int> vSelectedOutputChannels;
|
||||||
|
|
||||||
|
CVector<int16_t> vecsTmpAudioSndCrdStereo;
|
||||||
|
|
||||||
|
QMutex ASIOMutex;
|
||||||
|
|
||||||
// utility functions
|
// utility functions
|
||||||
static int16_t Flip16Bits ( const int16_t iIn );
|
static int16_t Flip16Bits ( const int16_t iIn );
|
||||||
|
@ -89,6 +100,14 @@ protected:
|
||||||
long lGranularity;
|
long lGranularity;
|
||||||
} HWBufferInfo;
|
} HWBufferInfo;
|
||||||
|
|
||||||
|
// ASIO stuff
|
||||||
|
ASIODriverInfo driverInfo;
|
||||||
|
ASIOBufferInfo bufferInfos[2 * NUM_IN_OUT_CHANNELS]; // for input and output buffers -> "2 *"
|
||||||
|
ASIOChannelInfo channelInfosInput[MAX_NUM_IN_OUT_CHANNELS];
|
||||||
|
ASIOChannelInfo channelInfosOutput[MAX_NUM_IN_OUT_CHANNELS];
|
||||||
|
bool bASIOPostOutput;
|
||||||
|
ASIOCallbacks asioCallbacks;
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
static void bufferSwitch ( long index, ASIOBool processNow );
|
static void bufferSwitch ( long index, ASIOBool processNow );
|
||||||
static ASIOTime* bufferSwitchTimeInfo ( ASIOTime* timeInfo, long index, ASIOBool processNow );
|
static ASIOTime* bufferSwitchTimeInfo ( ASIOTime* timeInfo, long index, ASIOBool processNow );
|
||||||
|
|
Loading…
Reference in a new issue