[ecasound] Track synching/ segfault on -b:256 problem

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: [ecasound] Track synching/ segfault on -b:256 problem
From: Lewis Hoffman (lhoffman@radserver1.2rad.net)
Date: Thu Nov 30 2000 - 08:09:11 EET


I'm running a freshly compiled ecasound v1.8.2r14 on a redhat 6.2
system, 2.2.17 kernel, with ll patches applied, disks tuned.

I'm using a Hoontech ST128DDMA Ruby Soundcard, with
the sam9407 driver v0.12.0 written by gerd rausch.

When i do the following (lay two tracks together & play back):

ecasound -r -a:1 -i /dev/dsp -o t1.wav
ecasound -r -a:2 -i t1.wav -o /dev/dsp -a:1 -i /dev/dsp -o t2.wav
ecasound -r -a:1 -i t1.wav -o /dev/dsp -a:2 -i t2.wav -o /dev/dsp

the two track are out of synch. a buffersize of 2048 at 44100Hz is
about 1/20th of a second, which is probably plenty to explain what i'm
hearing. I've tried using different buffersize, and -b:512 does seem
to be somewhat better than -b:2048. If the tracks can be as far out of
synch as the buffersize, I expect I would need to get down around 64
for it to be satisfactorily tight. however, When I set it at 256 or
below, I get segfaults (on the second command- the first seems to work
ok). I pasted some stuff from the terminal & gdb down below.

I also know that my sound card/driver does not support SNDCTL_DSP_SETTRIGGER,
and I seem to remember having gotten warnings about that from ecasound,
although i'm not seeing them now. I thought that might have been a
problem, and I asked on the mailing list for the driver. The author said:

>SNDCTL_DSP_SETTRIGGER is IMHO used to enable/disable playback &
>recording on the same card, by means of opening/closing a second DMA
>channel.
>Since the sam9407 doesn't have DMA, there's little meaning behind that
>call, and we can just as well get along with the O_RDONLY, O_WRONLY
>or O_RDWR flags used when opening the device.
>Please correct me, if I miss something here.

I'll appreciate any thoughts.

thanks,
lewis

###############################################################
COMMANDLINE OUTPUT:

[lhoffman@ffaxvamy4-4-221 256]$ ecasound -r -c -d:2 -b:256 -a:2 -i t1.wav -o /dev/dsp -a:1 -i /dev/dsp -o t2.wav
****************************************************************************
* ecasound v1.8.2r14 (C) 1997-2000 Kai Vehmanen *
****************************************************************************
(eca-session) Raised-priority mode enabled.
(eca-session) Interactive mode enabled.
(eca-session) Set debug level to: 2
(eca-chainsetup) Setting buffersize to (samples) 256.
- [ Chainsetup/Enabling audio inputs ] -------------------------------------
(eca-audio-objects) Audio object "t1.wav", mode "read".
(audio-io) Format: s16_le, channels 2, srate 44100.
ecasound ('h' for help)> t
- [ Controller/Processing started ] ----------------------------------------
ecasound ('h' for help)> (eca-main) Multitrack-mode enabled. Changed mixmode to "normal iactive"
- [ Engine/Init - mixmode "normal iactive" ] -------------------------------
Segmentation fault
[lhoffman@ffaxvamy4-4-221 256]$

###############################################################
GDB OUTPUT:

(gdb) run -r -c -d:2 -b:256 -a:2 -i t1.wav -o /dev/dsp -a:1 -i /dev/dsp -o t2.wav
Starting program: /opt/bin/ecasound -r -c -d:2 -b:256 -a:2 -i t1.wav -o /dev/dsp -a:1 -i /dev/dsp -o t2.wav
****************************************************************************
* ecasound v1.8.2r14 (C) 1997-2000 Kai Vehmanen *
****************************************************************************
(eca-session) Raised-priority mode enabled.
(eca-session) Interactive mode enabled.
(eca-session) Set debug level to: 2
(eca-chainsetup) Setting buffersize to (samples) 256.
- [ Chainsetup/Enabling audio inputs ] -------------------------------------
(eca-audio-objects) Audio object "t1.wav", mode "read".
(audio-io) Format: s16_le, channels 2, srate 44100.
ecasound ('h' for help)> t
- [ Controller/Processing started ] ----------------------------------------
[New Thread 736 (manager thread)]
[New Thread 735 (initial thread)]
[New Thread 737]
ecasound ('h' for help)> (eca-main) Multitrack-mode enabled. Changed mixmode to "normal iactive"
- [ Engine/Init - mixmode "normal iactive" ] -------------------------------
6B:MD_Tl`wjrw ywqsx~|sxjl`aUWNYObVm`~ {~qtfobtfzlzkvhj]`TXMVLTIULVM^Ti]pbretfreoai\cXaUcXcW_TVLJA?88181<4C<QG^ytxksemapbock^bWWLLCG>G=JAOEPFSHUIUJQFRGTIXMVKPGJAD<;3.'"'!6.; [.. garbage omitted ]
Program received signal SIGSEGV, Segmentation fault.
0x4012ba81 in WAVEFILE::write_samples () from /usr/local/lib/libecasound.so.6
(gdb) bt
#0 0x4012ba81 in WAVEFILE::write_samples () from /usr/local/lib/libecasound.so.6
#1 0x4013b667 in AUDIO_IO_BUFFERED::write_buffer () from /usr/local/lib/libecasound.so.6
#2 0x4016b645 in ECA_PROCESSOR::mix_to_outputs () from /usr/local/lib/libecasound.so.6
#3 0x40168392 in ECA_PROCESSOR::exec_normal_iactive () from /usr/local/lib/libecasound.so.6
#4 0x40167fda in ECA_PROCESSOR::exec () from /usr/local/lib/libecasound.so.6
#5 0x401dfd79 in start_normal () from /usr/local/lib/libecasound.so.6
#6 0x401dfb51 in start_normal () from /usr/local/lib/libecasound.so.6
#7 0x40340eca in pthread_start_thread (arg=0xbf7ffe60) at manager.c:213
(gdb)

-- 
Lewis W. Hoffman                  E-Mail: lhoffman@2rad.net
Two Radical Technologies, Inc     Phone:  703-449-9305
http://www.2rad.net               Cell:   703-928-1974

-- Lewis W. Hoffman E-Mail: lhoffman@2rad.net Two Radical Technologies, Inc Phone: 703-449-9305 http://www.2rad.net Cell: 703-928-1974

-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request@wakkanet.fi>.


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Nov 30 2000 - 08:31:23 EET