Re: [AD] Sound API

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


On Monday 17 May 2004 10:54, Chris wrote:
> Elias Pschernig wrote:
> > I think I can resolve this all with a picture:
> >
> > http://allefant.sf.net/uploads/set_volume_per_voice.png
[snip]

Thanks for doing this :)

It looks to me as if set_volume_per_voice() isn't working properly with the 
new mixer. The first three should be at different levels, like the last 
three, shouldn't they?

> You should add both channels together when showing output volume, and
> you'll see that set_volume_per_voice(0) easilly overflows. Currently
> with my mixer, you can't get any louder than set_volume_per_voice(1),
> which is the "default" volume for a voice (the max without risking any
> overflow). I can reimplement set_volume_per_voice(0), but for your
> typical game I personally don't believe there's any need for, or that
> it's even worth, it.

What about for DUMB's example players? They want to use a single audio stream, 
stereo panned and centred, and have the output at maximum. 
set_volume_per_voice(0) is required here. Remember the rule: if some 
functionality exists, then people are using it and you must keep it.

From your other e-mail it sounds to me as if you're willing to have a game 
clip as much as it likes just because it's not going to wrap when it does so. 
I'm afraid I don't agree with this. Clipping may not be as bad as wrapping 
but it is still distortion, and the amount you're doing it WILL be noticeable 
in some situations (e.g. with DIGMID). Clipping often makes me worry that my 
speakers are too loud and might be damaged - it's that kind of sound. Don't 
take it lightly.

I'd like to see Allegro's mixer outputting exactly the same volume level as 
before, in all circumstances. That means:

- In Elias's test, the first three should look the same as the last three;
- EVERYTHING that set_volume_per_voice() describes should remain true.

Can you do this?

In the long-distant past, Allegro always made samples quite quiet (a centred 
sample would be one quarter of the maximum volume), and made them even 
quieter if you requested more voices. This was someone's decision, and would 
be appropriate sometimes, but is too quiet for a lot of cases.

I hacked my own version of Allegro to play everything louder, and I think you 
did the same at one point, didn't you, Chris? But this was again a personal 
decision that was appropriate for my games and wouldn't be appropriate for 
everyone's.

set_volume_per_voice() actually gives the choice to the game developer, while 
keeping set_volume() for the game player. I still believe this choice, as 
distinct from set_volume(), should be there. (Note that a default volume as 
set by set_volume() will be read from the config file as well.)

Ben




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