[Scummvm-cvs-logs] CVS: scummvm/sound audiostream.h,1.30,1.31 vorbis.cpp,1.10,1.11
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Thu Feb 12 09:37:12 CET 2004
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20861
Modified Files:
audiostream.h vorbis.cpp
Log Message:
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.
Index: audiostream.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/audiostream.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- audiostream.h 17 Jan 2004 14:20:32 -0000 1.30
+++ audiostream.h 12 Feb 2004 17:31:33 -0000 1.31
@@ -74,19 +74,6 @@
/** 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 {
Index: vorbis.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/vorbis.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- vorbis.cpp 18 Jan 2004 20:57:45 -0000 1.10
+++ vorbis.cpp 12 Feb 2004 17:31:33 -0000 1.11
@@ -172,7 +172,6 @@
int16 _buffer[4096];
const int16 *_bufferEnd;
const int16 *_pos;
- int _played;
void refill();
inline bool eosIntern() const;
@@ -185,7 +184,6 @@
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 @@
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 @@
if (_pos >= _bufferEnd) {
refill();
}
- _played++;
return sample;
}
@@ -238,7 +235,6 @@
refill();
}
}
- _played += samples;
return samples;
}
More information about the Scummvm-git-logs
mailing list