Commit Graph

17 Commits

Author SHA1 Message Date
Steve Checkoway 75f7b2d9dc Simplify. 2007-01-28 22:26:49 +00:00
Steve Checkoway f4d616e7a2 Update for floating point. No need to bother with the integer read because OS X doesn't use it. 2007-01-27 17:09:15 +00:00
Steve Checkoway 1f67599508 Simplify. 2007-01-27 13:29:36 +00:00
Steve Checkoway a579593c52 Disable vector code for now. It needs to be updated for floats. 2007-01-27 13:24:39 +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
Steve Checkoway e7832c9ad4 Mix using the vector unit on OS X. 2006-12-11 13:31:51 +00:00
Steve Checkoway 1c2fa7eff6 Ensure that the precondition is satisfied before calling those functions. Perhaps I'll fix the code to handle misaligned addresses at some point. 2006-12-10 13:13:47 +00:00
Glenn Maynard f97d80afdc fix iSize == 0 (Extend < 0) 2006-12-10 04:06:33 +00:00
Glenn Maynard fa5a6102f4 add stride 2006-12-09 22:43:44 +00:00
Glenn Maynard a86fd32253 style 2006-12-08 03:59:54 +00:00
Steve Checkoway 8d83e1e3f8 Bah, revert. It still doesn't shut up the profiler. If it's not doing any work, it'll be quite quick. 2006-05-17 09:26:04 +00:00
Steve Checkoway 032c1269bc Pull size check out of the function. Profiling showed that a large number of samples (as in profiling samples, not sound samples) of Vector::FastSoundWrite() where in its prologue which was attributed to the early exit condition (basically just shuts the profiler up). 2006-05-17 09:13:08 +00:00
Steve Checkoway 4995793c0b Quiet warning when building for i386. 2006-05-14 08:12:37 +00:00
Steve Checkoway f39e79efed The last of the changes, I hope. 2006-05-14 07:04:28 +00:00
Glenn Maynard fd813fe667 add Extend()
cleanup/comment
2004-10-25 00:48:16 +00:00
Glenn Maynard 42bc44330a cleanup 2004-10-24 03:14:24 +00:00
Glenn Maynard 35bdf452dd split RageSoundMixBuffer into its own file 2004-10-24 03:05:57 +00:00