diff options
author | Johannes Schickel | 2010-01-06 15:40:49 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-06 15:40:49 +0000 |
commit | 297a95557946555e5cc51279abafc0dc362af5f7 (patch) | |
tree | 13d590541d406dd55878221d3908feba3b6558e3 /sound/audiostream.h | |
parent | e72707b04e2080c6f780fed54df3a57ce3c6d460 (diff) | |
download | scummvm-rg350-297a95557946555e5cc51279abafc0dc362af5f7.tar.gz scummvm-rg350-297a95557946555e5cc51279abafc0dc362af5f7.tar.bz2 scummvm-rg350-297a95557946555e5cc51279abafc0dc362af5f7.zip |
- Simplify Audio::calculateSampleOffset.
- Made Audio::calculateSampleOffset accessable from outside audiostream.cpp.
- Adapt KYRA's AUDStream to use Audio::calculateSampleOffset.
svn-id: r47082
Diffstat (limited to 'sound/audiostream.h')
-rw-r--r-- | sound/audiostream.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/audiostream.h b/sound/audiostream.h index 8fc485bdb3..3889cffbb4 100644 --- a/sound/audiostream.h +++ b/sound/audiostream.h @@ -205,6 +205,15 @@ public: */ AppendableAudioStream *makeAppendableAudioStream(int rate, byte flags); +/** + * Calculates the sample, which the timestamp describes in a + * AudioStream with the given framerate. + * + * @param where point in time + * @param rate rate of the AudioStream + * @return sample index + */ +uint32 calculateSampleOffset(const Timestamp &where, int rate); } // End of namespace Audio |