Commit Graph
25 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 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 7385c1f4c1 merge SetPosition_Accurate and SetPosition_Fast. Use a property
instead.
2006-12-10 08:59:13 +00:00
Glenn Maynard 3859d3b7bc implement GetNumChannels to simplify (if mono, send mono sound,
not stereo)
2006-12-10 04:20:22 +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 f07ac5cf74 comment, cleanup 2005-02-13 03:13:33 +00:00
Glenn Maynard 56d421a186 unneeded includes 2004-05-11 21:16:59 +00:00
Glenn Maynard f9f10e2372 more license updates 2004-05-06 02:40:33 +00:00
Glenn Maynard 3134e40091 sample music sync fix 2004-03-01 06:40:40 +00:00
Glenn Maynard 47530d2117 Remove OffsetFix
Read Info tags
Mimic BASS decoding peculiarities
2004-01-24 20:00:41 +00:00
Glenn Maynard 5c2eb8acfe use RageFile 2003-12-04 20:06:27 +00:00
Glenn Maynard 9ade4fa722 GetLength optimization 2003-10-03 23:23:28 +00:00
Glenn Maynard f75058750a Evil magic. Should fix some editor sync problems. 2003-10-02 08:37:09 +00:00
Glenn Maynard 036fd2beb9 Fix: don't chop off the first 26ms of each MP3 (but don't change sync,
either).
2003-10-02 04:56:09 +00:00
Glenn Maynard d692834d07 Make GetLength and GetLength_Fast really const 2003-09-25 00:34:01 +00:00
Glenn Maynard 8a4317e0e1 Cleanup. Improve error reporting. Fix a broken assertion. 2003-09-13 20:13:03 +00:00
Glenn Maynard 7afffaef0e Improve return values for fallbacks. 2003-09-13 06:06:01 +00:00
Glenn Maynard f2b1a9b2d1 Native MAD decoder driver. 2003-09-13 00:10:03 +00:00