aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-02-12 17:31:33 +0000
committerTorbjörn Andersson2004-02-12 17:31:33 +0000
commita8f8ceee0f14d2dd2c8e2eaf49a6f627b3353adc (patch)
tree47af280a6f8384dbf5b3cf30188455cbdc0352b9 /sound
parent447e8d93869a614dd521644a2df62bf96859007e (diff)
downloadscummvm-rg350-a8f8ceee0f14d2dd2c8e2eaf49a6f627b3353adc.tar.gz
scummvm-rg350-a8f8ceee0f14d2dd2c8e2eaf49a6f627b3353adc.tar.bz2
scummvm-rg350-a8f8ceee0f14d2dd2c8e2eaf49a6f627b3353adc.zip
Removed now obsolete getSamplesPlayed() function. It was only ever used for
the Broken Sword cutscenes, where it didn't work very well, and was never fully implemented. svn-id: r12832
Diffstat (limited to 'sound')
-rw-r--r--sound/audiostream.h13
-rw-r--r--sound/vorbis.cpp6
2 files changed, 1 insertions, 18 deletions
diff --git a/sound/audiostream.h b/sound/audiostream.h
index 0dde9a61b5..97822c0c26 100644
--- a/sound/audiostream.h
+++ b/sound/audiostream.h
@@ -74,19 +74,6 @@ public:
/** Sample rate of the stream. */
virtual int getRate() const = 0;
-
- /**
- * This function returns the number of samples that were delivered to
- * the mixer which is a rough estimate of how moch time of the stream
- * has been played.
- * The exact value is not available as it needs information from the
- * audio device on how many samples have been already played
- * As our buffer is relatively short the estimate is exact enough
- * The return -1 is kind of a hack as this function is only required
- * for the video audio sync in the bs2 cutscenes I am to lazy to
- * implement it for all subclasses
- */
- virtual int getSamplesPlayed() const { return -1; }
};
class AppendableAudioStream : public AudioStream {
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp
index 3267080502..4c515257af 100644
--- a/sound/vorbis.cpp
+++ b/sound/vorbis.cpp
@@ -172,7 +172,6 @@ class VorbisInputStream : public AudioStream {
int16 _buffer[4096];
const int16 *_bufferEnd;
const int16 *_pos;
- int _played;
void refill();
inline bool eosIntern() const;
@@ -185,7 +184,6 @@ public:
bool isStereo() const { return _numChannels >= 2; }
int getRate() const { return ov_info(_ov_file, -1)->rate; }
- int getSamplesPlayed() const { return _played / _numChannels; }
};
@@ -196,7 +194,7 @@ public:
VorbisInputStream::VorbisInputStream(OggVorbis_File *file, int duration)
- : _ov_file(file), _bufferEnd(_buffer + ARRAYSIZE(_buffer)), _played(0) {
+ : _ov_file(file), _bufferEnd(_buffer + ARRAYSIZE(_buffer)) {
// Check the header, determine if this is a stereo stream
_numChannels = ov_info(_ov_file, -1)->channels;
@@ -218,7 +216,6 @@ inline int16 VorbisInputStream::read() {
if (_pos >= _bufferEnd) {
refill();
}
- _played++;
return sample;
}
@@ -238,7 +235,6 @@ int VorbisInputStream::readBuffer(int16 *buffer, const int numSamples) {
refill();
}
}
- _played += samples;
return samples;
}