Fix user-facing and non-user-facing typos
Found via `codespell v2.1.dev0`
This commit is contained in:
parent
37a97ac470
commit
e1c3e59ee8
116 changed files with 233 additions and 233 deletions
|
|
@ -1962,7 +1962,7 @@ static PaError PaAlsaStreamComponent_InitialConfigure( PaAlsaStreamComponent *se
|
|||
{
|
||||
/* Configuration consists of setting all of ALSA's parameters.
|
||||
* These parameters come in two flavors: hardware parameters
|
||||
* and software paramters. Hardware parameters will affect
|
||||
* and software parameters. Hardware parameters will affect
|
||||
* the way the device is initialized, software parameters
|
||||
* affect the way ALSA interacts with me, the user-level client.
|
||||
*/
|
||||
|
|
@ -1976,7 +1976,7 @@ static PaError PaAlsaStreamComponent_InitialConfigure( PaAlsaStreamComponent *se
|
|||
|
||||
/* self->framesPerPeriod = framesPerHostBuffer; */
|
||||
|
||||
/* ... fill up the configuration space with all possibile
|
||||
/* ... fill up the configuration space with all possible
|
||||
* combinations of parameters this device will accept */
|
||||
ENSURE_( alsa_snd_pcm_hw_params_any( pcm, hwParams ), paUnanticipatedHostError );
|
||||
|
||||
|
|
@ -2161,7 +2161,7 @@ static PaError PaAlsaStream_Initialize( PaAlsaStream *self, PaAlsaHostApiReprese
|
|||
|
||||
self->framesPerUserBuffer = framesPerUserBuffer;
|
||||
self->neverDropInput = streamFlags & paNeverDropInput;
|
||||
/* XXX: Ignore paPrimeOutputBuffersUsingStreamCallback untill buffer priming is fully supported in pa_process.c */
|
||||
/* XXX: Ignore paPrimeOutputBuffersUsingStreamCallback until buffer priming is fully supported in pa_process.c */
|
||||
/*
|
||||
if( outParams & streamFlags & paPrimeOutputBuffersUsingStreamCallback )
|
||||
self->primeBuffers = 1;
|
||||
|
|
@ -2389,7 +2389,7 @@ static PaError PaAlsaStreamComponent_DetermineFramesPerBuffer( PaAlsaStreamCompo
|
|||
{
|
||||
framesPerHostBuffer *= 2;
|
||||
}
|
||||
/* One extra period is preferrable to one less (should be more robust) */
|
||||
/* One extra period is preferable to one less (should be more robust) */
|
||||
if( bufferSize / framesPerHostBuffer < numPeriods )
|
||||
{
|
||||
framesPerHostBuffer /= 2;
|
||||
|
|
@ -4186,7 +4186,7 @@ error:
|
|||
* directly is obtained from ALSA, we then request as much directly accessible memory as possible within this amount
|
||||
* from ALSA. The buffer memory is registered with the PA buffer processor and processing is carried out with
|
||||
* PaUtil_EndBufferProcessing. Finally, the number of processed frames is reported to ALSA. The processing can
|
||||
* happen in several iterations untill we have consumed the known number of available frames (or an xrun is detected).
|
||||
* happen in several iterations until we have consumed the known number of available frames (or an xrun is detected).
|
||||
*/
|
||||
static void *CallbackThreadFunc( void *userData )
|
||||
{
|
||||
|
|
@ -4272,7 +4272,7 @@ static void *CallbackThreadFunc( void *userData )
|
|||
/* There is still buffered output that needs to be processed */
|
||||
}
|
||||
|
||||
/* Wait for data to become available, this comes down to polling the ALSA file descriptors untill we have
|
||||
/* Wait for data to become available, this comes down to polling the ALSA file descriptors until we have
|
||||
* a number of available frames.
|
||||
*/
|
||||
PA_ENSURE( PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun ) );
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
08-20-01 More conversion, PA_StreamTime, Pa_GetHostError : Stephane Letz
|
||||
08-21-01 PaUInt8 bug correction, implementation of ASIOSTFloat32LSB and ASIOSTFloat32MSB native formats : Stephane Letz
|
||||
08-24-01 MAX_INT32_FP hack, another Uint8 fix : Stephane and Phil
|
||||
08-27-01 Implementation of hostBufferSize < userBufferSize case, better management of the ouput buffer when
|
||||
08-27-01 Implementation of hostBufferSize < userBufferSize case, better management of the output buffer when
|
||||
the stream is stopped : Stephane Letz
|
||||
08-28-01 Check the stream pointer for null in bufferSwitchTimeInfo, correct bug in bufferSwitchTimeInfo when
|
||||
the stream is stopped : Stephane Letz
|
||||
|
|
@ -55,11 +55,11 @@
|
|||
10-26-01 Management of hostBufferSize and userBufferSize of any size : Stephane Letz
|
||||
10-27-01 Improve calculus of hostBufferSize to be multiple or divisor of userBufferSize if possible : Stephane and Phil
|
||||
10-29-01 Change MAX_INT32_FP to (2147483520.0f) to prevent roundup to 0x80000000 : Phil Burk
|
||||
10-31-01 Clear the ouput buffer and user buffers in PaHost_StartOutput, correct bug in GetFirstMultiple : Stephane Letz
|
||||
10-31-01 Clear the output buffer and user buffers in PaHost_StartOutput, correct bug in GetFirstMultiple : Stephane Letz
|
||||
11-06-01 Rename functions : Stephane Letz
|
||||
11-08-01 New Pa_ASIO_Adaptor_Init function to init Callback adpatation variables, cleanup of Pa_ASIO_Callback_Input: Stephane Letz
|
||||
11-29-01 Break apart device loading to debug random failure in Pa_ASIO_QueryDeviceInfo ; Phil Burk
|
||||
01-03-02 Desallocate all resources in PaHost_Term for cases where Pa_CloseStream is not called properly : Stephane Letz
|
||||
01-03-02 Deallocate all resources in PaHost_Term for cases where Pa_CloseStream is not called properly : Stephane Letz
|
||||
02-01-02 Cleanup, test of multiple-stream opening : Stephane Letz
|
||||
19-02-02 New Pa_ASIO_loadDriver that calls CoInitialize on each thread on Windows : Stephane Letz
|
||||
09-04-02 Correct error code management in PaHost_Term, removes various compiler warning : Stephane Letz
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
12-06-02 Rehashed into new multi-api infrastructure, added support for all ASIO sample formats : Ross Bencina
|
||||
18-06-02 Added pa_asio.h, PaAsio_GetAvailableLatencyValues() : Ross B.
|
||||
21-06-02 Added SelectHostBufferSize() which selects host buffer size based on user latency parameters : Ross Bencina
|
||||
** NOTE maintanance history is now stored in CVS **
|
||||
** NOTE maintenance history is now stored in CVS **
|
||||
*/
|
||||
|
||||
/** @file
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
|
||||
#include "pa_win_coinitialize.h"
|
||||
|
||||
/* This version of pa_asio.cpp is currently only targetted at Win32,
|
||||
/* This version of pa_asio.cpp is currently only targeted at Win32,
|
||||
It would require a few tweaks to work with pre-OS X Macintosh.
|
||||
To make configuration easier, we define WIN32 here to make sure
|
||||
that the ASIO SDK knows this is Win32.
|
||||
|
|
@ -2549,7 +2549,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
enough to store at least two complete data blocks.
|
||||
|
||||
1) Determine the amount of latency to be added to the
|
||||
prefered ASIO latency.
|
||||
preferred ASIO latency.
|
||||
2) Make sure we have at lest one additional latency frame.
|
||||
3) Divide the number of frames by the desired block size to
|
||||
get the number (rounded up to pure integer) of blocks to
|
||||
|
|
@ -2568,7 +2568,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
while( lBlockingBufferSize > (lBlockingBufferSizePow2<<=1) );
|
||||
lBlockingBufferSize = lBlockingBufferSizePow2;
|
||||
|
||||
/* Compute total intput latency in seconds */
|
||||
/* Compute total input latency in seconds */
|
||||
stream->streamRepresentation.streamInfo.inputLatency =
|
||||
(double)( PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor )
|
||||
+ PaUtil_GetBufferProcessorInputLatencyFrames(&stream->blockingState->bufferProcessor)
|
||||
|
|
@ -2635,7 +2635,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
enough to store at least two complete data blocks.
|
||||
|
||||
1) Determine the amount of latency to be added to the
|
||||
prefered ASIO latency.
|
||||
preferred ASIO latency.
|
||||
2) Make sure we have at lest one additional latency frame.
|
||||
3) Divide the number of frames by the desired block size to
|
||||
get the number (rounded up to pure integer) of blocks to
|
||||
|
|
@ -2872,7 +2872,7 @@ static void bufferSwitch(long index, ASIOBool directProcess)
|
|||
//TAKEN FROM THE ASIO SDK
|
||||
|
||||
// the actual processing callback.
|
||||
// Beware that this is normally in a seperate thread, hence be sure that
|
||||
// Beware that this is normally in a separate thread, hence be sure that
|
||||
// you take care about thread synchronization. This is omitted here for
|
||||
// simplicity.
|
||||
|
||||
|
|
@ -2904,7 +2904,7 @@ static void bufferSwitch(long index, ASIOBool directProcess)
|
|||
static ASIOTime *bufferSwitchTimeInfo( ASIOTime *timeInfo, long index, ASIOBool directProcess )
|
||||
{
|
||||
// the actual processing callback.
|
||||
// Beware that this is normally in a seperate thread, hence be sure that
|
||||
// Beware that this is normally in a separate thread, hence be sure that
|
||||
// you take care about thread synchronization.
|
||||
|
||||
|
||||
|
|
@ -3269,7 +3269,7 @@ static long asioMessages(long selector, long value, void* message, double* opt)
|
|||
break;
|
||||
|
||||
case kAsioSupportsTimeInfo:
|
||||
// informs the driver wether the asioCallbacks.bufferSwitchTimeInfo() callback
|
||||
// informs the driver whether the asioCallbacks.bufferSwitchTimeInfo() callback
|
||||
// is supported.
|
||||
// For compatibility with ASIO 1.0 drivers the host application should always support
|
||||
// the "old" bufferSwitch method, too.
|
||||
|
|
@ -3277,7 +3277,7 @@ static long asioMessages(long selector, long value, void* message, double* opt)
|
|||
break;
|
||||
|
||||
case kAsioSupportsTimeCode:
|
||||
// informs the driver wether application is interested in time code info.
|
||||
// informs the driver whether application is interested in time code info.
|
||||
// If an application does not need to know about time code, the driver has less work
|
||||
// to do.
|
||||
ret = 0;
|
||||
|
|
@ -3423,7 +3423,7 @@ static PaError StopStream( PaStream *s )
|
|||
blockingState->stopFlag = TRUE;
|
||||
|
||||
/* Wait until requested number of buffers has been freed. Time
|
||||
out after twice the blocking i/o ouput buffer could have
|
||||
out after twice the blocking i/o output buffer could have
|
||||
been consumed. */
|
||||
DWORD timeout = (DWORD)( 2 * blockingState->writeRingBuffer.bufferSize * 1000
|
||||
/ stream->streamRepresentation.streamInfo.sampleRate );
|
||||
|
|
@ -3762,7 +3762,7 @@ static PaError WriteStream( PaStream *s ,
|
|||
unsigned int i; /* Just a counter. */
|
||||
|
||||
|
||||
/* Check if the stream ist still available ready to recieve new data. */
|
||||
/* Check if the stream is still available ready to receive new data. */
|
||||
if( blockingState->stopFlag || !stream->isActive )
|
||||
{
|
||||
PA_DEBUG(("Warning! Stream no longer available for writing in WriteStream()\n"));
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ latency will be provided even if a large latency setting is selected.
|
|||
- Latency: Latency settings are generally ignored. They may be used as a
|
||||
hint for buffer size in paHostFramesPerBufferUnspecified, or the value may
|
||||
be used in cases where additional buffering is needed, such as doing input and
|
||||
output on seperate devices. Latency settings are always automatically bound
|
||||
output on separate devices. Latency settings are always automatically bound
|
||||
to "safe" values, however, so setting extreme values here should not be
|
||||
an issue.
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ static bool ensureChannelNameSize( int size )
|
|||
return true;
|
||||
}
|
||||
/*
|
||||
* Function declared in pa_mac_core.h. retrives channel names.
|
||||
* Function declared in pa_mac_core.h. retrieves channel names.
|
||||
*/
|
||||
const char *PaMacCore_GetChannelName( int device, int channelIndex, bool input )
|
||||
{
|
||||
|
|
@ -1358,7 +1358,7 @@ static PaError OpenAndSetupOneAudioUnit(
|
|||
/* set device format first, but only touch the device if the user asked */
|
||||
if( inStreamParams ) {
|
||||
/*The callback never calls back if we don't set the FPB */
|
||||
/*This seems wierd, because I would think setting anything on the device
|
||||
/*This seems weird, because I would think setting anything on the device
|
||||
would be disruptive.*/
|
||||
paResult = setBestFramesPerBuffer( *audioDevice, FALSE,
|
||||
requestedFramesPerBuffer,
|
||||
|
|
@ -1376,7 +1376,7 @@ static PaError OpenAndSetupOneAudioUnit(
|
|||
}
|
||||
if( outStreamParams && !inStreamParams ) {
|
||||
/*The callback never calls back if we don't set the FPB */
|
||||
/*This seems wierd, because I would think setting anything on the device
|
||||
/*This seems weird, because I would think setting anything on the device
|
||||
would be disruptive.*/
|
||||
paResult = setBestFramesPerBuffer( *audioDevice, TRUE,
|
||||
requestedFramesPerBuffer,
|
||||
|
|
@ -1758,7 +1758,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
inputChannelCount = 0;
|
||||
inputSampleFormat = hostInputSampleFormat = paFloat32; /* Surpress 'uninitialised var' warnings. */
|
||||
inputSampleFormat = hostInputSampleFormat = paFloat32; /* Suppress 'uninitialised var' warnings. */
|
||||
}
|
||||
|
||||
if( outputParameters )
|
||||
|
|
@ -1788,7 +1788,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
outputChannelCount = 0;
|
||||
outputSampleFormat = hostOutputSampleFormat = paFloat32; /* Surpress 'uninitialized var' warnings. */
|
||||
outputSampleFormat = hostOutputSampleFormat = paFloat32; /* Suppress 'uninitialized var' warnings. */
|
||||
}
|
||||
|
||||
/* validate platform specific flags */
|
||||
|
|
@ -2182,8 +2182,8 @@ static OSStatus AudioIOProc( void *inRefCon,
|
|||
|
||||
/* -----------------------------------------------------------------*\
|
||||
This output may be useful for debugging,
|
||||
But printing durring the callback is a bad enough idea that
|
||||
this is not enabled by enableing the usual debugging calls.
|
||||
But printing during the callback is a bad enough idea that
|
||||
this is not enabled by enabling the usual debugging calls.
|
||||
\* -----------------------------------------------------------------*/
|
||||
/*
|
||||
static int renderCount = 0;
|
||||
|
|
@ -2622,7 +2622,7 @@ stop_stream:
|
|||
static PaError CloseStream( PaStream* s )
|
||||
{
|
||||
/* This may be called from a failed OpenStream.
|
||||
Therefore, each piece of info is treated seperately. */
|
||||
Therefore, each piece of info is treated separately. */
|
||||
PaError result = paNoError;
|
||||
PaMacCoreStream *stream = (PaMacCoreStream*)s;
|
||||
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ PaError blioSetIsInputEmpty( PaMacBlio *blio, bool isEmpty )
|
|||
goto done;
|
||||
|
||||
/* we need to update the value. Here's what we do:
|
||||
* - Lock the mutex, so noone else can write.
|
||||
* - Lock the mutex, so no one else can write.
|
||||
* - update the value.
|
||||
* - unlock.
|
||||
* - broadcast to all listeners.
|
||||
|
|
@ -239,7 +239,7 @@ PaError blioSetIsOutputFull( PaMacBlio *blio, bool isFull )
|
|||
goto done;
|
||||
|
||||
/* we need to update the value. Here's what we do:
|
||||
* - Lock the mutex, so noone else can write.
|
||||
* - Lock the mutex, so no one else can write.
|
||||
* - update the value.
|
||||
* - unlock.
|
||||
* - broadcast to all listeners.
|
||||
|
|
@ -334,7 +334,7 @@ PaError destroyBlioRingBuffers( PaMacBlio *blio )
|
|||
}
|
||||
|
||||
/*
|
||||
* this is the BlioCallback function. It expects to recieve a PaMacBlio Object
|
||||
* this is the BlioCallback function. It expects to receive a PaMacBlio Object
|
||||
* pointer as userData.
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ PaError PaMacCore_SetError(OSStatus error, int line, int isError)
|
|||
errorText = "Audio Unit: Format Not Supported";
|
||||
result = paInternalError; break;
|
||||
case kAudioUnitErr_Uninitialized:
|
||||
errorText = "Audio Unit: Unitialized";
|
||||
errorText = "Audio Unit: Uninitialized";
|
||||
result = paInternalError; break;
|
||||
case kAudioUnitErr_InvalidScope:
|
||||
errorText = "Audio Unit: Invalid Scope";
|
||||
|
|
@ -296,12 +296,12 @@ long computeRingBufferSize( const PaStreamParameters *inputParameters,
|
|||
|
||||
|
||||
/*
|
||||
* Durring testing of core audio, I found that serious crashes could occur
|
||||
* During testing of core audio, I found that serious crashes could occur
|
||||
* if properties such as sample rate were changed multiple times in rapid
|
||||
* succession. The function below could be used to with a condition variable.
|
||||
* to prevent propertychanges from happening until the last property
|
||||
* change is acknowledged. Instead, I implemented a busy-wait, which is simpler
|
||||
* to implement b/c in second round of testing (nov '09) property changes occured
|
||||
* to implement b/c in second round of testing (nov '09) property changes occurred
|
||||
* quickly and so there was no real way to test the condition variable implementation.
|
||||
* therefore, this function is not used, but it is aluded to in commented code below,
|
||||
* since it represents a theoretically better implementation.
|
||||
|
|
@ -505,7 +505,7 @@ PaError setBestSampleRateForDevice( const AudioDeviceID device,
|
|||
if( err )
|
||||
return ERR( err );
|
||||
|
||||
/* -- otherwise, something wierd happened: we didn't set the rate, and we got no errors. Just bail. */
|
||||
/* -- otherwise, something weird happened: we didn't set the rate, and we got no errors. Just bail. */
|
||||
return paInternalError;
|
||||
}
|
||||
|
||||
|
|
@ -516,7 +516,7 @@ PaError setBestSampleRateForDevice( const AudioDeviceID device,
|
|||
is available, it uses the smallest available size.
|
||||
actualFramesPerBuffer will be set to the actual value on successful return.
|
||||
OK to pass NULL to actualFramesPerBuffer.
|
||||
The logic is very simmilar too setBestSampleRate only failure here is
|
||||
The logic is very similar too setBestSampleRate only failure here is
|
||||
not usually catastrophic.
|
||||
*/
|
||||
PaError setBestFramesPerBuffer( const AudioDeviceID device,
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@
|
|||
#define INPUT_ELEMENT (1)
|
||||
#define OUTPUT_ELEMENT (0)
|
||||
|
||||
/* Normal level of debugging: fine for most apps that don't mind the occational warning being printf'ed */
|
||||
/* Normal level of debugging: fine for most apps that don't mind the occasional warning being printf'ed */
|
||||
/*
|
||||
*/
|
||||
#define MAC_CORE_DEBUG
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
# define DBUG(MSG)
|
||||
#endif
|
||||
|
||||
/* Verbose Debugging: useful for developement */
|
||||
/* Verbose Debugging: useful for development */
|
||||
/*
|
||||
#define MAC_CORE_VERBOSE_DEBUG
|
||||
*/
|
||||
|
|
@ -183,7 +183,7 @@ PaError setBestSampleRateForDevice( const AudioDeviceID device,
|
|||
is available, it uses the smallest available size.
|
||||
actualFramesPerBuffer will be set to the actual value on successful return.
|
||||
OK to pass NULL to actualFramesPerBuffer.
|
||||
The logic is very simmilar too setBestSampleRate only failure here is
|
||||
The logic is very similar too setBestSampleRate only failure here is
|
||||
not usually catastrophic.
|
||||
*/
|
||||
PaError setBestFramesPerBuffer( const AudioDeviceID device,
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
|
||||
/*
|
||||
Use the earliest version of DX required, no need to polute the namespace
|
||||
Use the earliest version of DX required, no need to pollute the namespace
|
||||
*/
|
||||
#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE
|
||||
#define DIRECTSOUND_VERSION 0x0800
|
||||
|
|
@ -667,7 +667,7 @@ static GUID pawin_IID_IKsPropertySet =
|
|||
property, and the other is using DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE.
|
||||
I tried both methods and only the second worked. I found two postings on the
|
||||
net from people who had the same problem with the first method, so I think the method used here is
|
||||
more common/likely to work. The probem is that IKsPropertySet_Get returns S_OK
|
||||
more common/likely to work. The problem is that IKsPropertySet_Get returns S_OK
|
||||
but the fields of the device description are not filled in.
|
||||
|
||||
The mechanism we use works by registering an enumeration callback which is called for
|
||||
|
|
@ -757,7 +757,7 @@ static double defaultSampleRateSearchOrder_[] =
|
|||
/************************************************************************************
|
||||
** Extract capabilities from an output device, and add it to the device info list
|
||||
** if successful. This function assumes that there is enough room in the
|
||||
** device info list to accomodate all entries.
|
||||
** device info list to accommodate all entries.
|
||||
**
|
||||
** The device will not be added to the device list if any errors are encountered.
|
||||
*/
|
||||
|
|
@ -1014,7 +1014,7 @@ static PaError AddOutputDeviceInfoFromDirectSound(
|
|||
/************************************************************************************
|
||||
** Extract capabilities from an input device, and add it to the device info list
|
||||
** if successful. This function assumes that there is enough room in the
|
||||
** device info list to accomodate all entries.
|
||||
** device info list to accommodate all entries.
|
||||
**
|
||||
** The device will not be added to the device list if any errors are encountered.
|
||||
*/
|
||||
|
|
@ -2255,7 +2255,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
|
||||
/* create half duplex buffers. also used for full-duplex streams which didn't
|
||||
succeed when using the full duplex API. that could happen because
|
||||
DX8 or greater isnt installed, the i/o devices aren't the same
|
||||
DX8 or greater isn't installed, the i/o devices aren't the same
|
||||
physical device. etc.
|
||||
*/
|
||||
|
||||
|
|
@ -2798,7 +2798,7 @@ PA_THREAD_FUNC ProcessingThreadProc( void *pArg )
|
|||
|
||||
#else
|
||||
|
||||
/* tick using WaitForSingleObject timout */
|
||||
/* tick using WaitForSingleObject timeout */
|
||||
while ( WaitForSingleObject( stream->processingCompleted, timerPeriodMs ) == WAIT_TIMEOUT )
|
||||
{
|
||||
TimerCallback( 0, 0, (DWORD_PTR)pArg, 0, 0 );
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ void PaWinDs_TerminateDSoundEntryPoints(void)
|
|||
{
|
||||
if( paWinDsDSoundEntryPoints.hInstance_ != NULL )
|
||||
{
|
||||
/* ensure that we crash reliably if the entry points arent initialised */
|
||||
/* ensure that we crash reliably if the entry points aren't initialised */
|
||||
paWinDsDSoundEntryPoints.DirectSoundCreate = 0;
|
||||
paWinDsDSoundEntryPoints.DirectSoundEnumerateW = 0;
|
||||
paWinDsDSoundEntryPoints.DirectSoundEnumerateA = 0;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
#endif
|
||||
|
||||
/*
|
||||
Use the earliest version of DX required, no need to polute the namespace
|
||||
Use the earliest version of DX required, no need to pollute the namespace
|
||||
*/
|
||||
#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE
|
||||
#define DIRECTSOUND_VERSION 0x0800
|
||||
|
|
|
|||
|
|
@ -466,7 +466,7 @@ static PaError QueryDevice( char *deviceName, PaOSSHostApiRepresentation *ossApi
|
|||
|
||||
/* douglas:
|
||||
we have to do this querying in a slightly different order. apparently
|
||||
some sound cards will give you different info based on their settins.
|
||||
some sound cards will give you different info based on their settings.
|
||||
e.g. a card might give you stereo at 22kHz but only mono at 44kHz.
|
||||
the correct order for OSS is: format, channels, sample rate
|
||||
*/
|
||||
|
|
@ -1335,7 +1335,7 @@ static PaError PaOssStream_WaitForFrames( PaOssStream *stream, unsigned long *fr
|
|||
#ifdef PTHREAD_CANCELED
|
||||
pthread_testcancel();
|
||||
#else
|
||||
/* avoid indefinite waiting on thread not supporting cancelation */
|
||||
/* avoid indefinite waiting on thread not supporting cancellation */
|
||||
if( stream->callbackStop || stream->callbackAbort )
|
||||
{
|
||||
PA_DEBUG(( "Cancelling PaOssStream_WaitForFrames\n" ));
|
||||
|
|
@ -1369,7 +1369,7 @@ static PaError PaOssStream_WaitForFrames( PaOssStream *stream, unsigned long *fr
|
|||
#ifdef PTHREAD_CANCELED
|
||||
pthread_testcancel();
|
||||
#else
|
||||
/* avoid indefinite waiting on thread not supporting cancelation */
|
||||
/* avoid indefinite waiting on thread not supporting cancellation */
|
||||
if( stream->callbackStop || stream->callbackAbort )
|
||||
{
|
||||
PA_DEBUG(( "Cancelling PaOssStream_WaitForFrames\n" ));
|
||||
|
|
@ -1640,7 +1640,7 @@ static void *PaOSS_AudioThreadProc( void *userData )
|
|||
#ifdef PTHREAD_CANCELED
|
||||
pthread_testcancel();
|
||||
#else
|
||||
if( stream->callbackAbort ) /* avoid indefinite waiting on thread not supporting cancelation */
|
||||
if( stream->callbackAbort ) /* avoid indefinite waiting on thread not supporting cancellation */
|
||||
{
|
||||
PA_DEBUG(( "Aborting callback thread\n" ));
|
||||
break;
|
||||
|
|
@ -1681,7 +1681,7 @@ static void *PaOSS_AudioThreadProc( void *userData )
|
|||
callbackResult = paComplete;
|
||||
}
|
||||
|
||||
if( stream->callbackAbort ) /* avoid indefinite waiting on thread not supporting cancelation */
|
||||
if( stream->callbackAbort ) /* avoid indefinite waiting on thread not supporting cancellation */
|
||||
{
|
||||
PA_DEBUG(( "Aborting callback thread\n" ));
|
||||
break;
|
||||
|
|
@ -1793,7 +1793,7 @@ static PaError CloseStream( PaStream* s )
|
|||
*
|
||||
* Aspect StreamState: After returning, the stream shall be in the Active state, implying that an eventual
|
||||
* callback will be repeatedly called in a separate thread. If a separate thread is started this function
|
||||
* will block untill it has started processing audio, otherwise audio processing is started directly.
|
||||
* will block until it has started processing audio, otherwise audio processing is started directly.
|
||||
*/
|
||||
static PaError StartStream( PaStream *s )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
inputChannelCount = 0;
|
||||
inputSampleFormat = hostInputSampleFormat = paInt16; /* Surpress 'uninitialised var' warnings. */
|
||||
inputSampleFormat = hostInputSampleFormat = paInt16; /* Suppress 'uninitialised var' warnings. */
|
||||
}
|
||||
|
||||
if( outputParameters )
|
||||
|
|
@ -442,7 +442,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
outputChannelCount = 0;
|
||||
outputSampleFormat = hostOutputSampleFormat = paInt16; /* Surpress 'uninitialized var' warnings. */
|
||||
outputSampleFormat = hostOutputSampleFormat = paInt16; /* Suppress 'uninitialized var' warnings. */
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ typedef KS_LogicalMemoryType *PKS_LogicalMemoryType;
|
|||
typedef struct _PIPE_TERMINATION {
|
||||
ULONG Flags;
|
||||
ULONG OutsideFactors;
|
||||
ULONG Weigth;
|
||||
ULONG Weight;
|
||||
KS_FRAMING_RANGE PhysicalRange;
|
||||
KS_FRAMING_RANGE_WEIGHTED OptimalRange;
|
||||
KS_COMPRESSION Compression;
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ typedef struct _pa_AudioClientProperties {
|
|||
PA_THREAD_FUNC ProcThreadEvent(void *param);
|
||||
PA_THREAD_FUNC ProcThreadPoll(void *param);
|
||||
|
||||
// Error codes (availabe since Windows 7)
|
||||
// Error codes (available since Windows 7)
|
||||
#ifndef AUDCLNT_E_BUFFER_ERROR
|
||||
#define AUDCLNT_E_BUFFER_ERROR AUDCLNT_ERR(0x018)
|
||||
#endif
|
||||
|
|
@ -321,7 +321,7 @@ PA_THREAD_FUNC ProcThreadPoll(void *param);
|
|||
#define AUDCLNT_E_INVALID_DEVICE_PERIOD AUDCLNT_ERR(0x020)
|
||||
#endif
|
||||
|
||||
// Stream flags (availabe since Windows 7)
|
||||
// Stream flags (available since Windows 7)
|
||||
#ifndef AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY
|
||||
#define AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY 0x08000000
|
||||
#endif
|
||||
|
|
@ -489,7 +489,7 @@ typedef struct
|
|||
|
||||
PaWinUtilComInitializationResult comInitializationResult;
|
||||
|
||||
// this is the REAL number of devices, whether they are usefull to PA or not!
|
||||
// this is the REAL number of devices, whether they are useful to PA or not!
|
||||
UINT32 deviceCount;
|
||||
|
||||
PaWasapiDeviceInfo *devInfo;
|
||||
|
|
@ -783,7 +783,7 @@ static PaError __LogPaError(PaError err, const char *func, const char *file, int
|
|||
// ------------------------------------------------------------------------------------------
|
||||
/*! \class ThreadSleepScheduler
|
||||
Allows to emulate thread sleep of less than 1 millisecond under Windows. Scheduler
|
||||
calculates number of times the thread must run untill next sleep of 1 millisecond.
|
||||
calculates number of times the thread must run until next sleep of 1 millisecond.
|
||||
It does not make thread sleeping for real number of microseconds but rather controls
|
||||
how many of imaginary microseconds the thread task can allow thread to sleep.
|
||||
*/
|
||||
|
|
@ -3168,7 +3168,7 @@ static void _CalculateAlignedPeriod(PaWasapiSubStream *pSub, UINT32 *nFramesPerL
|
|||
// Align frames to HD Audio packet size of 128 bytes for Exclusive mode only.
|
||||
// Not aligning on Windows Vista will cause Event timeout, although Windows 7 will
|
||||
// return AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED error to realign buffer. Aligning is necessary
|
||||
// for Exclusive mode only! when audio data is feeded directly to hardware.
|
||||
// for Exclusive mode only! when audio data is fed directly to hardware.
|
||||
if (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
|
||||
{
|
||||
(*nFramesPerLatency) = AlignFramesPerBuffer((*nFramesPerLatency),
|
||||
|
|
@ -3205,7 +3205,7 @@ static void _CalculatePeriodicity(PaWasapiSubStream *pSub, BOOL output, REFERENC
|
|||
REFERENCE_TIME userPeriodicity;
|
||||
|
||||
// Align frames backwards, so device will likely make buffer read ready when we are ready
|
||||
// to read it (our sheduling will wait for amount of millisoconds of frames_per_buffer)
|
||||
// to read it (our scheduling will wait for amount of millisoconds of frames_per_buffer)
|
||||
alignedFrames = AlignFramesPerBuffer(pSub->params.frames_per_buffer,
|
||||
pSub->wavex.Format.nSamplesPerSec, pSub->wavex.Format.nBlockAlign, ALIGN_BWD);
|
||||
|
||||
|
|
@ -3562,7 +3562,7 @@ static HRESULT CreateAudioClient(PaWasapiStream *pStream, PaWasapiSubStream *pSu
|
|||
_RecalculateBuffersCount(pSub, userFramesPerBuffer, MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec),
|
||||
fullDuplex);
|
||||
|
||||
// No error, client is succesfully created
|
||||
// No error, client is successfully created
|
||||
(*pa_error) = paNoError;
|
||||
|
||||
done:
|
||||
|
|
@ -3904,7 +3904,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
inputChannelCount = 0;
|
||||
inputSampleFormat = hostInputSampleFormat = paInt16; /* Surpress 'uninitialised var' warnings. */
|
||||
inputSampleFormat = hostInputSampleFormat = paInt16; /* Suppress 'uninitialised var' warnings. */
|
||||
}
|
||||
|
||||
// Try create device: Output
|
||||
|
|
@ -4007,7 +4007,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
outputChannelCount = 0;
|
||||
outputSampleFormat = hostOutputSampleFormat = paInt16; /* Surpress 'uninitialized var' warnings. */
|
||||
outputSampleFormat = hostOutputSampleFormat = paInt16; /* Suppress 'uninitialized var' warnings. */
|
||||
}
|
||||
|
||||
// log full-duplex
|
||||
|
|
@ -4065,7 +4065,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
|
||||
// serious problem #2 - No, Not a problem, as framesPerHostCallback take into account
|
||||
// sample size while it is not a problem for PA full-duplex, we must care of
|
||||
// preriod only!
|
||||
// period only!
|
||||
/*if (stream->out.framesPerHostCallback != stream->in.framesPerHostCallback)
|
||||
{
|
||||
PRINT(("WASAPI: OpenStream: framesPerHostCallback discrepancy\n"));
|
||||
|
|
@ -4636,7 +4636,7 @@ static PaError ReadStream( PaStream* s, void *_buffer, unsigned long frames )
|
|||
((BYTE **)user_buffer)[i] = ((BYTE **)_buffer)[i];
|
||||
}
|
||||
|
||||
// Findout if there are tail frames, flush them all before reading hardware
|
||||
// Find out if there are tail frames, flush them all before reading hardware
|
||||
if ((available = PaUtil_GetRingBufferReadAvailable(stream->in.tailBuffer)) != 0)
|
||||
{
|
||||
ring_buffer_size_t buf1_size = 0, buf2_size = 0, read, desired;
|
||||
|
|
@ -4815,7 +4815,7 @@ static PaError WriteStream( PaStream* s, const void *_buffer, unsigned long fram
|
|||
((const BYTE **)user_buffer)[i] = ((const BYTE **)_buffer)[i];
|
||||
}
|
||||
|
||||
// Blocking (potentially, untill 'frames' are consumed) loop
|
||||
// Blocking (potentially, until 'frames' are consumed) loop
|
||||
while (frames != 0)
|
||||
{
|
||||
// Check if blocking call must be interrupted
|
||||
|
|
@ -5694,7 +5694,7 @@ static HRESULT ProcessInputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor
|
|||
if (WaitForSingleObject(stream->hCloseRequest, 0) != WAIT_TIMEOUT)
|
||||
break;
|
||||
|
||||
// Findout if any frames available
|
||||
// Find out if any frames available
|
||||
frames = 0;
|
||||
if ((hr = _PollGetInputFramesAvailable(stream, &frames)) != S_OK)
|
||||
return hr;
|
||||
|
|
@ -6033,7 +6033,7 @@ static UINT32 GetSleepTime(PaWasapiStream *stream, UINT32 sleepTimeIn, UINT32 sl
|
|||
UINT32 sleepTime;
|
||||
|
||||
// According to the issue [https://github.com/PortAudio/portaudio/issues/303] glitches may occur when user frames
|
||||
// equal to 1/2 of the host buffer frames, therefore the emperical workaround for this problem is to lower
|
||||
// equal to 1/2 of the host buffer frames, therefore the empirical workaround for this problem is to lower
|
||||
// the sleep time by 2
|
||||
if (userFramesOut != 0)
|
||||
{
|
||||
|
|
@ -6157,7 +6157,7 @@ PA_THREAD_FUNC ProcThreadPoll(void *param)
|
|||
// Request fine (1 ms) granularity of the system timer functions to guarantee correct logic around WaitForSingleObject
|
||||
SystemTimer_SetGranularity(&timer, 1);
|
||||
|
||||
// Claculate sleep time of the processing loop (inside WaitForSingleObject)
|
||||
// Calculate sleep time of the processing loop (inside WaitForSingleObject)
|
||||
sleepTime = ConfigureLoopSleepTimeAndScheduler(stream, &scheduler);
|
||||
|
||||
// Setup data processors
|
||||
|
|
@ -6376,10 +6376,10 @@ PA_THREAD_FUNC ProcThreadPoll(void *param)
|
|||
break;
|
||||
}
|
||||
|
||||
// process equal ammount of frames
|
||||
// process equal amount of frames
|
||||
if (o_frames >= i_frames)
|
||||
{
|
||||
// process input ammount of frames
|
||||
// process input amount of frames
|
||||
UINT32 o_processed = i_frames;
|
||||
|
||||
// get host output buffer
|
||||
|
|
|
|||
|
|
@ -4380,7 +4380,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
userInputChannels = 0;
|
||||
inputSampleFormat = hostInputSampleFormat = paInt16; /* Supress 'uninitialised var' warnings. */
|
||||
inputSampleFormat = hostInputSampleFormat = paInt16; /* Suppress 'uninitialised var' warnings. */
|
||||
}
|
||||
|
||||
if( outputParameters )
|
||||
|
|
@ -4415,7 +4415,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
userOutputChannels = 0;
|
||||
outputSampleFormat = hostOutputSampleFormat = paInt16; /* Supress 'uninitialized var' warnings. */
|
||||
outputSampleFormat = hostOutputSampleFormat = paInt16; /* Suppress 'uninitialized var' warnings. */
|
||||
}
|
||||
|
||||
/* validate platform specific flags */
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ by the user, and can be limited in functionality or difficult to use.
|
|||
|
||||
This is where the PortAudio "WDM-KS" host implementation comes in.
|
||||
It directly connects PortAudio to the same Kernel Streaming API which
|
||||
those ASIO bridges use. This avoids the mixing penatly of DirectX,
|
||||
those ASIO bridges use. This avoids the mixing penalty of DirectX,
|
||||
giving at least as good latency as any ASIO driver, but it has the
|
||||
advantage of working with ANY Windows audio hardware which is available
|
||||
through the normal MME/DirectX routes without the user requiring
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
RDB20020417 - stopped counting WAVE_MAPPER when there were no real devices
|
||||
refactoring, renaming and fixed a few edge case bugs
|
||||
RDB20020531 - converted to V19 framework
|
||||
** NOTE maintanance history is now stored in CVS **
|
||||
** NOTE maintenance history is now stored in CVS **
|
||||
*/
|
||||
|
||||
/** @file
|
||||
|
|
@ -192,7 +192,7 @@
|
|||
|
||||
/* When client suggestedLatency could result in many host buffers, we aim to have around 8,
|
||||
based off Windows documentation that suggests that the kmixer uses 8 buffers. This choice
|
||||
is somewhat arbitrary here, since we havn't observed significant stability degredation
|
||||
is somewhat arbitrary here, since we haven't observed significant stability degredation
|
||||
with using either more, or less buffers.
|
||||
*/
|
||||
#define PA_MME_TARGET_HOST_BUFFER_COUNT_ 8
|
||||
|
|
@ -2563,7 +2563,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
stream->primeStreamUsingCallback = ( (streamFlags&paPrimeOutputBuffersUsingStreamCallback) && streamCallback ) ? 1 : 0;
|
||||
|
||||
/* time to sleep when throttling due to >100% cpu usage.
|
||||
-a quater of a buffer's duration */
|
||||
-a quarter of a buffer's duration */
|
||||
stream->throttledSleepMsecs =
|
||||
(unsigned long)(stream->bufferProcessor.framesPerHostBuffer *
|
||||
stream->bufferProcessor.samplePeriod * .25 * 1000);
|
||||
|
|
@ -2886,7 +2886,7 @@ PA_THREAD_FUNC ProcessingThreadProc( void *pArg )
|
|||
if( waitResult == WAIT_FAILED )
|
||||
{
|
||||
result = paUnanticipatedHostError;
|
||||
/** @todo FIXME/REVIEW: can't return host error info from an asyncronous thread. see http://www.portaudio.com/trac/ticket/143 */
|
||||
/** @todo FIXME/REVIEW: can't return host error info from an asynchronous thread. see http://www.portaudio.com/trac/ticket/143 */
|
||||
done = 1;
|
||||
}
|
||||
else if( waitResult == WAIT_TIMEOUT )
|
||||
|
|
@ -3161,7 +3161,7 @@ PA_THREAD_FUNC ProcessingThreadProc( void *pArg )
|
|||
if( outputUnderflow && !done && !stream->stopProcessing )
|
||||
{
|
||||
/* Recover from underflow in the case where the
|
||||
underflow occured while processing the buffer
|
||||
underflow occurred while processing the buffer
|
||||
we just finished */
|
||||
|
||||
result = CatchUpOutputBuffers( stream );
|
||||
|
|
@ -3359,7 +3359,7 @@ static PaError StartStream( PaStream *s )
|
|||
}
|
||||
}
|
||||
|
||||
/* we queue all channels of a single buffer frame (accross all
|
||||
/* we queue all channels of a single buffer frame (across all
|
||||
devices, because some multidevice multichannel drivers work
|
||||
better this way */
|
||||
for( j=0; j<stream->output.deviceCount; ++j )
|
||||
|
|
|
|||
Loading…
Reference in a new issue