Re: [linux-audio-dev] Making audio run realtime on older computers

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Making audio run realtime on older computers
From: David Olofson (david_AT_gardena.net)
Date: Sun Jul 09 2000 - 18:11:05 EEST


On Sun, 09 Jul 2000, Benno Senoner wrote:
> On Sun, 09 Jul 2000, Twinkles wrote:> I am using a Linux 486DX66 to play audio but am experiencing the following
> > problem to which a developer may be able to supply a solution.
>
> I am not sure if a 486 @ 66Mhz is able to playback an MP3 128kbit in realtime.
> (I owned a AMD 486_AT_133Mhz and had troubles too)

IIRC, a pretty well optimized decoder requires at the very least 100
MHz for 486. A 100 MHz Pentium should work with most decoders, but
that's on the low end too for some.

> an alternative would be:
>
> use mpg123 to output to stdout (-s) and pipe it through a small app
> which :
> fires up two threads :
> - buffering thread which gets data from mpg123 (should be at least 500KB or so)
> - audio thread which gets data via lock-free FIFO from the buffering thread
> and runs SCHED_FIFO and uses the full 64KB of the soundcard buffer.
>
> (I could produce such a small app in 20-30min but you know .. no time :-( )

Actually, I think I have some useful OO style C code lying around. I
have the audiodev "object" (from softsynth) and a lock free FIFO
object (used in some kernel drivers I hacked at work - has both
normal [portable] and copy_to/from_user() kernel methods). I can post
the code, and/or perhaps hack the app myself. (I'm pretty busy as
well, though...)

> PS: try the time mpg123 .... stuff .. it the factor is bigger than 0.9 then you
> have simply to give up because your CPU is too slow to decode the MP3.

> (an alternative would be first decode the mp3 to wav and then play it , but
> I know it's too boring)

Well, another workaround would be to decode ahead enough to avoid
underrun before starting playback. Our vapourware app could be used
for that. It could measure the input bandwidth itself, and calculate
the buffer size from that, and the requested output bandwidth.

//David

.- M u C o S --------------------------------. .- David Olofson ------.
| A Free/Open Multimedia | | Audio Hacker |
| Plugin and Integration Standard | | Linux Advocate |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
.- A u d i a l i t y ------------------------. | Singer |
| Rock Solid Low Latency Signal Processing | | Songwriter |
`---> http://www.angelfire.com/or/audiality -' `-> david_AT_linuxdj.com -'


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Jul 09 2000 - 19:07:30 EEST