[Stk] RtWvOut and audio device on linux [fixed]
Enrico Costanza
enrico.costanza@epfl.ch
Sun, 01 Jul 2007 09:59:18 +0200
Thanks Gary for your reply. The problem was there also with 2 channels.
I was using the ubuntu packages for the sdk.
The problem disappeared when I compiled the latest version of the
library from the sources on the ccrma website.
I already filed a bug for the libstk0-dev package.
Best,
Enrico
Gary Scavone wrote:
> Hi Enrico,
>
> It appears that it found a device but that it does not support only 1
> channel. That is weird, because RtAudio is supposed to automatically
> compensate for devices that have a minimum number of channels greater
> than that requested by the user. In any event, you may try changing
> the number of channels parameter to RtWvOut to 2 or more.
>
> You can also download the RtAudio distribution, compile the "info"
> program in the "tests" directory and see what it reports for your system.
>
> Regards,
>
> --gary
>
> On 30-Jun-07, at 1:36 PM, Enrico Costanza wrote:
>
>> Hi Steve,
>>
>> thanks a lot for your reply.
>> I tried to set the sample rate to 48000, both using
>> Stk::setSampleRate() and using the argument in the RtDuplex
>> constructor, but nothing changed. What else could I try?
>>
>>> Also, when you run mplayer to play a 44100 Hz mp3 or wav file, check
>>> the audio path.
>> How do I do this?
>>
>> Thanks,
>> Enrico
>>
>> Stephen Sinclair wrote:
>>> 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
>>>
>>> _______________________________________________
>>> Stk mailing list
>>> Stk@ccrma.stanford.edu
>>> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>>
>>
>> --Enrico Costanza
>> Assistant-doctorant
>> Media and Design Laboratory
>> Ecole Polytechnique Fédérale de Lausanne
>>
>> http://web.media.mit.edu/~enrico
>>
>> _______________________________________________
>> Stk mailing list
>> Stk@ccrma.stanford.edu
>> http://ccrma-mail.stanford.edu/mailman/listinfo/stk