Discussion:
[Portaudio] Pa_GetStreamHostApiType
Taylan Ulrich Bayırlı/Kammer
2015-03-01 14:31:45 UTC
Permalink
Good day,

I'm trying to package Audacity for GNU Guix.

It seems that Audacity rejects a system-provided PortAudio v19 during
./configure because it can't find the function Pa_GetStreamHostApiType,
whereas the PortAudio v19 which Audacity ships in its own tarball has
that function.

I searched around and couldn't find much information on this other than
other people having hit the same issue. What's the story behind the
function? Why is it in Audacity's PortAudio v19 but not the latest
PortAudio v19 release?

Thanks in advance,
Taylan
Phil Burk
2015-03-01 17:47:12 UTC
Permalink
Hello Taylan,

It looks like Audacity is using a patched version of PortAudio.
Pa_GetStreamHostApiType()
was added to their version but not to the official PortAudio source. This
looks like the patch:

<
http://www.openmamba.org/showfile.html?file=/pub/openmamba/milestone2/patches/libportaudio-19-audacity-Pa_GetStreamHostApiType.patch
There was a discussion in 2008 of integrating these patches, or maybe
adding the same functionality a different way.

http://music.columbia.edu/pipermail/portaudio/2008-February/008318.html

That appears not to have been resolved because neither
Pa_GetStreamHostApiType()
or the suggested alternative are in the official PortAudio source.

Users will continue to have problems with dynamically linked PortAudio
libraries until the difference between the Audacity version of PortAudio
and the official version are resolved.

Phil Burk


On Sun, Mar 1, 2015 at 6:31 AM, Taylan Ulrich Bayırlı/Kammer <
Post by Taylan Ulrich Bayırlı/Kammer
Good day,
I'm trying to package Audacity for GNU Guix.
It seems that Audacity rejects a system-provided PortAudio v19 during
./configure because it can't find the function Pa_GetStreamHostApiType,
whereas the PortAudio v19 which Audacity ships in its own tarball has
that function.
I searched around and couldn't find much information on this other than
other people having hit the same issue. What's the story behind the
function? Why is it in Audacity's PortAudio v19 but not the latest
PortAudio v19 release?
Thanks in advance,
Taylan
_______________________________________________
Portaudio mailing list
http://music.columbia.edu/mailman/listinfo/portaudio
Taylan Ulrich Bayırlı/Kammer
2015-03-01 20:17:09 UTC
Permalink
Post by Phil Burk
Hello Taylan,
It looks like Audacity is using a patched version of PortAudio.
Pa_GetStreamHostApiType() was added to their version but not to the
<http://www.openmamba.org/showfile.html?file=/pub/openmamba/milestone2/patches/libportaudio-19-audacity-Pa_GetStreamHostApiType.patch>
There was a discussion in 2008 of integrating these patches, or maybe
adding the same functionality a different way.
http://music.columbia.edu/pipermail/portaudio/2008-February/008318.html
That appears not to have been resolved because neither
Pa_GetStreamHostApiType() or the suggested alternative are in the
official PortAudio source.
Users will continue to have problems with dynamically linked PortAudio
libraries until the difference between the Audacity version of
PortAudio and the official version are resolved.
Phil Burk
Thanks for the explanation. :-)

Taylan
Alan Horstmann
2015-03-01 22:15:28 UTC
Permalink
Some additional comments...
Post by Phil Burk
It looks like Audacity is using a patched version of PortAudio.
Pa_GetStreamHostApiType()
was added to their version but not to the official PortAudio source. This
http://www.openmamba.org/showfile.html?file=/pub/openmamba/milestone2/patch
es/libportaudio-19-audacity-Pa_GetStreamHostApiType.patch
There was a discussion in 2008 of integrating these patches, or maybe
adding the same functionality a different way.
http://music.columbia.edu/pipermail/portaudio/2008-February/008318.html
That appears not to have been resolved because neither
Pa_GetStreamHostApiType()
or the suggested alternative are in the official PortAudio source.
Users will continue to have problems with dynamically linked PortAudio
libraries until the difference between the Audacity version of PortAudio
and the official version are resolved.
Some major Linux distros maintain their own patch for this, eg Ubuntu, see:

http://packages.ubuntu.com/source/precise/sound/portaudio19

and in particular the tarball:

http://archive.ubuntu.com/ubuntu/pool/main/p/portaudio19/portaudio19_19+svn20111121-1.debian.tar.gz

which contains the 'audacity-portmixer' patch that adds
'Pa_GetStreamHostApiType()'.

So that is probably the way it is done if the distro wants to avoid a static
build of Portaudio within Audacity.

Regards

Alan
Ross Bencina
2015-03-01 22:27:00 UTC
Permalink
For what it's worth, I still think the host api type id should be placed
in the stream info struct. Once 19.0.5 is tagged we can add it for 20.0.0

