aboutsummaryrefslogtreecommitdiff
path: root/sound/rate.h
diff options
context:
space:
mode:
authorMax Horn2003-08-02 19:09:52 +0000
committerMax Horn2003-08-02 19:09:52 +0000
commit7ec38f5f02ebd44332b34e059d209165fa68fa14 (patch)
tree5a7ae973eed9741c8693213eed423fe75ffe1c9f /sound/rate.h
parent20ba0865117ed865bc92a0e1e633dfc10c431587 (diff)
downloadscummvm-rg350-7ec38f5f02ebd44332b34e059d209165fa68fa14.tar.gz
scummvm-rg350-7ec38f5f02ebd44332b34e059d209165fa68fa14.tar.bz2
scummvm-rg350-7ec38f5f02ebd44332b34e059d209165fa68fa14.zip
some more tweaks
svn-id: r9424
Diffstat (limited to 'sound/rate.h')
-rw-r--r--sound/rate.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/sound/rate.h b/sound/rate.h
index b55897caad..694dbe0b16 100644
--- a/sound/rate.h
+++ b/sound/rate.h
@@ -48,14 +48,14 @@ typedef eff_struct *eff_t;
#define ST_SUCCESS (0)
static inline void clampedAdd(int16& a, int b) {
- int val = a + b;
+ register int val = a + b;
if (val > ST_SAMPLE_MAX)
- a = ST_SAMPLE_MAX;
+ val = ST_SAMPLE_MAX;
else if (val < ST_SAMPLE_MIN)
- a = ST_SAMPLE_MIN;
- else
- a = val;
+ val = ST_SAMPLE_MIN;
+
+ a = val;
}
// Q&D hack to get this SOX stuff to work
@@ -68,19 +68,21 @@ class RateConverter {
public:
RateConverter() {}
virtual ~RateConverter() {}
- virtual int flow(AudioInputStream &input, st_sample_t *obuf, st_size_t *osamp, st_volume_t vol) = 0;
- virtual int drain(st_sample_t *obuf, st_size_t *osamp, st_volume_t vol) = 0;
+ virtual int flow(AudioInputStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol) = 0;
+ virtual int drain(st_sample_t *obuf, st_size_t osamp, st_volume_t vol) = 0;
};
+/*
class ResampleRateConverter : public RateConverter {
protected:
eff_struct effp;
public:
ResampleRateConverter(st_rate_t inrate, st_rate_t outrate, int quality);
~ResampleRateConverter();
- virtual int flow(AudioInputStream &input, st_sample_t *obuf, st_size_t *osamp, st_volume_t vol);
- virtual int drain(st_sample_t *obuf, st_size_t *osamp, st_volume_t vol);
+ virtual int flow(AudioInputStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol);
+ virtual int drain(st_sample_t *obuf, st_size_t osamp, st_volume_t vol);
};
+*/
RateConverter *makeRateConverter(st_rate_t inrate, st_rate_t outrate, bool stereo, bool reverseStereo = false);