Re: [AD] set_volume() is evil |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> It's been a while since I last brought this up, so it's time to complain
> again :)
While you are at it... :-)
> set_volume() should not set the global volume on multitasking OSs. It
> should set a volume local to the application. The global mixer volumes (as
> in Windows Volume Control) should only ever be changed when the user
> directly requests it; otherwise Allegro progs tend to max them out and
> break the user's speakers.
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 ?
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.
Now the problem is that we would lose a functionality if we implemented this
behaviour: someone might really want to control the real volume of his
speakers without switching back and forth from his fullscreen application.
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 do you see then the relationship between set_local_volume() and
voice_set_volume() ?
> And don't break the API by renaming the function either ;D
Please don't tempt me ;-)
--
Eric Botcazou