1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-16 08:34:10 +02:00

Reduce indentation in AudioIO

Flipped some conditions and used if else-if to reduce the indentation in code.
This makes the code more readable.  No change in functionality.
Also created UpdateTimePositions() and made some bool functions void.

new variable mMaxFramesOutput used to communicate positional change.
This commit is contained in:
James Crook 2018-10-16 08:58:08 +01:00
parent 51b3076786
commit 45069794f3
2 changed files with 543 additions and 516 deletions

File diff suppressed because it is too large Load Diff

View File

@ -333,20 +333,22 @@ public:
void ComputeMidiTimings(
const PaStreamCallbackTimeInfo *timeInfo,
unsigned long framesPerBuffer);
void CheckSoundActivatedRecordingLevel();
void CheckSoundActivatedRecordingLevel(const void *inputBuffer);
bool FillOutputBuffers(
const void *inputBuffer,
void *outputBuffer,
unsigned long framesPerBuffer,
float * tempFloats, float *outputMeterFloats
);
bool FillInputBuffers(
void FillInputBuffers(
const void *inputBuffer,
unsigned long framesPerBuffer,
const PaStreamCallbackFlags statusFlags,
float * tempFloats
);
bool DoPlaythrough(
void UpdateTimePosition(
unsigned long framesPerBuffer
);
void DoPlaythrough(
const void *inputBuffer,
void *outputBuffer,
unsigned long framesPerBuffer,
@ -493,6 +495,7 @@ public:
double mFactor;
/// Audio playback rate in samples per second
double mRate;
unsigned long mMaxFramesOutput; // The actual number of frames output.
double mSeek;
double mPlaybackRingBufferSecs;