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 ****************************************************************/
|
||||
#define NUM_IN_OUT_CHANNELS 2 /* Stereo recording (but we only
|
||||
use one channel for recording) */
|
||||
// stereo for input and output
|
||||
#define NUM_IN_OUT_CHANNELS 2
|
||||
|
||||
#define MAX_SND_BUF_IN 100
|
||||
#define MAX_SND_BUF_OUT 100
|
||||
|
||||
#define NUM_SOUND_BUFFERS_IN 4
|
||||
#define NUM_SOUND_BUFFERS_OUT 4
|
||||
// define the maximum number of audio channel for input/output we can store
|
||||
// channel infos for (and therefore this is the maximum number of entries in
|
||||
// the channel selection combo box regardless of the actual available number
|
||||
// of channels by the audio device)
|
||||
#define MAX_NUM_IN_OUT_CHANNELS 32
|
||||
|
||||
|
||||
/* Classes ********************************************************************/
|
||||
|
@ -74,6 +74,17 @@ protected:
|
|||
QString LoadAndInitializeDriver ( int iIdx );
|
||||
int GetActualBufferSize ( const int iDesiredBufferSizeMono );
|
||||
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
|
||||
static int16_t Flip16Bits ( const int16_t iIn );
|
||||
|
@ -89,6 +100,14 @@ protected:
|
|||
long lGranularity;
|
||||
} 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
|
||||
static void bufferSwitch ( long index, ASIOBool processNow );
|
||||
static ASIOTime* bufferSwitchTimeInfo ( ASIOTime* timeInfo, long index, ASIOBool processNow );
|
||||
|
|
Loading…
Reference in a new issue