Thanks,

Ross.
Post by Alan Horstmann
Some additional comments...
Post by Phil Burk
It looks like Audacity is using a patched version of PortAudio.
Pa_GetStreamHostApiType()
was added to their version but not to the official PortAudio source. This
http://www.openmamba.org/showfile.html?file=/pub/openmamba/milestone2/patch
es/libportaudio-19-audacity-Pa_GetStreamHostApiType.patch
There was a discussion in 2008 of integrating these patches, or maybe
adding the same functionality a different way.
http://music.columbia.edu/pipermail/portaudio/2008-February/008318.html
That appears not to have been resolved because neither
Pa_GetStreamHostApiType()
or the suggested alternative are in the official PortAudio source.
Users will continue to have problems with dynamically linked PortAudio
libraries until the difference between the Audacity version of PortAudio
and the official version are resolved.
http://packages.ubuntu.com/source/precise/sound/portaudio19
http://archive.ubuntu.com/ubuntu/pool/main/p/portaudio19/portaudio19_19+svn20111121-1.debian.tar.gz
which contains the 'audacity-portmixer' patch that adds
'Pa_GetStreamHostApiType()'.
So that is probably the way it is done if the distro wants to avoid a static
build of Portaudio within Audacity.
Regards
Alan
_______________________________________________
Portaudio mailing list
http://music.columbia.edu/mailman/listinfo/portaudio
--
===================================
AudioMulch 2.2 modular audio software for PC and Mac
http://www.audiomulch.com
---
Everything else: http://www.rossbencina.com
Taylan Ulrich Bayırlı/Kammer
2015-03-02 00:59:20 UTC
Permalink
Post by Alan Horstmann
http://packages.ubuntu.com/source/precise/sound/portaudio19
http://archive.ubuntu.com/ubuntu/pool/main/p/portaudio19/portaudio19_19+svn20111121-1.debian.tar.gz
which contains the 'audacity-portmixer' patch that adds
'Pa_GetStreamHostApiType()'.
So that is probably the way it is done if the distro wants to avoid a static
build of Portaudio within Audacity.
Ooh, thanks. I added the same patch to the Guix recipe and it works
like a charm.

I've now hit a new issue though: Audacity complains "pa_unix_oss.h: No
such file" while building its lib-src/portmixer. And indeed PortAudio
seems to have installed pa_jack.h and pa_linux_alsa.h but no
pa_unix_oss.h even though the ./configure output says OSS support is
enabled. I also tried adding --with-oss explicitly and it made no
difference.

I don't know if this is a bug, or if my PortAudio package recipe is
missing something, or so. Tell me if I should move this question to a
new thread or file a bug report.

Taylan
Alan Horstmann
2015-03-02 09:14:12 UTC
Permalink
Post by Taylan Ulrich Bayırlı/Kammer
Post by Alan Horstmann
http://packages.ubuntu.com/source/precise/sound/portaudio19
http://archive.ubuntu.com/ubuntu/pool/main/p/portaudio19/portaudio19_19+s
vn20111121-1.debian.tar.gz
which contains the 'audacity-portmixer' patch that adds
'Pa_GetStreamHostApiType()'.
So that is probably the way it is done if the distro wants to avoid a
static build of Portaudio within Audacity.
Ooh, thanks. I added the same patch to the Guix recipe and it works
like a charm.
I've now hit a new issue though: Audacity complains "pa_unix_oss.h: No
such file" while building its lib-src/portmixer. And indeed PortAudio
seems to have installed pa_jack.h and pa_linux_alsa.h but no
pa_unix_oss.h even though the ./configure output says OSS support is
enabled. I also tried adding --with-oss explicitly and it made no
difference.
I don't know if this is a bug, or if my PortAudio package recipe is
missing something, or so. Tell me if I should move this question to a
new thread or file a bug report.
I've no prior knowledge here, but the patch mentioned above does have a
section adding pa_unix_oss.h and adds that file to configure.in INCLUDES, so
configure probably needs regenerating? It is a packaging issue not a bug per
se.

Portmixer is not part of Portaudio, and you are more likely to get assistance
with the packaging on the Audacity list where Benjamin Drung (last on the
patch changelog) has contributed in the past - though leave it a week or so
as they are in the final stages of a new release and will no doubt focus on
that!

Regards

Alan
Taylan Ulrich Bayırlı/Kammer
2015-03-02 20:01:53 UTC
Permalink
Post by Alan Horstmann
I've no prior knowledge here, but the patch mentioned above does have
a section adding pa_unix_oss.h and adds that file to configure.in
INCLUDES, so configure probably needs regenerating? It is a packaging
issue not a bug per se.
Indeed, I just needed to run autoreconf. Thanks!

Taylan

Loading...