[Stk] RtWvOut and audio device on linux
Stephen Sinclair
sinclair@music.mcgill.ca
Sat, 30 Jun 2007 12:33:16 -0400
Hi Enrico,
I don't know if this is the problem, but sometimes I have had trouble
with ALSA if I haven't set my sample rate to 48000. I don't know why
exactly, but it doesn't seem to handle the wrong sample rate. Probably
because ALSA is a hardware driver and isn't supposed to provide software
resampling. Anyways, give it a try.
Also, when you run mplayer to play a 44100 Hz mp3 or wav file, check the
audio path. I often notice that it sticks a 44100->48000 resampling
section in the audio pipeline, so this is probably the reason. It would
of course be nice to handle this a little smoother, maybe by throwing an
exception.
Steve
Enrico Costanza wrote:
> Dear All,
>
> I am trying to use the stk on kubuntu 7.04, and I am experiencing
> problems with the real-time classes.
> Here is a simple test program trying to allocate RtWvOut with the
> default parameters, and its output.
>
> ---
> #include <RtWvOut.h>
>
> using std::cout;
> using std::endl;
>
> int main(){
> RtWvOut * test = NULL;
> cout << "about to alloc" << endl;
> test = new RtWvOut( );
> cout << "allocated" << endl;
> delete test;
> cout << "de-allocated" << endl;
> return 0;
> }
> ---
> This is what I get:
> ---
> about to alloc
>
> RtApi: no devices found for given stream parameters:
> RtApiAlsa: channels (1) not supported by device (hw:I82801CAICH3,0).
> RtApiAlsa: pcm device (hw:I82801CAICH3,1) won't open: No such file
> or directory.
> RtApiAlsa: pcm device (hw:U0x4710x329,0) won't open: No such file
> or directory.
>
>
> terminate called after throwing an instance of 'StkError'
> Aborted (core dumped)
> ---
>
> At the same time, audio seems to work fine on my machine. For example
> I can play wave files with aplay.
> Am I doing something obviously stupid?
>
> Any suggestions and pointers are welcome.
>
> Thank you in advance.
>
> Enrico
>
> _______________________________________________
> Stk mailing list
> Stk@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk