small changes

This commit is contained in:
Volker Fischer 2008-04-08 18:38:55 +00:00
parent 068b78fb24
commit ceacfd9a13
6 changed files with 40 additions and 37 deletions

View file

@ -70,8 +70,8 @@ public:
double MicLevelR() { return SignalLevelMeterR.MicLevel(); }
bool IsConnected() { return Channel.IsConnected(); }
/* we want to return the standard deviation. For that we need to calculate
the sqaure root */
/* We want to return the standard deviation. For that we need to calculate
the sqaure root. */
double GetTimingStdDev() { return sqrt ( RespTimeMoAvBuf.GetAverage() ); }
int GetAudioInFader() { return iAudioInFader; }

View file

@ -1,5 +1,5 @@
/******************************************************************************\
* Copyright (c) 2004-2006
* Copyright (c) 2004-2008
*
* Author(s):
* Volker Fischer
@ -49,19 +49,19 @@
// file name for logging file
#define LOG_FILE_NAME "llconsrvlog.txt"
/* defined port number for client and server */
// defined port number for client and server
#define LLCON_PORT_NUMBER 22122
/* sample rate */
// sample rate
#define SAMPLE_RATE 24000
/* sound card sample rate. Should be always 48 kHz to avoid sound card driver
internal sample rate conversion which might be buggy */
// sound card sample rate. Should be always 48 kHz to avoid sound card driver
// internal sample rate conversion which might be buggy
#define SND_CRD_SAMPLE_RATE 48000
/* minimum block duration - all other buffer durations must be a multiple
of this duration */
#define MIN_BLOCK_DURATION_MS 2 /* ms */
// minimum block duration - all other buffer durations must be a multiple
// of this duration
#define MIN_BLOCK_DURATION_MS 2 // ms
#define MIN_BLOCK_SIZE_SAMPLES ( MIN_BLOCK_DURATION_MS * SAMPLE_RATE / 1000 )
#define MIN_SND_CRD_BLOCK_SIZE_SAMPLES ( MIN_BLOCK_DURATION_MS * SND_CRD_SAMPLE_RATE / 1000 )

View file

@ -1,5 +1,5 @@
/******************************************************************************\
* Copyright (c) 2004-2007
* Copyright (c) 2004-2008
*
* Author(s):
* Volker Fischer

View file

@ -1,5 +1,5 @@
/******************************************************************************\
* Copyright (c) 2004-2006
* Copyright (c) 2004-2008
*
* Author(s):
* Volker Fischer
@ -332,6 +332,22 @@ void CSound::InitRecordingAndPlayback ( int iNewBufferSize )
// TODO this should be done in the setinoutbuf functions
// create and activate buffers
ASIOCreateBuffers(bufferInfos, 2 * NUM_IN_OUT_CHANNELS,
iBufferSize * BYTES_PER_SAMPLE, &asioCallbacks);
// now set all the buffer details
for ( i = 0; i < 2 * NUM_IN_OUT_CHANNELS; i++ )
{
channelInfos[i].channel = NUM_IN_OUT_CHANNELS;
channelInfos[i].isInput = bufferInfos[i].isInput;
ASIOGetChannelInfo ( &channelInfos[i] );
}
/*
// reset interface so that all buffers are returned from the interface
waveInReset ( m_WaveIn );
@ -380,20 +396,7 @@ void CSound::InitRecordingAndPlayback ( int iNewBufferSize )
// TODO this should be done in the setinoutbuf functions
// create and activate buffers
// ASIOCreateBuffers(bufferInfos, 2 * NUM_IN_OUT_CHANNELS,
// iBufferSizeIn * BYTES_PER_SAMPLE, &asioCallbacks);
ASIOCreateBuffers(bufferInfos, 2 * NUM_IN_OUT_CHANNELS,
iBufferSize * BYTES_PER_SAMPLE, &asioCallbacks);
// now set all the buffer details
for ( i = 0; i < 2 * NUM_IN_OUT_CHANNELS; i++ )
{
channelInfos[i].channel = NUM_IN_OUT_CHANNELS;
channelInfos[i].isInput = bufferInfos[i].isInput;
ASIOGetChannelInfo ( &channelInfos[i] );
}
@ -519,7 +522,7 @@ pstrDevices[0] = driverInfo.name;
long lNumInChan;
long lNumOutChan;
ASIOGetChannels ( &lNumInChan, &lNumOutChan );
if ( ( lNumInChan != NUM_IN_OUT_CHANNELS ) || ( lNumOutChan != NUM_IN_OUT_CHANNELS ) )
if ( ( lNumInChan < NUM_IN_OUT_CHANNELS ) || ( lNumOutChan < NUM_IN_OUT_CHANNELS ) )
{
throw CGenErr ( "The audio device does not support required number of channels." );
}
@ -641,7 +644,7 @@ ASIOTime* CSound::bufferSwitchTimeInfo ( ASIOTime *timeInfo, long index, ASIOBoo
return 0L;
}
void CSound::bufferSwitch( long index, ASIOBool processNow )
void CSound::bufferSwitch ( long index, ASIOBool processNow )
{

View file

@ -35,8 +35,8 @@
/* Definitions ****************************************************************/
// switch here between ASIO (Steinberg) or native Windows(TM) sound interface
#undef USE_ASIO_SND_INTERFACE
//#define USE_ASIO_SND_INTERFACE
//#undef USE_ASIO_SND_INTERFACE
#define USE_ASIO_SND_INTERFACE
#define NUM_IN_OUT_CHANNELS 2 /* Stereo recording (but we only