Csound Csound-dev Csound-tekno Search About

Re: Problems compiling Csound5 with PortAudio on ubuntu

Date2005-10-17 14:15
FromMichael Gogins
SubjectRe: Problems compiling Csound5 with PortAudio on ubuntu
You must use v19-devel for PortAudio with Csound 5.

Regards,
Mike

-----Original Message-----
From: John Harrison 
Sent: Oct 17, 2005 1:28 AM
To: csound@lists.bath.ac.uk
Subject: [Csnd] Problems compiling Csound5 with PortAudio on ubuntu

I'm running ubuntu Hoary. Tonight I downloaded the current CVS and 
attempted to compile. On my first try, I did not have PortAudio 
installed. Csound5 compiled fine and ran fine too...but the ALSA module 
apparently doesn't support full-duplex. I am assuming that the PortAudio 
module *will* support full-duplex, so I decided to install portaudio on 
my system and try to compile again.

I followed the directions for building PortAudio from the source (i.e. 
did *not* use the Debian binaries) using the directions here:
http://lug.wsu.edu/node/285
As this went without a hitch, I assume I successfully installed 
PortAudio V18.1.

I then returned to the csound5 source directory and typed:
scons -c
and then:
scons
this time scons reported that it found portaudio.h. It also reported 
that it would build the portaudio module. However, the compile process 
is now broken. The first error is:
InOut/rtpa.c:33: error: syntax error before "PaHostApiTypeId"

Which is apparently a result of this following command:
gcc -Wall -g -gstabs -O2 -DLINUX -DPIPES -DHAVE_FCNTL_H -DHAVE_UNISTD_H 
-DHAVE_STDINT_H -DHAVE_SYS_TIME_H -DHAVE_SYS_TYPES_H -DHAVE_TERMIOS_H 
-DHAVE_DIRENT_H -fPIC -DBETA -I. -IH -I/usr/local/include/python2.3 
-I/usr/local/include -I/usr/include -I/usr/X11R6/include -c -o 
InOut/rtpa.os InOut/rtpa.c

If I remove PortAudio, the compile process again works...and I have no 
PortAudio module.

-John
-- 
Send bugs reports to this list.
To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk


Date2005-10-19 04:27
FromJohn Harrison
SubjectRe: Problems compiling Csound5 with PortAudio on ubuntu
I now have tried compiling with V19 of PortAudio. Now it compiles. 
However, when I try to run Csound5 I get

WARNING: could not open library
'/home/john/Desktop/SoundScratch/stuff/csound5/librtpa.so' (-1)
...
*** error: unknown rtaudio module: 'PortAudio'
Failed to initialise real time audio output

and... in the directory mentioned, librtpa.so is indeed there.
Permissions are set to 777

I also tried using ALSA for DAC output. I consistently get this error 
message:
ALSA: -B 8192 not allowed on this device; use 15052 instead

