Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 637110
Collapse All | Expand All

(-)src/AudioIO.cpp~ (-1 / +11 lines)
Lines 963-968 Link Here
963
};
963
};
964
#endif
964
#endif
965
965
966
#ifdef EXPERIMENTAL_MIDI_OUT
966
// return the system time as a double
967
// return the system time as a double
967
static double streamStartTime = 0; // bias system time to small number
968
static double streamStartTime = 0; // bias system time to small number
968
969
Lines 982-987 Link Here
982
983
983
   return PaUtil_GetTime() - streamStartTime;
984
   return PaUtil_GetTime() - streamStartTime;
984
}
985
}
986
#endif
985
987
986
const int AudioIO::StandardRates[] = {
988
const int AudioIO::StandardRates[] = {
987
   8000,
989
   8000,
Lines 1790-1795 Link Here
1790
   }
1792
   }
1791
#endif
1793
#endif
1792
1794
1795
#ifdef EXPERIMENTAL_MIDI_OUT
1793
   // We use audio latency to estimate how far ahead of DACS we are writing
1796
   // We use audio latency to estimate how far ahead of DACS we are writing
1794
   if (mPortStreamV19 != NULL && mLastPaError == paNoError) {
1797
   if (mPortStreamV19 != NULL && mLastPaError == paNoError) {
1795
      const PaStreamInfo* info = Pa_GetStreamInfo(mPortStreamV19);
1798
      const PaStreamInfo* info = Pa_GetStreamInfo(mPortStreamV19);
Lines 1798-1803 Link Here
1798
      mAudioOutLatency = info->outputLatency;
1801
      mAudioOutLatency = info->outputLatency;
1799
      mSystemMinusAudioTimePlusLatency += mAudioOutLatency;
1802
      mSystemMinusAudioTimePlusLatency += mAudioOutLatency;
1800
   }
1803
   }
1804
#endif
1801
1805
1802
   return (mLastPaError == paNoError);
1806
   return (mLastPaError == paNoError);
1803
}
1807
}
Lines 1925-1932 Link Here
1925
1929
1926
   double playbackTime = 4.0;
1930
   double playbackTime = 4.0;
1927
1931
1932
#ifdef EXPERIMENTAL_MIDI_OUT
1928
   streamStartTime = 0;
1933
   streamStartTime = 0;
1929
   streamStartTime = SystemTime(mUsingAlsa);
1934
   streamStartTime = SystemTime(mUsingAlsa);
1935
#endif
1930
1936
1931
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
1937
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
1932
   bool scrubbing = (options.pScrubbingOptions != nullptr);
1938
   bool scrubbing = (options.pScrubbingOptions != nullptr);
Lines 4619-4631 Link Here
4619
         (float *)alloca(framesPerBuffer*numPlaybackChannels * sizeof(float)) :
4625
         (float *)alloca(framesPerBuffer*numPlaybackChannels * sizeof(float)) :
4620
         (float *)outputBuffer;
4626
         (float *)outputBuffer;
4621
4627
4628
#ifdef EXPERIMENTAL_MIDI_OUT
4622
   if (gAudioIO->mCallbackCount++ == 0) {
4629
   if (gAudioIO->mCallbackCount++ == 0) {
4623
       // This is effectively mSystemMinusAudioTime when the buffer is empty:
4630
       // This is effectively mSystemMinusAudioTime when the buffer is empty:
4624
       gAudioIO->mStartTime = SystemTime(gAudioIO->mUsingAlsa) - gAudioIO->mT0;
4631
       gAudioIO->mStartTime = SystemTime(gAudioIO->mUsingAlsa) - gAudioIO->mT0;
4625
       // later, mStartTime - mSystemMinusAudioTime will tell us latency
4632
       // later, mStartTime - mSystemMinusAudioTime will tell us latency
4626
   }
4633
   }
4627
4634
4628
#ifdef EXPERIMENTAL_MIDI_OUT
4629
   /* GSW: Save timeInfo in case MidiPlayback needs it */
4635
   /* GSW: Save timeInfo in case MidiPlayback needs it */
4630
   gAudioIO->mAudioCallbackClockTime = PaUtil_GetTime();
4636
   gAudioIO->mAudioCallbackClockTime = PaUtil_GetTime();
4631
4637
Lines 5001-5007 Link Here
5001
                  : gAudioIO->mTime >= gAudioIO->mT1))
5007
                  : gAudioIO->mTime >= gAudioIO->mT1))
5002
                  // PRL: singalling MIDI output complete is necessary if
5008
                  // PRL: singalling MIDI output complete is necessary if
5003
                  // not USE_MIDI_THREAD, otherwise it's harmlessly redundant
5009
                  // not USE_MIDI_THREAD, otherwise it's harmlessly redundant
5010
#ifdef EXPERIMENTAL_MIDI_OUT
5004
                  gAudioIO->mMidiOutputComplete = true,
5011
                  gAudioIO->mMidiOutputComplete = true,
