Subject: Re: [linux-audio-dev] Simple question?
From: Kai Vehmanen (kaiv_AT_wakkanet.fi)
Date: ti helmi 08 2000 - 08:14:56 EST
On Mon, 7 Feb 2000, Scott C. Knight wrote:
> getting the info I need out of them, but what sort of data type should I
> store the actual waveform data in? I have seen a couple differnt ways by
> differnt programs. Im pretty sure some sort of pointer and then a mallac
> size to fit the data but what type? Ive seen LONG, int16_t all sorts of
Well, this depends on how you use the data (everything in memory,
zooming, etc). I've used 16bit ints for simple waveform drawing.
> stuff. My second question has to do with playing sounds files of any sort
> of size. Whats the ebst way to play sound files, Ive been able to just
> write simple programs that read a sound file, call the encesary ioctl
> calls to set up the sound driver and then jsut write the whole uadio
> buffer and it works, But Im sure its not the best way. Whats the most
> common way? Splitting it up into smaller buffers and playing each one as
Well, there's no right way to do it. Normally you use the same buffer
size as used by the sound drivers (=fragment size). See OSS
and ALSA API documentation for more information.
http://www.opensound.com and http://www.alsa-project.org ... ALSA
documentation is a bit out-of-date currently.
> it. Any and all help is apprecaited, and If theres any web pages or
> anyhting that might be useful thatd be good too. Or if anyone knows of a
> good program, reading source code I find is the best way to learn. Thanks
Definitely. You have thousands of open-source audio apps to take
example of. That's the best resource.
-- Kai Vehmanen <kaiv_AT_wakkanet.fi> -------- CS, University of Turku, Finland . http://www.wakkanet.fi/ecasound/ - linux multitrack audio processing . http://www.wakkanet.fi/sculpscape/ - ambient-idm-rock-... mp3/ra/wav
This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:23:27 EST