(the number after -B varies depending on what I try in the command line. 
For example, I tried its suggested -B 15052 in the command line and then 
I get that -B 16384 isn't allowed.)

So...how do I find the magic number for -B? And...do I want to be 
choosing the default dac?

BTW, is it possible to add code to Csound5 so scons checks for the
correct version of PortAudio?

-John


Michael Gogins wrote:

>You must use v19-devel for PortAudio with Csound 5.
>
>Regards,
>Mike
>
>-----Original Message-----
>From: John Harrison 
>Sent: Oct 17, 2005 1:28 AM
>To: csound@lists.bath.ac.uk
>Subject: [Csnd] Problems compiling Csound5 with PortAudio on ubuntu
>
>I'm running ubuntu Hoary. Tonight I downloaded the current CVS and 
>attempted to compile. On my first try, I did not have PortAudio 
>installed. Csound5 compiled fine and ran fine too...but the ALSA module 
>apparently doesn't support full-duplex. I am assuming that the PortAudio 
>module *will* support full-duplex, so I decided to install portaudio on 
>my system and try to compile again.
>
>I followed the directions for building PortAudio from the source (i.e. 
>did *not* use the Debian binaries) using the directions here:
>http://lug.wsu.edu/node/285
>As this went without a hitch, I assume I successfully installed 
>PortAudio V18.1.
>
>I then returned to the csound5 source directory and typed:
>scons -c
>and then:
>scons
>this time scons reported that it found portaudio.h. It also reported 
>that it would build the portaudio module. However, the compile process 
>is now broken. The first error is:
>InOut/rtpa.c:33: error: syntax error before "PaHostApiTypeId"
>
>Which is apparently a result of this following command:
>gcc -Wall -g -gstabs -O2 -DLINUX -DPIPES -DHAVE_FCNTL_H -DHAVE_UNISTD_H 
>-DHAVE_STDINT_H -DHAVE_SYS_TIME_H -DHAVE_SYS_TYPES_H -DHAVE_TERMIOS_H 
>-DHAVE_DIRENT_H -fPIC -DBETA -I. -IH -I/usr/local/include/python2.3 
>-I/usr/local/include -I/usr/include -I/usr/X11R6/include -c -o 
>InOut/rtpa.os InOut/rtpa.c
>
>If I remove PortAudio, the compile process again works...and I have no 
>PortAudio module.
>
>-John
>  
>

Date2005-10-19 09:46
FromVictor Lazzarini
SubjectRe: Problems compiling Csound5 with PortAudio on ubuntu
Sounds like you have not set OPCODEDIR

At 04:27 19/10/2005, you wrote:
>I now have tried compiling with V19 of PortAudio. Now it compiles. 
>However, when I try to run Csound5 I get
>
>WARNING: could not open library
>'/home/john/Desktop/SoundScratch/stuff/csound5/librtpa.so' (-1)
>...
>*** error: unknown rtaudio module: 'PortAudio'
>Failed to initialise real time audio output
>
>and... in the directory mentioned, librtpa.so is indeed there.
>Permissions are set to 777
>
>I also tried using ALSA for DAC output. I consistently get this error message:
>ALSA: -B 8192 not allowed on this device; use 15052 instead
>
>(the number after -B varies depending on what I try in the command line. 
>For example, I tried its suggested -B 15052 in the command line and then I 
>get that -B 16384 isn't allowed.)
>
>So...how do I find the magic number for -B? And...do I want to be choosing 
>the default dac?
>
>BTW, is it possible to add code to Csound5 so scons checks for the
>correct version of PortAudio?
>
>-John
>
>
>Michael Gogins wrote:
>
>>You must use v19-devel for PortAudio with Csound 5.
>>
>>Regards,
>>Mike
>>
>>-----Original Message-----
>>From: John Harrison 
>>Sent: Oct 17, 2005 1:28 AM
>>To: csound@lists.bath.ac.uk
>>Subject: [Csnd] Problems compiling Csound5 with PortAudio on ubuntu
>>
>>I'm running ubuntu Hoary. Tonight I downloaded the current CVS and 
>>attempted to compile. On my first try, I did not have PortAudio 
>>installed. Csound5 compiled fine and ran fine too...but the ALSA module 
>>apparently doesn't support full-duplex. I am assuming that the PortAudio 
>>module *will* support full-duplex, so I decided to install portaudio on 
>>my system and try to compile again.
>>
>>I followed the directions for building PortAudio from the source (i.e. 
>>did *not* use the Debian binaries) using the directions here:
>>http://lug.wsu.edu/node/285
>>As this went without a hitch, I assume I successfully installed PortAudio 
>>V18.1.
>>
>>I then returned to the csound5 source directory and typed:
>>scons -c
>>and then:
>>scons
>>this time scons reported that it found portaudio.h. It also reported that 
>>it would build the portaudio module. However, the compile process is now 
>>broken. The first error is:
>>InOut/rtpa.c:33: error: syntax error before "PaHostApiTypeId"
>>
>>Which is apparently a result of this following command:
>>gcc -Wall -g -gstabs -O2 -DLINUX -DPIPES -DHAVE_FCNTL_H -DHAVE_UNISTD_H 
>>-DHAVE_STDINT_H -DHAVE_SYS_TIME_H -DHAVE_SYS_TYPES_H -DHAVE_TERMIOS_H 
>>-DHAVE_DIRENT_H -fPIC -DBETA -I. -IH -I/usr/local/include/python2.3 
>>-I/usr/local/include -I/usr/include -I/usr/X11R6/include -c -o 
>>InOut/rtpa.os InOut/rtpa.c
>>
>>If I remove PortAudio, the compile process again works...and I have no 
>>PortAudio module.
>>
>>-John
>>
>--
>Send bugs reports to this list.
>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 

Date2005-10-19 09:52
FromIstvan Varga
SubjectRe: Problems compiling Csound5 with PortAudio on ubuntu
John Harrison wrote:

> I also tried using ALSA for DAC output. I consistently get this error 
> message:
> ALSA: -B 8192 not allowed on this device; use 15052 instead
> 
> (the number after -B varies depending on what I try in the command line. 
> For example, I tried its suggested -B 15052 in the command line and then 
> I get that -B 16384 isn't allowed.)

Try adding -b 7526 (or maybe -b 3763) as well in addition to -B 15052,
so that -B/-b is an integer. Also, if you use the default device with a
newer version of ALSA, it is probably the dmix device; I recommend using
a hardware device directly such as -o dac:hw:0,0 (change the numbers to
select card), not only for making choices of buffer size less limited,
but also for improved latency.