Re: [linux-audio-dev] streaming from disk to terminatorX added (via mmap)

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

Subject: Re: [linux-audio-dev] streaming from disk to terminatorX added (via mmap)
From: Andy Lo A Foe (andy_AT_alsa-project.org)
Date: su loka   24 1999 - 13:09:27 EDT


On Sun, 24 Oct 1999, Benno Senoner wrote:

> Suggestions to the author: (any official word from you Alexander ?)
>
> - always use mmap since it will work well on big RAM boxes too,
> and doesn't eat up all you system memory.
>
> -in order to support MP3s and other fileformats decompress/convert this
> files first to a temporary WAV file and mmap() this into mem.
>
> To speed up things even more you could save a the sample graph into
> a little file the first time you load the audio file, so that on subsequent
> loads, the 100MB audio file will "load" almost istantaneously in to mem.
> (thanks to mmap() ).
>
> It would be possible to support direct disk streaming of MP3 files,
> but that is not a trivial task since you can't access an MP3 in
> random order, since the windowing filter depends on the previous
> filter state information.
> One way could be to store the filterstates of every mpeg frame into
> a separate file and then reload the filter during seeks into the file.
> But that would require to include an entire mp3 player with modified
> windowing filter code.
>
> PS: Now if we could get one of these turntables recorded with special
> static waves (saw waves), we could add add turntable motion detection
> and get the same features as "finalscratch" on BeOS:
> scratching an audiofile in realtime using a real turntable.
> :-)

<shameless plug>

You might want to check out alsaplayer, http://www.alsa-project.org/~andy/
It does 'direct streaming from disk' for just about any format without
using mmap. It uses a ring buffer system and threading to cache data and
there is code for very low latency modes using SCHED_FIFO.
If you really want to emulate "finalscratch" just put the scratching mouse
functionality of terminatorX in some sort of plugin for alsaplayer. It
supports variable speed control (negative too, which is needed for
'scratching'). With a fast enough CDDA capable CDROM you can even
'scratch' your music CDs in realtime :-)

</shameless plug>

Andy

--
AlsaPlayer, http://www.alsa-project.org/~andy/


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

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:27:59 EST