Re: [AD] Allegro's mixer

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


Ben Davis wrote:
To convert a sample from stereo to mono, you should average the channels, not add. The 127 would apply to samples all panned to the same side, wouldn't it?

Ah yeah, you're right. The mixer halves the volume of the two sides when updateing the volume, and just adds them together when mixing. I should probably change that as it's not very accurate, though it is the low quality mixer.

The idea was that the programmer should control the _maximum_ output level with set_volume_per_voice(), thereby making sure the output is sufficiently loud but not seriously clipped.

But shouldn't the end-user have control over that? For example, with my (poor) speaker set there can be sufficient clipping going on and I can't tell the difference (to give you an idea: I can play the demo game with the DIGMID driver at full regular volume and can't tell there's any clipping happening). With a higher quality speaker set, one may notice and can then choose to lower the output volume if it bothers them that much. And, especially with the DIGMID driver, the number of concurrent voices and the possiblity to end up clipping after being added is, while likely with DIGMID, still unknown, so enforcing something with set_volume_per_voice would just place a volume restriction that the end-user can't do anything about.

IMO it doesn't do to allow the user to turn the volume up so high that it clips severely.

I still think it should be their choice. You could impose a default set_volume level that would place output at the same volume that you'd get with set_volume_per_voice(>0), and then allow the end-user to adjust it from there.

- Kitty Cat




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