From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/audacity/files/, media-sound/audacity/
Date: Wed, 21 Feb 2018 11:08:59 +0000 (UTC) [thread overview]
Message-ID: <1519211330.18dbd4fcf1bca48ad8b368346bfe73e2f2f40f02.polynomial-c@gentoo> (raw)
commit: 18dbd4fcf1bca48ad8b368346bfe73e2f2f40f02
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 21 10:42:32 2018 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Feb 21 11:08:50 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18dbd4fc
media-sound/audacity: Fixed compilation with USE="-midi"
Thanks to Matt Whitlock for providing the initial patch.
Closes: https://bugs.gentoo.org/637110
Package-Manager: Portage-2.3.24, Repoman-2.3.6
media-sound/audacity/audacity-2.2.2.ebuild | 8 +
.../audacity/files/audacity-2.2.2-midi.patch | 168 +++++++++++++++++++++
2 files changed, 176 insertions(+)
diff --git a/media-sound/audacity/audacity-2.2.2.ebuild b/media-sound/audacity/audacity-2.2.2.ebuild
index af62f464499..cb2b8ea861f 100644
--- a/media-sound/audacity/audacity-2.2.2.ebuild
+++ b/media-sound/audacity/audacity-2.2.2.ebuild
@@ -49,6 +49,14 @@ REQUIRED_USE="soundtouch? ( midi )"
S="${WORKDIR}/${MY_P}-rc1"
+PATCHES=(
+ "${FILESDIR}/${PN}-2.2.2-midi.patch"
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+}
+
src_configure() {
local WX_GTK_VER="3.0"
need-wxwidgets unicode
diff --git a/media-sound/audacity/files/audacity-2.2.2-midi.patch b/media-sound/audacity/files/audacity-2.2.2-midi.patch
new file mode 100644
index 00000000000..10a0f1f6eb0
--- /dev/null
+++ b/media-sound/audacity/files/audacity-2.2.2-midi.patch
@@ -0,0 +1,168 @@
+https://bugs.gentoo.org/637110
+
+Original patch by Matt Whitlock
+Forward-ported from version 2.2.0 to 2.2.2
+
+--- audacity-minsrc-2.2.2-rc1/src/AudioIO.cpp
++++ audacity-minsrc-2.2.2-rc1/src/AudioIO.cpp
+@@ -976,6 +976,7 @@
+ };
+ #endif
+
++#ifdef EXPERIMENTAL_MIDI_OUT
+ // return the system time as a double
+ static double streamStartTime = 0; // bias system time to small number
+
+@@ -995,6 +996,7 @@
+
+ return PaUtil_GetTime() - streamStartTime;
+ }
++#endif
+
+ const int AudioIO::StandardRates[] = {
+ 8000,
+@@ -1803,6 +1805,7 @@
+ }
+ #endif
+
++#ifdef EXPERIMENTAL_MIDI_OUT
+ // We use audio latency to estimate how far ahead of DACS we are writing
+ if (mPortStreamV19 != NULL && mLastPaError == paNoError) {
+ const PaStreamInfo* info = Pa_GetStreamInfo(mPortStreamV19);
+@@ -1811,6 +1814,7 @@
+ mAudioOutLatency = info->outputLatency;
+ mSystemMinusAudioTimePlusLatency += mAudioOutLatency;
+ }
++#endif
+
+ return (mLastPaError == paNoError);
+ }
+@@ -1955,8 +1959,10 @@
+
+ double playbackTime = 4.0;
+
++#ifdef EXPERIMENTAL_MIDI_OUT
+ streamStartTime = 0;
+ streamStartTime = SystemTime(mUsingAlsa);
++#endif
+
+ #ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
+ bool scrubbing = (options.pScrubbingOptions != nullptr);
+@@ -2830,7 +2836,9 @@
+
+ mPlaybackTracks.clear();
+ mCaptureTracks.clear();
++#ifdef HAVE_MIDI
+ mMidiPlaybackTracks.clear();
++#endif
+
+ #ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
+ mScrubQueue.reset();
+@@ -4669,13 +4677,13 @@
+ (float *)alloca(framesPerBuffer*numPlaybackChannels * sizeof(float)) :
+ (float *)outputBuffer;
+
++#ifdef EXPERIMENTAL_MIDI_OUT
+ if (gAudioIO->mCallbackCount++ == 0) {
+ // This is effectively mSystemMinusAudioTime when the buffer is empty:
+ gAudioIO->mStartTime = SystemTime(gAudioIO->mUsingAlsa) - gAudioIO->mT0;
+ // later, mStartTime - mSystemMinusAudioTime will tell us latency
+ }
+
+-#ifdef EXPERIMENTAL_MIDI_OUT
+ /* GSW: Save timeInfo in case MidiPlayback needs it */
+ gAudioIO->mAudioCallbackClockTime = PaUtil_GetTime();
+
+@@ -5051,7 +5059,9 @@
+ : gAudioIO->mTime >= gAudioIO->mT1))
+ // PRL: singalling MIDI output complete is necessary if
+ // not USE_MIDI_THREAD, otherwise it's harmlessly redundant
++#ifdef EXPERIMENTAL_MIDI_OUT
+ gAudioIO->mMidiOutputComplete = true,
++#endif
+ callbackReturn = paComplete;
+ }
+
+@@ -5114,7 +5124,9 @@
+
+ // PRL: singalling MIDI output complete is necessary if
+ // not USE_MIDI_THREAD, otherwise it's harmlessly redundant
++#ifdef EXPERIMENTAL_MIDI_OUT
+ gAudioIO->mMidiOutputComplete = true,
++#endif
+ callbackReturn = paComplete;
+ }
+ }
+--- audacity-minsrc-2.2.2-rc1/src/Project.cpp
++++ audacity-minsrc-2.2.2-rc1/src/Project.cpp
+@@ -460,10 +460,11 @@
+ } );
+
+ for (const auto &name : sortednames) {
+-
++#ifdef USE_MIDI
+ if (Importer::IsMidi(name))
+ AudacityProject::DoImportMIDI(mProject, name);
+ else
++#endif
+ mProject->Import(name);
+ }
+
+@@ -3046,9 +3047,11 @@
+ #endif
+
+ {
++#ifdef USE_MIDI
+ if (Importer::IsMidi(fileName))
+ DoImportMIDI(this, fileName);
+ else
++#endif
+ Import(fileName);
+
+ ZoomAfterImport(nullptr);
+--- audacity-minsrc-2.2.2-rc1/src/tracks/playabletrack/notetrack/ui/NoteTrackButtonHandle.cpp
++++ audacity-minsrc-2.2.2-rc1/src/tracks/playabletrack/notetrack/ui/NoteTrackButtonHandle.cpp
+@@ -9,6 +9,9 @@
+ **********************************************************************/
+
+ #include "../../../../Audacity.h"
++
++#ifdef USE_MIDI
++
+ #include "NoteTrackButtonHandle.h"
+
+ #include "../../../../HitTestResult.h"
+@@ -113,3 +116,4 @@
+ return RefreshCode::RefreshNone;
+ }
+
++#endif
+--- audacity-minsrc-2.2.2-rc1/src/tracks/playabletrack/notetrack/ui/NoteTrackVZoomHandle.cpp
++++ audacity-minsrc-2.2.2-rc1/src/tracks/playabletrack/notetrack/ui/NoteTrackVZoomHandle.cpp
+@@ -9,6 +9,9 @@
+ **********************************************************************/
+
+ #include "../../../../Audacity.h"
++
++#ifdef USE_MIDI
++
+ #include "NoteTrackVZoomHandle.h"
+ #include "../../../../Experimental.h"
+ #include "NoteTrackVRulerControls.h"
+@@ -332,3 +335,5 @@
+ TrackVRulerControls::DrawZooming
+ ( dc, mRect, panelRect, mZoomStart, mZoomEnd );
+ }
++
++#endif
+--- audacity-minsrc-2.2.2-rc1/src/tracks/ui/TimeShiftHandle.cpp
++++ audacity-minsrc-2.2.2-rc1/src/tracks/ui/TimeShiftHandle.cpp
+@@ -604,7 +604,7 @@
+ {
+ trySnap = true;
+ if (pTrack->GetKind() == Track::Wave) {
+- auto wt = static_cast<const WaveTrack *>(pTrack);
++ auto wt = static_cast<const WaveTrack *>(pTrack.get());
+ const double rate = wt->GetRate();
+ // set it to a sample point
+ desiredSlideAmount = rint(desiredSlideAmount * rate) / rate;
next reply other threads:[~2018-02-21 11:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 11:08 Lars Wendler [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-24 7:34 [gentoo-commits] repo/gentoo:master commit in: media-sound/audacity/files/, media-sound/audacity/ Sam James
2024-11-01 6:29 Miroslav Šulc
2024-10-25 20:30 Andreas K. Hüttel
2024-04-02 10:28 Sam James
2024-03-23 8:29 Sam James
2024-01-16 3:36 Sam James
2023-06-30 12:31 David Seifert
2023-04-15 0:47 Sam James
2023-01-20 22:18 Arsen Arsenović
2020-09-02 8:33 Miroslav Šulc
2020-08-06 4:57 Miroslav Šulc
2018-02-21 11:08 Lars Wendler
2018-02-18 11:13 Lars Wendler
2017-06-05 9:45 Pacho Ramos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1519211330.18dbd4fcf1bca48ad8b368346bfe73e2f2f40f02.polynomial-c@gentoo \
--to=polynomial-c@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox