Re: [Alsa-devel] OSS driver removal, 2nd round (v2)

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

 



Użytkownik Lee Revell napisał:
On Tue, 2006-07-11 at 10:30 -0400, [email protected] wrote:
On Tue, 11 Jul 2006 08:15:28 +0200, Adam =?ISO-8859-2?B?VGxhs2th?= said:
Sorry to say but it is just not that way. Window manager is for managing windows
and it shouldn't depend on any audio system. It should use an external app using exec call
to play sounds (aplay, sox, wavplay etc.) configured by some config option.
So what you're saying is that something like 'esd' *is* needed.  (It's
certainly silly to keep doing fork/exec for every little sound sample when
you can just leave the app running and hand it requests...)

That approach also won't be reliable as it ignores the realtime
constraint that is inherent in audio playback.  It will probably work on
a fast/lightly loaded machine but will glitch out under load.

Yes, that is true. It was just simple example how you can get simple sound effects without many lines of code. In case of heavy load or too many events in short period of time this method is not working correctly but this is not the main functionality of a window manager program. Anyway you can aggregate events if there are too many of them and play only one sound or not play anything at all. For this kind of program
it is quite acceptable and not breaks main functionality.

It's how GDM plays startup/shutdown sounds and it sucks - on shutdown
the sound is choppy.  You either need a dedicated daemon running
SCHED_FIFO or an RT thread for reliable audio playback.

True - and that makes things more complicated. I don't know if it is worth it just for bells and whistles. In other cases you do need to program more sophisticated sound support and RT thread probably will be your solution. Or some kind of sound server which holds your sound samples so you can fire them at the proper time. ALSA lib is a low level library. Sometimes we need more abstract functions like load(s, "sound.wav) and then play(s) without bothering about all these parameters settings. So maybe OpenAL is a some kind of a solution but I don't know its current status.

Regards
--
Adam Tlałka       mailto:[email protected]    ^v^ ^v^ ^v^
Computer Center,  Gdańsk University of Technology, Poland
PGP public key:   finger [email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux