Csound Csound-dev Csound-tekno Search About

Bug in OSS code? / Re: Again Real time csound problem

Date1998-09-04 00:11
FromLarry Troxler
SubjectBug in OSS code? / Re: Again Real time csound problem
Antoine Lefebvre wrote:
> 
> My system is a pentium 166 Mhz with 32M Ram and using linux 2.0.34 with the
> latest OSS/free that work.

> For the buffer, I try to change it with the -B and -b flag of the csound
> comand line but it change nothing!!!!


(Nothing, meaning the 6 second latency Antione is experiencing)

I hope you don't mind, Antione, that I CC'd this mail back to the
mailing list. 

This problem suspiciously sounds liike it could be related to a bug in
the Csound OSS code a while back. Unfortunately, I don't have the source
on my machine at the moment, so hopefully another Linux person could
provide the details. 

The problem was that in the OSS ioctl call that specifies the fragment
size, and the number of fragments, the code correctly used the
command-line buffer size as the fragment size. (The OSS "fragment" is
essentially what we think of as a buffer). But the top byte of the
argument, which specifies the number of fragments, was initially all
high, which means "allocate as many fragments as possible". At one point
I caught this error, and changed the top-half of the argument to specify
using two fragments.

Sorry the above is so muddled. Hopefully Dave Phillips or someone else
working on the Linux version could point you to the exact source code to
check. 

OTOH, If you just recently downloaded the current Linux version, then
this should be already fixed, so maybe your problem is something else.

> I have code a little utility to change the setting of /dev/dsp (rate, bits,
> channels) but it seem to get back the default value when I close /dev/dsp in
> my program. Is it normal??????
> 

I'm not a Unix expert, but yes, I think this is normal, if you're using
ioctl() calls. 

Larry

--  Larry Troxler --  lt@westnet.com  --  Patterson, NY USA  --

Date1998-09-05 09:24
FromNicola Bernardini
SubjectRe: Bug in OSS code? / Re: Again Real time csound problem
On Thu, 3 Sep 1998, Larry Troxler wrote:

[snip - we're talking about 6 seconds latency on real-time MIDI playing]
> Sorry the above is so muddled. Hopefully Dave Phillips or someone else
> working on the Linux version could point you to the exact source code to
> check. 
> 
> OTOH, If you just recently downloaded the current Linux version, then
> this should be already fixed, so maybe your problem is something else.

I have no solution to this problem right now, but I am compiling a list
of TODO things for linux which includes reported bugs (to be fixed) and
I have included you mail in it (in the hope a kind sould finds a solution
to the problem). This file is retrievable now by anonymous cvs and will be
included in the next source distribution of linux csound. I add
instructions to access the cvs repository to the bottom of this mail.

------------------------------------------------------------------------
Nicola Bernardini
E-mail: nicb@axnet.it
 
Re graphics: A picture is worth 10K words -- but only those to describe
the picture.  Hardly any sets of 10K words can be adequately described
with pictures.
------------------------------------------------------------------------------

Instructions to access the cvs repository (access has been tested
successefully with cvs client/server version 1.9.28, which can be found at
www.cyclic.com):

$ cvs -d ':pserver:anonymous@axdev.axnet.it:/home/nicb/projects/repositories' login