From: David McNab <rebirth@orcon.net.nz>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Question - scratchy audio
Date: Thu, 13 May 2004 00:14:35 +1200 [thread overview]
Message-ID: <40A2152B.6010904@orcon.net.nz> (raw)
In-Reply-To: <40A20137.409@orcon.net.nz>
David McNab wrote:
> However, I've got a problem, where I'm getting intermittent
> 'scratch'/'pop' noises (sounds a bit like a dodgy jack or lead).
>
> Any ideas what could be causing this?
For the benefit of others who may be new to alsa seq api, I'll post what
I found out.
It seems that if a client process is spiking the CPU, even for short
bursts, it will impact one or more other audio progs. Not sure whether
the scratchiness is caused by ALSA, fluidsynth, or something else
getting momentarily cpu-starved.
Solution - I optimised my (python) client app, psyco'ed the scheduler
loop, and shimmed to C functions which create and dispatch the events.
It turned out that my python code was doing a lot of unnecessary object
creation and dict manipulation, which was causing CPU spikes. Seems that
even a spike of a couple of ms can impact the audio.
Result - instead of scratchy audio, with jerky off-time notes sounding
like a garage band with a 3-day hangover, the music is now coming
through clear and rhythmically tight.
Seems I won't need to bother battling with alsa queues and scheduling
any more :))
Cheers
David
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
prev parent reply other threads:[~2004-05-12 12:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-12 10:49 Question - scratchy audio David McNab
2004-05-12 12:14 ` David McNab [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40A2152B.6010904@orcon.net.nz \
--to=rebirth@orcon.net.nz \
--cc=alsa-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.