1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 15:53:52 +02:00

Recording options allow crossfade data for start of recording

This commit is contained in:
Paul Licameli
2018-05-25 08:01:14 -04:00
committed by Paul Licameli
parent f9cd5595d5
commit a0256e935c
2 changed files with 76 additions and 16 deletions

View File

@@ -111,6 +111,8 @@ wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
struct ScrubbingOptions;
using PRCrossfadeData = std::vector< std::vector < float > >;
// To avoid growing the argument list of StartStream, add fields here
struct AudioIOStartStreamOptions
{
@@ -141,6 +143,9 @@ struct AudioIOStartStreamOptions
// are all incompatible with scrubbing):
ScrubbingOptions *pScrubbingOptions {};
#endif
// contents may get swapped with empty vector
PRCrossfadeData *pCrossfadeData{};
};
struct TransportTracks {
@@ -549,6 +554,8 @@ private:
* If bOnlyBuffers is specified, it only cleans up the buffers. */
void StartStreamCleanup(bool bOnlyBuffers = false);
PRCrossfadeData mCrossfadeData{};
#ifdef EXPERIMENTAL_MIDI_OUT
// MIDI_PLAYBACK:
PmStream *mMidiStream;
@@ -831,6 +838,7 @@ private:
double mPreRoll{};
double mLatencyCorrection{}; // negative value usually
double mDuration{};
PRCrossfadeData mCrossfadeData;
// These are initialized by the main thread, then updated
// only by the thread calling FillBuffers:
@@ -839,6 +847,7 @@ private:
double TotalCorrection() const { return mLatencyCorrection - mPreRoll; }
double ToConsume() const;
double Consumed() const;
double ToDiscard() const;
} mRecordingSchedule{};
};