[MPlayer-dev-eng] real mmap-support in ao_alsa

joy joy at pingfm.org
Fri Jul 19 10:26:47 CEST 2002


On Fri, Jul 19, 2002 at 01:00:54PM +0800, Anders Johansson wrote:
> Hi
> 
> I guess alsa doesn't accept floating point data? Too bad, I think this
> will be the dominating format within a few years. Some OSS drivers
> already supports it.
> 
alsa supports 24/32 up to float:

SND_PCM_FORMAT_S24_LE 
Signed 24 bit Little Endian

SND_PCM_FORMAT_S24_BE 
Signed 24 bit Big Endian

SND_PCM_FORMAT_U24_LE 
Unsigned 24 bit Little Endian

SND_PCM_FORMAT_U24_BE 
Unsigned 24 bit Big Endian

SND_PCM_FORMAT_S32_LE 
Signed 32 bit Little Endian

SND_PCM_FORMAT_S32_BE 
Signed 32 bit Big Endian

SND_PCM_FORMAT_U32_LE 
Unsigned 32 bit Little Endian

SND_PCM_FORMAT_U32_BE 
Unsigned 32 bit Big Endian

SND_PCM_FORMAT_FLOAT_LE 
Float 32 bit Little Endian, Range -1.0 to 1.0

SND_PCM_FORMAT_FLOAT_BE 
Float 32 bit Big Endian, Range -1.0 to 1.0

SND_PCM_FORMAT_FLOAT64_LE 
Float 64 bit Little Endian, Range -1.0 to 1.0

SND_PCM_FORMAT_FLOAT64_BE 
Float 64 bit Big Endian, Range -1.0 to 1.0

i can add it, its just a few lines of code but im not aware of one
soundcard supported by alsa which does SND_PCM_FORMAT_FLOAT*. the
'best' cards i knew of do 24/32bit and even if they are capable of
processing float they do it internally and 'truncate' it to 24bit
again. while im gathering information about this float/dsp thing i
found that most audio-app-makers rely nowadays on simple
cpu-horsepower cause you can do dsp-processing magnitudes faster with
an athlon-1GHz cpu as with the best optimized assembler code for an 
external dsp, but thats maybe not that what you want ;). 
anyway, i add float-format and all the other possible formats and
you can try to pass your filter generated data in
SND_PCM_FORMAT_FLOAT. ao_alsa returns 1 on succes and 0 if it fails
and the filter could probably fall back to an other format and try again.

btw. i found this nice article about converting c float to int cast
without using inline assembler but still speeding it up a bit. maybe
its usefull for you.

http://mega-nerd.com/FPcast/
 
> > i actually started an ao_jack, 
> 
> Do you have any link to jack?
> 

no, we just try to move our studio slightly to linux and we started
using jack for connecting apps/effects. thats my only link ;).

-- 
regards

____-
joy

________/\---------%%%___________-----------
webcast every sunday 2000 cest at pingfm.org

pgp key at: x-hkp://wwwkeys.de.pgp.net



More information about the MPlayer-dev-eng mailing list