mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-22 14:32:58 +02:00
Preliminary function argument list changes and comments, for scrubbing project
In particular, use an options structure for AudioIO::StartStream to simplify calls ControlToolBar::PlayPlayRegion also takes that structure as an argument, and a SelectedRegion instead of two times And other changes
This commit is contained in:
@@ -42,6 +42,7 @@ class Resample;
|
||||
class TimeTrack;
|
||||
class AudioThread;
|
||||
class Meter;
|
||||
class SelectedRegion;
|
||||
class TimeTrack;
|
||||
class wxDialog;
|
||||
|
||||
@@ -74,6 +75,25 @@ DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_AUDIOIO_PLAYBACK, -1);
|
||||
DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_AUDIOIO_CAPTURE, -1);
|
||||
DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_AUDIOIO_MONITOR, -1);
|
||||
|
||||
// To avoid growing the argument list of StartStream, add fields here
|
||||
struct AudioIOStartStreamOptions
|
||||
{
|
||||
AudioIOStartStreamOptions()
|
||||
: timeTrack(NULL)
|
||||
, listener(NULL)
|
||||
, playLooped(false)
|
||||
, cutPreviewGapStart(0.0)
|
||||
, cutPreviewGapLen(0.0)
|
||||
{}
|
||||
|
||||
TimeTrack *timeTrack;
|
||||
AudioIOListener* listener;
|
||||
bool playLooped;
|
||||
double cutPreviewGapStart;
|
||||
double cutPreviewGapLen;
|
||||
|
||||
};
|
||||
|
||||
class AUDACITY_DLL_API AudioIO {
|
||||
|
||||
public:
|
||||
@@ -103,15 +123,9 @@ class AUDACITY_DLL_API AudioIO {
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
NoteTrackArray midiTracks,
|
||||
#endif
|
||||
TimeTrack *timeTrack, double sampleRate,
|
||||
double t0, double t1,
|
||||
AudioIOListener* listener,
|
||||
bool playLooped = false,
|
||||
double cutPreviewGapStart = 0.0,
|
||||
double cutPreviewGapLen = 0.0,
|
||||
// May be other than t0,
|
||||
// but will be constrained between t0 and t1
|
||||
const double *pStartTime = 0);
|
||||
double sampleRate, double t0, double t1,
|
||||
const AudioIOStartStreamOptions &options =
|
||||
AudioIOStartStreamOptions());
|
||||
|
||||
/** \brief Stop recording, playback or input monitoring.
|
||||
*
|
||||
@@ -281,9 +295,8 @@ class AUDACITY_DLL_API AudioIO {
|
||||
*/
|
||||
static int GetOptimalSupportedSampleRate();
|
||||
|
||||
/** \brief The time the stream has been playing for
|
||||
/** \brief During playback, the (unwarped) track time most recently played
|
||||
*
|
||||
* This is given in seconds based on starting at t0
|
||||
* When playing looped, this will start from t0 again,
|
||||
* too. So the returned time should be always between
|
||||
* t0 and t1
|
||||
@@ -375,10 +388,10 @@ private:
|
||||
#endif
|
||||
|
||||
/** \brief Get the number of audio samples free in all of the playback
|
||||
* buffers.
|
||||
*
|
||||
* Returns the smallest of the buffer free space values in the event that
|
||||
* they are different. */
|
||||
* buffers.
|
||||
*
|
||||
* Returns the smallest of the buffer free space values in the event that
|
||||
* they are different. */
|
||||
int GetCommonlyAvailPlayback();
|
||||
|
||||
/** \brief Get the number of audio samples ready in all of the recording
|
||||
@@ -535,7 +548,7 @@ private:
|
||||
Meter *mInputMeter;
|
||||
Meter *mOutputMeter;
|
||||
bool mUpdateMeters;
|
||||
bool mUpdatingMeters;
|
||||
volatile bool mUpdatingMeters;
|
||||
|
||||
#if USE_PORTMIXER
|
||||
PxMixer *mPortMixer;
|
||||
|
Reference in New Issue
Block a user