Commit Graph
23 Commits
Author SHA1 Message Date
Glenn Maynard acc0b14ee1 push file opening upwards, instead of duplicating it in each loader 2007-02-21 10:10:18 +00:00
Glenn Maynard a3a8f39905 support all bit depths up to 32-bit and 32-bit float 2007-02-01 21:38:22 +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 fd4b5f93bb RageSoundReader::Read(char *) -> int16_t *. This was originally
char * based on the idea of supporting more than one sample type.
I don't plan to do that (though I may change the sample type to float
or int32).
2007-01-20 01:10:24 +00:00
Glenn Maynard f33bb09334 use default 2006-12-11 05:59:27 +00:00
Glenn Maynard 7385c1f4c1 merge SetPosition_Accurate and SetPosition_Fast. Use a property
instead.
2006-12-10 08:59:13 +00:00
Glenn Maynard 25e67dd4dc RageSoundReader::Read(buf, unsigned bytes) -> (buf, int frames);
return value in frames, not bytes
2006-12-10 03:56:36 +00:00
Glenn Maynard ca67a9cb7c change SetPosition_Accurate and SetPosition_Fast to take and return frames 2006-12-09 06:35:09 +00:00
Glenn Maynard cd5f4a6e39 SoundReader_FileReader -> RageSoundReader_FileReader 2006-11-30 04:22:38 +00:00
Glenn Maynard c68c60c67a GetNextStreamFrame -> GetNextSourceFrame 2006-11-29 09:15:23 +00:00
Glenn Maynard 0f9e6c9153 GetNextStreamFrame implementations 2006-11-29 07:40:19 +00:00
Glenn Maynard 7a95f5da5b covariant Copy() 2006-10-20 00:01:18 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Glenn Maynard b6eba6ac8d start eliminating exception use; gcc apparently bloats exceptions to
a degree that makes them not worth it
2004-11-30 08:12:08 +00:00
Glenn Maynard 90ed4534e0 reimplement WAV reading to reduce licensing exceptions 2004-10-05 22:55:00 +00:00
Glenn Maynard fc21403339 convert from SDL to standard types 2004-05-11 20:25:34 +00:00
Glenn Maynard f9f10e2372 more license updates 2004-05-06 02:40:33 +00:00
Glenn Maynard 162e79ea83 use RageFile 2003-12-04 20:21:08 +00:00
Glenn Maynard 6c33443944 Simplify. 2003-09-18 21:10:57 +00:00
Glenn Maynard 477402a78c Fix ADPCM GetLength() crash. 2003-09-17 01:42:42 +00:00
Glenn Maynard 7afffaef0e Improve return values for fallbacks. 2003-09-13 06:06:01 +00:00
Glenn Maynard c95c54dddf remove comment 2003-09-13 00:09:07 +00:00
Glenn Maynard 200177d22a add native WAV decoder 2003-09-10 21:31:40 +00:00