>
>Hello,
>
>the german magazine KEYBOARDS has answered a readers question about audio
>and linux with tremendous ignorance. I think this is a good chance to push
>linux to the attention of "the masses".
>
>Here is the full text of question and answer (first in german, so anyone
>can correct my errors ;-).
>
>... snip
well the answer from the guy is in my opinion correct atleast for now.
You need a LL-patch to get audio work as desired and AFAIK there is
no …
[View More]main stream distro with that patch already applied.
Please dont misunderstand me, i love audio on Linux but there is still
some work to do until its is ready for "anyone". And i think thats what
the answer was about.
- Stefan
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
[View Less]
Greg Reddin wrote:
> Is there a web resource or book or something where one can learn
> about these programming caveats for audio developers? I knew nothing
> of this problem, but it makes sense when you mention it.
I don't think that there is an all-in-one howto around, most infos
are scattered around the net (and most issues can be solved
with a bit of knowledge of the real time paradigm and a bit of
common sense)
>
>
> Or do I just have to do this for a few years and …
[View More]learn the hard way?
> :-)
Most developers seems to do so, they are just too lazy to think
about the constraints that real time programming imposes.
They believe they can make full use of the operating system,
call any system calls they like, C++ constructors, malloc()s etc,
accesss to mutexes locked by low priority GUI threads
and then after wonder why their application does not work with
low latencies or why there are sporadic dropouts they cannot get rid of.
most problems go away if you increase the buffer sizes (thus latency)
to let's say 20-50 msec, but as we know any soft-instrument with
bigger than 15-20msec latencies becomes unplayable
(measured by professional standards).
Anyway there are not many rules to follow:
run the audio thread SCHED_FIFO
(and do not use SCHED_FIFO on other threads, except
when you know exactly what you are doing).
in the audio thread just do not call any system calls except
read/write to the audio device .
especially file system ops memory allocation, calling C++
constructors/destructors (cause memory allocation/deallocation)
etc. Basically any operation that could possibly be blocked
because it has to wait for some event, data, etc.
Do all communication between audio thread and other threads
via lock free FIFOs or shared mem.
Avoid mutexes like they were radioactive material.
(there are a few execptions where they are allowed
like using mutexes between two real time threads where you know
that they will not tie up the CPU for more than a certain amount of time,
or using pthread_mudex_trylock() in the audio thread that
tries to acquire the mutex but if it fails it returns immediately
without stalling).
For example Ardour is well designed in this regard, and this is why
Paul is an experianced programmer (and probably learned some RT issues
the hard way too).
Unfortunately many audio apps on linux do not meet "low latency standards"
or better are not designed with real time safeness in mind and I think
it is one of the obstacles that keep them out of the professional
domain making them look like a toy.
It is sad because there are many nice apps with an excellent
sound generation engine, but often the framework around that engine
is weak.
It does not that actually that much energy to fix it but people
seem either too lazy to do that or either do not know what the
RT-safeness guidelines are. I never understood it ...
it is much more complex to desing a synthesis algorithm, etc
than just avoiding a few mutexes and use a lockfree-fifo instead etc.
Anyway I agree it would be cool to have page on the LAD site that
explain all these issues and provide source for some basic routines
and classes. This would prevent that the mistakes are made
all over again.
cheers,
Benno
http://linuxsampler.sourceforge.net
-------------------------------------------------
This mail sent through http://www.gardena.net
[View Less]
Hallo,
hat jemand von euch in der aktuellen Keyboards die Antwort von
Herrn Hain auf die Leseranfrage zu Linux und Audio gelesen? Die
strotzt ja nur so von Unwissen, das schier danach schreit eines
besseren belehrt zu werden. Vielleicht könnten wir ja gemeinsam
eine Antwort erarbeiten.
Bei Interesse könnte ich heute abend auch den Text von Frage und
Antwort hier posten (leider gibt's die Leserbriefe nicht auf der
Keyboards Webseite).
So long
Uwe
--
voiceINTERconnect www.…
[View More]voiceinterconnect.de
... smart speech applications from germany
[View Less]
I too have a pair of Midiman 24/96's, and they sound great.
I've been toying with .asoundrc (I've read the RME Hammerfall config and
the TwoCardsAsOne page too), and so far I dont have what I want.
I looking for both cards to function in sync, as a four (or eight?) -
track recording platform.
Can someone point me in the right direction with my .asoundrc file,
and jackd options? how do i ensure the cards are synched?
Dear Sir,
I need your help,I am John Mboma the son of a
Late minister during the reign of mobutu seseko,
I came to know you in the course of my search for
a reliable and God fearing partner and I decide
to contact you because I believe you are a reputable
person and I felt you can help us over this confidential
matter. I count on your intergrity and honesty to be
able to handle this business.
My father was a minister in Democratic Republic of
Congo during the reign of …
[View More]Late President Mobutu.
Our father was killed during the rebel attack and
our house was burnt. We manage to escape to South
Africa with my mother and two of my sisters
where we are now taking refuge.Before the death of
my father he deposited US$30.5 MILLION, with a security
company in Europe.The money is kept in a trunk boxes
and was registered as precious substance. Thus there is
nobody that knows that it is money that is in the box.
All the document with which the money was deposited
is with us. I am looking for somebody to that is
capable and willing to travel to Europe Country to
receive the two trunk boxes of money on behalf of my
family from the security company.
We need a trust worthy and experience person that
will help us to invest this money in your country and
take us as one family and will also buy a house for us
over there where we can live safely.
We are expecting to hear from you.Please contact me
on this Email Address: johnmboma(a)uymail.com
Thanks for your anticipated and cooperation.please
include your telephone number and fax number in
your reply
Best Regards,
John Mboma.
[View Less]