@@ -249,6 +249,42 @@ class AUDACITY_DLL_API AudioIoCallback /* not final */
249
249
const PaStreamCallbackTimeInfo *timeInfo,
250
250
const PaStreamCallbackFlags statusFlags, void *userData);
251
251
252
+ #ifdef EXPERIMENTAL_MIDI_OUT
253
+ void PrepareMidiIterator (bool send = true , double offset = 0 );
254
+ bool StartPortMidiStream ();
255
+
256
+ // Compute nondecreasing real time stamps, accounting for pauses, but not the
257
+ // synth latency.
258
+ double UncorrectedMidiEventTime ();
259
+
260
+ void OutputEvent ();
261
+ void FillMidiBuffers ();
262
+ void GetNextEvent ();
263
+ double PauseTime ();
264
+ void AllNotesOff (bool looping = false );
265
+
266
+ /* * \brief Compute the current PortMidi timestamp time.
267
+ *
268
+ * This is used by PortMidi to synchronize midi time to audio samples
269
+ */
270
+ PmTimestamp MidiTime ();
271
+
272
+ // Note: audio code solves the problem of soloing/muting tracks by scanning
273
+ // all playback tracks on every call to the audio buffer fill routine.
274
+ // We do the same for Midi, but it seems wasteful for at least two
275
+ // threads to be frequently polling to update status. This could be
276
+ // eliminated (also with a reduction in code I think) by updating mHasSolo
277
+ // each time a solo button is activated or deactivated. For now, I'm
278
+ // going to do this polling in the FillMidiBuffer routine to localize
279
+ // changes for midi to the midi code, but I'm declaring the variable
280
+ // here so possibly in the future, Audio code can use it too. -RBD
281
+ private:
282
+ bool mHasSolo ; // is any playback solo button pressed?
283
+ public:
284
+ bool SetHasSolo (bool hasSolo);
285
+ bool GetHasSolo () { return mHasSolo ; }
286
+ #endif
287
+
252
288
std::shared_ptr< AudioIOListener > GetListener () const
253
289
{ return mListener .lock (); }
254
290
void SetListener ( const std::shared_ptr< AudioIOListener > &listener);
@@ -612,29 +648,6 @@ class AUDACITY_DLL_API AudioIO final
612
648
wxLongLong GetLastPlaybackTime () const { return mLastPlaybackTimeMillis ; }
613
649
AudacityProject *GetOwningProject () const { return mOwningProject ; }
614
650
615
- #ifdef EXPERIMENTAL_MIDI_OUT
616
- /* * \brief Compute the current PortMidi timestamp time.
617
- *
618
- * This is used by PortMidi to synchronize midi time to audio samples
619
- */
620
- PmTimestamp MidiTime ();
621
-
622
- // Note: audio code solves the problem of soloing/muting tracks by scanning
623
- // all playback tracks on every call to the audio buffer fill routine.
624
- // We do the same for Midi, but it seems wasteful for at least two
625
- // threads to be frequently polling to update status. This could be
626
- // eliminated (also with a reduction in code I think) by updating mHasSolo
627
- // each time a solo button is activated or deactivated. For now, I'm
628
- // going to do this polling in the FillMidiBuffer routine to localize
629
- // changes for midi to the midi code, but I'm declaring the variable
630
- // here so possibly in the future, Audio code can use it too. -RBD
631
- private:
632
- bool mHasSolo ; // is any playback solo button pressed?
633
- public:
634
- bool SetHasSolo (bool hasSolo);
635
- bool GetHasSolo () { return mHasSolo ; }
636
- #endif
637
-
638
651
/* * \brief Pause and un-pause playback and recording */
639
652
void SetPaused (bool state);
640
653
@@ -741,21 +754,6 @@ class AUDACITY_DLL_API AudioIO final
741
754
sampleFormat captureFormat);
742
755
void FillBuffers ();
743
756
744
- #ifdef EXPERIMENTAL_MIDI_OUT
745
- void PrepareMidiIterator (bool send = true , double offset = 0 );
746
- bool StartPortMidiStream ();
747
-
748
- // Compute nondecreasing real time stamps, accounting for pauses, but not the
749
- // synth latency.
750
- double UncorrectedMidiEventTime ();
751
-
752
- void OutputEvent ();
753
- void FillMidiBuffers ();
754
- void GetNextEvent ();
755
- double PauseTime ();
756
- void AllNotesOff (bool looping = false );
757
- #endif
758
-
759
757
/* * \brief Get the number of audio samples free in all of the playback
760
758
* buffers.
761
759
*
0 commit comments