Re: [AD] set_volume() is evil

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Eric Botcazou wrote:
Suppose you're playing an Allegro game under Linux console: how do you modify the sound volume if it is too low ? You switch to another console, log in again, then try to hook the OSS driver ?

Normally, you set the golbal volume once, and then leave it at that. I don't think most users regularly change the global volume.

However, I still don't think that Allegro should play with it. After all, the user may be running some other sound producing application in the background (an MP3/ogg player for example). We don't want to be rude and change the volume for that player too.

However I guess your proposition makes more sense with windowing systems (Windows, BeOS, QNX, KDE) where you are always only two keystrokes away from the global sound mixer.

Good point.


So I think we could try to have both functionalities:
- set_volume() with a more complete documentation explaining its drawbacks,
- set_local_volume() which doesn't touch the global mixer.

How about:
set_volume() - doesn't touch the global volume (ie: the "right" way)
set_global_volume() - changes the global volume, for users that really need it.


How do you see then the relationship between set_local_volume() and voice_set_volume() ?

final volume = global * local


--
- Robert Jr Ohannessian
http://bob.allegronetwork.com/
The peer will come and reset your connection. RUN WHILE YOU STILL CAN!



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/