[Stk] crtsine.cpp gives RtApiAlsa: error starting callback thread!

Gary P. Scavone gary@ccrma.Stanford.EDU
Thu, 9 Feb 2006 22:33:31 -0500


Hi Charlls,

If you compile for all options, the order of priority is: Jack, ALSA,  
OSS.

If you indeed have Jack support compiled in, then you need to have  
the Jack server running _BEFORE_ starting your application.

Regards,

--gary

On 9-Feb-06, at 10:28 PM, Charlls Quarra wrote:

>
> uh, i think i made i mistake;
>
>  i enabled all options during configuration, which probably means  
> that the last one enabled was the overriding one (oss), i did  
> something like
>
> ./configure --enable-jack --enable-alsa --enable-oss
>
>  i thought the 3 options were compatible on a single buy, but maybe  
> one needs to build a separate stk library for each api?
>
> "Gary P. Scavone" <gary@ccrma.Stanford.EDU> escribió: Hi Charlls,
>
> It is odd that you are getting an ALSA error report if you did not
> provide the -D__LINUX_ALSA__ preprocessor definition during
> compilation. My guess wrt to the error below is the same issue I
> reported yesterday ... please see the archives. To repeat:
>
> In RtAudio, search for "pthread_attr_setschedpolicy(&attr,
> SCHED_RR);" and change the SCHED_RR to SCHED_OTHER. Make sure you
> are in the RtApiAlsa section of the code.
>
> I don't know why this is a problem for some and not others but I will
> likely make this change in the next release of RtAudio.
>
> Also, you shouldn't get this error if you are using the Jack API.
> And RtAudio should use the Jack API automatically if it is only
> compiled with Jack support. In fact, even if there is multiple Linux
> audio API support compiled in, Jack gets highest priority. So, if
> RtAudio finds a running Jack server when it starts up, it uses that.
>
> Regards,
>
> --gary
>
> On 9-Feb-06, at 9:45 PM, Charlls Quarra wrote:
>
> >
> > Hi,
> >
> > compiling the following example:
> > http://ccrma.stanford.edu/software/stk/crealtime.html
> >
> > with
> > g++ -D__LINUX_JACK__ crtsine.cpp -o crtsine -lpthread -ljack -
> > lasound -lstk
> >
> > ah, btw, i created an ebuild script for stk-4.2.1 for gentooers, is
> > in the revision step but can be fetched at:
> > http://bugs.gentoo.org/show_bug.cgi?id=122321 (see attachment)
> >
> > when i run crtsine i get this error,
> >
> > RtApiAlsa: error starting callback thread!
> >
> > this error occurs at
> > dac->setStreamCallback(&tick, (void *)&sine);
> >
> > any ideas what i'm doing wrong? jackd is running fine while i run
> > the program
> >
> >
> >
> > 1GB gratis, Antivirus y Antispam
> > Correo Yahoo!, el mejor correo web del mundo
> > Abrí tu cuenta aquí
>
> _______________________________________________
> Stk mailing list
> Stk@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>
>
> 1GB gratis, Antivirus y Antispam
> Correo Yahoo!, el mejor correo web del mundo
> Abrí tu cuenta aquí