Csound Csound-dev Csound-tekno Search About

[Cs-dev] cs5 rt audio on portaudio

Date2005-02-27 13:35
Fromjpff@codemist.co.uk
Subject[Cs-dev] cs5 rt audio on portaudio
This seems to be broken, and it was not.  I am using -o dac:plughw:0
which works with aplay but all I get is a crash
Using Portaudio output device plughw:0.
Suggested PortAudio output latency = 0.000000 seconds.
paBlockingWriteOpen: nchnls 2 sr 44100.000000 buffer frames 1024 device -2
Csound tidy up: Segmentation fault

Runing under gdb

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 182908691648 (LWP 4884)]
OpenStream (hostApi=0x6b2dc0, s=0x6c2e18, inputParameters=0x0, 
    outputParameters=0x7fbfffeb70, sampleRate=Variable "sampleRate" is not available.
) at pa_linux_alsa.c:1652
1652            stream->playback.numHostChannels = MAX( numOutputChannels, outputDeviceInfo->minOutputChannels );
(gdb) where
#0  OpenStream (hostApi=0x6b2dc0, s=0x6c2e18, inputParameters=0x0, 
    outputParameters=0x7fbfffeb70, sampleRate=Variable "sampleRate" is not available.
) at pa_linux_alsa.c:1652
#1  0x0000002a968567ec in Pa_OpenStream (stream=0x6c2e18, inputParameters=0x0, 
    outputParameters=0x6c2e20, sampleRate=44100, framesPerBuffer=1024, 
    streamFlags=0, 
    streamCallback=0x2a9673a610 , 
    userData=0x7fbfffecc8) at pa_front.c:1341
#2  0x0000002a9673a7da in paBlockingWriteOpen (csound=0x61ce20, 
    pabs_=0x2a9683b2e8, paParameters=0x7fbfffec50, parm=0x400)
    at InOut/pa_blocking.c:102
#3  0x0000002a9673a36f in playopen_ (csound=0x61ce20, parm=0x7fbfffecb0)
    at InOut/rtpa.c:214
#4  0x00000000004129f1 in sfopenout (csound=0x61ce20) at InOut/libsnd.c:514
#5  0x00000000004311ef in musmon (csound=0x61ce20) at Engine/musmon.c:294
#6  0x0000000000420e99 in csoundCompile (csound=0x3bfffede8, argc=127, 
    argv=0x2a96139ca8) at Top/main.c:605
#7  0x0000000000409de8 in main (argc=4, argv=0x7fbfffef48)
    at frontends/csound/csound_main.c:152

and the problem is

(gdb) print outputDeviceInfo
$1 = (const PaAlsaDeviceInfo *) 0x0
(gdb) 

Does anyone have any ideas what this is about?

==John ffitch 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-27 18:05
FromIstvan Varga
SubjectRe: [Cs-dev] cs5 rt audio on portaudio
jpff@codemist.co.uk wrote:

> and the problem is
> 
> (gdb) print outputDeviceInfo
> $1 = (const PaAlsaDeviceInfo *) 0x0
> (gdb) 

This looks more like a bug in PortAudio than a bug in Csound.
outputDeviceInfo is not set if "host API specific" device
selection is done, i.e. you use a device name instead of a number.

The only place where outputDeviceInfo could be set before line
1652 where the crash occurs is this:

if( outputParameters->device != paUseHostApiSpecificDeviceSpecification )
{
     assert( outputParameters->device < hostApi->info.deviceCount );
     outputDeviceInfo =
       (PaAlsaDeviceInfo*)hostApi->deviceInfos[outputParameters->device];
}
else
     outputStreamInfo = outputParameters->hostApiSpecificStreamInfo;


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net