Re: sound and gnome ?



On 30 Jan, Caolan McNamara shouted:
->  has the gnome project finalized a sound api ?, if not id like to suggest that 
->  whatever support is included be capable of being used over a network, perhaps
->  using nas or rplay, so often its forgotten when sound is used in an x app that
->  while X has network support "open /dev/audio" has not.

I have, a while back investigated "decent sound subsystems" - this was
infact for Enlightenment (Dr0.14).. I looked at rplay, nas, and
sfxserver - suffice to say the latter was tossed out imediately on
reading the README and its specs. rplay didn't survive long due to the
sound cracklick like no tomorrow. Nas survived about an hour until I
gave up wondering what was broken when sometimes it refused to start or
accept milt-channel playback. I was not in a mood to read the sources
and fix it... so in a fit I went and wrote my own - it has
authentication (security) very smilar to X's Xauthority system, can
handle theoretically infinite channels of audio streams from 1 to 44100
hz playback, 8,16 bit, mono or stereo. You could register an audio
"monitors" that would be able to suck of the "mixed" output stream going
to the sound device - that was great for a waveform display program. It
also handled setting the sound device to record.

Its problems are: the sound device MUST do 44.1Khz, stereo 16bit. it
uses unix-scokets to conections. It only handles streams. The mixing
code wasn't the most optimised code I could have ever written (On my
old P120 I could play 12-15 samples at once before it started
crackling). It, also, like most sound programs had a "lag" problem due
to the audio device buffering, because it didn't mmap the device. It
assumed a simplex sound device. Ie could oly play or record. not both.
I have not seen a sound device, even for full duplex cards, that
supports both - this is a deficiency in the kernel level driver for
linux.

I have now passed this code on to someone else who is infact develping
it further. He is adding support for other sound devices (/dev/audio -
8bit, lower sampling rates, mono etc.) Also ading tcp/ip conections.
Also He sould be fixing the "lag" by mmaping the sound device to make
sure the sound monitor reading the stream is synched with the sound
going out the speakers. Also he is handling "smaple uploading, storing
and playback" mechanisms, wich left/right volume settings with optional
envelopes.

If there are any sound gurus who write hell fast mixing code, mmap
their sound devices because they can use a function call they don't use
often - and just because they can, or juts want to help out, get back to

ericmit@ix.netcom.com

he has my old code which is available at:

http://www.rasterman.com/ftp/sounD_DR-0.1.tar.gz

If you want to take a look. It also contains a small set of utilities
(souDplay, sounDmod and sounDmpg plus more (sounDplay acepts raw aduio
data and plays it - ie wav samples, sounDmod is mikmod ported to use
sounD, sounDmpg is mpg123 proted - they all work.).

->  
->  C.
->  Real Life: Caolan McNamara           *  Doing: MSc in HCI
->  Work: Caolan.McNamara@ul.ie          *  Phone: +353-61-202699
->  URL: http://skynet.csn.ul.ie/~caolan *  Sig: an oblique strategy
->  Its centre
->  
->  

-- 
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com       /\___ /\ ___/||\___ ____/|/\___  raster@redhat.com
Carsten Haitzler           | _ //__\\ __||_ __\\ ___|| _ /  Red Hat Advanced
218/21 Conner Drive        || // __ \\_ \ | |   \ _/_|| /   Development Labs
Chapel Hill NC 27514 USA   ||\\\/  \//__/ |_|   /___/||\\   919 547 0012 ext 282
+1 (919) 929 9443, 801 4392   For pure Enlightenmenthttp://www.rasterman.com/ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]