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(); } double MicLevelR() { return SignalLevelMeterR.MicLevel(); }
bool IsConnected() { return Channel.IsConnected(); } bool IsConnected() { return Channel.IsConnected(); }
/* we want to return the standard deviation. For that we need to calculate /* We want to return the standard deviation. For that we need to calculate
the sqaure root */ the sqaure root. */
double GetTimingStdDev() { return sqrt ( RespTimeMoAvBuf.GetAverage() ); } double GetTimingStdDev() { return sqrt ( RespTimeMoAvBuf.GetAverage() ); }
int GetAudioInFader() { return iAudioInFader; } int GetAudioInFader() { return iAudioInFader; }

View file

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

View file

@ -1,5 +1,5 @@
/******************************************************************************\ /******************************************************************************\
* Copyright (c) 2004-2006 * Copyright (c) 2004-2008
* *
* Author(s): * Author(s):
* Volker Fischer * 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 // reset interface so that all buffers are returned from the interface
waveInReset ( m_WaveIn ); 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 lNumInChan;
long lNumOutChan; long lNumOutChan;
ASIOGetChannels ( &lNumInChan, &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." ); throw CGenErr ( "The audio device does not support required number of channels." );
} }

View file

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