audio/audacity: Unbundle portaudio and use audio/portaudio instead

PR:		229853
Submitted by:	tobik
Approved by:	xxjack12xx@gmail.com (maintainer)
This commit is contained in:
Tobias Kortkamp 2018-07-19 03:18:53 +00:00
parent 7348c71334
commit c6b6cf046b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=474923
2 changed files with 29 additions and 5 deletions

View File

@ -4,7 +4,7 @@
PORTNAME= audacity
PORTVERSION= 2.2.2
DISTVERSIONPREFIX= Audacity-
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= audio
MAINTAINER= xxjack12xx@gmail.com
@ -21,6 +21,7 @@ BUILD_DEPENDS= autogen:devel/autogen \
cmake:devel/cmake
LIB_DEPENDS= libasound.so:audio/alsa-lib \
libexpat.so:textproc/expat2 \
libportaudio.so:audio/portaudio \
libsoxr.so:audio/libsoxr \
libsndfile.so:audio/libsndfile
@ -69,7 +70,7 @@ CONFIGURE_ARGS+= --disable-option-checking \
--with-libsndfile=system \
--with-libsoxr=system \
--with-midi \
--with-portaudio \
--with-portaudio=system \
--with-portmixer=yes \
--with-widgetextra

View File

@ -1,6 +1,29 @@
--- src/AudioIO.cpp.orig 2018-02-22 14:12:03.835431000 -0800
+++ src/AudioIO.cpp 2018-02-22 14:01:49.487127000 -0800
@@ -985,7 +985,7 @@
--- src/AudioIO.cpp.orig 2018-07-17 20:25:01 UTC
+++ src/AudioIO.cpp
@@ -465,7 +465,6 @@ TimeTrack and AudioIOListener and whether the playback
#define ROUND(x) (int) ((x)+0.5)
//#include <string.h>
#include "../lib-src/portmidi/pm_common/portmidi.h"
- #include "../lib-src/portaudio-v19/src/common/pa_util.h"
#include "NoteTrack.h"
#endif
@@ -979,13 +978,22 @@ struct AudioIO::ScrubQueue (private)
// return the system time as a double
static double streamStartTime = 0; // bias system time to small number
+// PaUtil_GetTime is an internal PortAudio function. Unfortunately
+// it's used twice in AudioIO.cpp. It's a simple function so just
+// provide the implementation here.
+static double PaUtil_GetTime(void) {
+ struct timespec tp;
+ clock_gettime(CLOCK_REALTIME, &tp);
+ return (double)(tp.tv_sec + tp.tv_nsec * 1e-9);
+}
+
static double SystemTime(bool usingAlsa)
{
#ifdef __WXGTK__
if (usingAlsa) {
struct timespec now;
// CLOCK_MONOTONIC_RAW is unaffected by NTP or adj-time