5012
#endif
5005
                  callbackReturn = paComplete;
5013
                  callbackReturn = paComplete;
5006
            }
5014
            }
5007
            
5015
            
Lines 5064-5070 Link Here
5064
5072
5065
               // PRL: singalling MIDI output complete is necessary if
5073
               // PRL: singalling MIDI output complete is necessary if
5066
               // not USE_MIDI_THREAD, otherwise it's harmlessly redundant
5074
               // not USE_MIDI_THREAD, otherwise it's harmlessly redundant
5075
#ifdef EXPERIMENTAL_MIDI_OUT
5067
               gAudioIO->mMidiOutputComplete = true,
5076
               gAudioIO->mMidiOutputComplete = true,
5077
#endif
5068
               callbackReturn = paComplete;
5078
               callbackReturn = paComplete;
5069
            }
5079
            }
5070
         }
5080
         }
(-)src/Project.cpp~ (+4 lines)
Lines 461-469 Link Here
461
         } );
461
         } );
462
462
463
         for (const auto &name : sortednames) {
463
         for (const auto &name : sortednames) {
464
#ifdef USE_MIDI
464
            if (Importer::IsMidi(name))
465
            if (Importer::IsMidi(name))
465
               AudacityProject::DoImportMIDI(mProject, name);
466
               AudacityProject::DoImportMIDI(mProject, name);
466
            else
467
            else
468
#endif
467
               mProject->Import(name);
469
               mProject->Import(name);
468
         }
470
         }
469
471
Lines 3031-3039 Link Here
3031
   // FIXME: //v Surely we could be smarter about this, like checking much earlier that this is a .aup file.
3033
   // FIXME: //v Surely we could be smarter about this, like checking much earlier that this is a .aup file.
3032
   if (temp.Mid(0, 6) != wxT("<?xml ")) {
3034
   if (temp.Mid(0, 6) != wxT("<?xml ")) {
3033
      // If it's not XML, try opening it as any other form of audio
3035
      // If it's not XML, try opening it as any other form of audio
3036
#ifdef USE_MIDI
3034
      if (Importer::IsMidi(fileName))
3037
      if (Importer::IsMidi(fileName))
3035
         DoImportMIDI(this, fileName);
3038
         DoImportMIDI(this, fileName);
3036
      else
3039
      else
3040
#endif
3037
         Import(fileName);
3041
         Import(fileName);
3038
      return;
3042
      return;
3039
   }
3043
   }
(-)src/tracks/playabletrack/notetrack/ui/NoteTrackButtonHandle.cpp~ (+4 lines)
Lines 9-14 Link Here
9
**********************************************************************/
9
**********************************************************************/
10
10
11
#include "../../../../Audacity.h"
11
#include "../../../../Audacity.h"
12
13
#ifdef USE_MIDI
14
12
#include "NoteTrackButtonHandle.h"
15
#include "NoteTrackButtonHandle.h"
13
16
14
#include "../../../../HitTestResult.h"
17
#include "../../../../HitTestResult.h"
Lines 113-115 Link Here
113
   return RefreshCode::RefreshNone;
116
   return RefreshCode::RefreshNone;
114
}
117
}
115
118
119
#endif
(-)src/tracks/playabletrack/notetrack/ui/NoteTrackVZoomHandle.cpp~ (+5 lines)
Lines 9-14 Link Here
9
**********************************************************************/
9
**********************************************************************/
10
10
11
#include "../../../../Audacity.h"
11
#include "../../../../Audacity.h"
12
13
#ifdef USE_MIDI
14
12
#include "NoteTrackVZoomHandle.h"
15
#include "NoteTrackVZoomHandle.h"
13
#include "../../../../Experimental.h"
16
#include "../../../../Experimental.h"
14
#include "NoteTrackVRulerControls.h"
17
#include "NoteTrackVRulerControls.h"
Lines 166-168 Link Here
166
      TrackVRulerControls::DrawZooming
169
      TrackVRulerControls::DrawZooming
167
         ( dc, mRect, panelRect, mZoomStart, mZoomEnd );
170
         ( dc, mRect, panelRect, mZoomStart, mZoomEnd );
168
}
171
}
172
173
#endif
(-)src/tracks/ui/TimeShiftHandle.cpp~ (-1 / +1 lines)
Lines 604-610 Link Here
604
      {
604
      {
605
         trySnap = true;
605
         trySnap = true;
606
         if (pTrack->GetKind() == Track::Wave) {
606
         if (pTrack->GetKind() == Track::Wave) {
607
            auto wt = static_cast<const WaveTrack *>(pTrack);
607
            auto wt = static_cast<const WaveTrack *>(pTrack.get());
608
            const double rate = wt->GetRate();
608
            const double rate = wt->GetRate();
609
            // set it to a sample point
609
            // set it to a sample point
610
            desiredSlideAmount = rint(desiredSlideAmount * rate) / rate;
610
            desiredSlideAmount = rint(desiredSlideAmount * rate) / rate;

Return to bug 637110