Commit Graph

6 Commits

Author SHA1 Message Date
Glenn Maynard be307e9a60 probably fix crash with mono songs 2007-11-08 09:06:43 +00:00
Glenn Maynard 1d471e7a84 style 2007-11-08 09:01:50 +00:00
Glenn Maynard 56c5972fa3 add helpers 2007-02-01 03:26:07 +00:00
Glenn Maynard 1bd5513698 Switch to floating-point sound internally.
This allows us to change the volume of sounds in filters ("volume",
"fade" properties) without quantizing the audio prematurely.  Previously,
we had a hack to apply volume changes as a mixing-time step.  This
can be done at any point in the filter chain now.

This also means we only need to worry about clipping at the very
last mixing step, instead of at every place we change sound.

Dithering for 16-bit audio and more intelligent gain control
is possible, as we have full-resolution, unclipped sound at the
mixing phase.

We support high resolution source sounds; both Vorbis and MAD
supply more than 16 bits.

Several filters, such as resampling, are easier to implement as
floats; these no longer need to convert back and forth.

Negatives:
 - More memory use.  The main case of this is in RageSoundReader_Preload,
which will be fixed: we can preload in 16-bit without losing most of the
above.
 - Some extra overhead for accessing more memory.
2007-01-27 07:14:58 +00:00
Glenn Maynard 08dd174e5c RageSoundManager::AttenuateBuf -> RageSoundUtil::Attenuate
comment
2005-12-30 19:03:09 +00:00
Glenn Maynard 36f788dcc7 split simple sound utils 2004-10-25 01:53:19 +00:00