aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/sfx/iterator/core.cpp2
-rw-r--r--engines/sci/sfx/iterator/songlib.cpp4
-rw-r--r--sound/timestamp.cpp5
-rw-r--r--sound/timestamp.h6
4 files changed, 6 insertions, 11 deletions
diff --git a/engines/sci/sfx/iterator/core.cpp b/engines/sci/sfx/iterator/core.cpp
index fcd83ef800..bc90a555a6 100644
--- a/engines/sci/sfx/iterator/core.cpp
+++ b/engines/sci/sfx/iterator/core.cpp
@@ -140,7 +140,7 @@ public:
};
SfxPlayer::SfxPlayer(SciVersion soundVersion)
- : _soundVersion(soundVersion) {
+ : _soundVersion(soundVersion), _wakeupTime(0, SFX_TICKS_PER_SEC), _currentTime(0, 1) {
_polyphony = 0;
_mididrv = 0;
diff --git a/engines/sci/sfx/iterator/songlib.cpp b/engines/sci/sfx/iterator/songlib.cpp
index 657e52017d..b5ce9c34ac 100644
--- a/engines/sci/sfx/iterator/songlib.cpp
+++ b/engines/sci/sfx/iterator/songlib.cpp
@@ -33,7 +33,7 @@ namespace Sci {
#define debug_stream stderr
-Song::Song() {
+Song::Song() : _wakeupTime(0, SFX_TICKS_PER_SEC) {
_handle = 0;
_resourceNum = 0;
_priority = 0;
@@ -53,7 +53,7 @@ Song::Song() {
_nextStopping = NULL;
}
-Song::Song(SongHandle handle, SongIterator *it, int priority) {
+Song::Song(SongHandle handle, SongIterator *it, int priority) : _wakeupTime(0, SFX_TICKS_PER_SEC) {
_handle = handle;
_resourceNum = 0;
_priority = priority;
diff --git a/sound/timestamp.cpp b/sound/timestamp.cpp
index 13de41ff06..c85ec47ae8 100644
--- a/sound/timestamp.cpp
+++ b/sound/timestamp.cpp
@@ -27,12 +27,9 @@
namespace Audio {
-Timestamp::Timestamp() :
- _msecs(0), _frameRate(0), _frameOffset(0) {
-}
-
Timestamp::Timestamp(uint32 m, int frameRate) :
_msecs(m), _frameRate(frameRate), _frameOffset(0) {
+ assert(_frameRate > 0);
}
diff --git a/sound/timestamp.h b/sound/timestamp.h
index 72671aaa77..1a30b4353e 100644
--- a/sound/timestamp.h
+++ b/sound/timestamp.h
@@ -44,12 +44,10 @@ protected:
/* Total time: msecs + frame_offset/frame_rate */
public:
- Timestamp();
-
/**
* Set up a timestamp with a given time and framerate.
- * @param msecs staring time in milliseconds
- * @param frameRate number of frames per second
+ * @param msecs staring time in milliseconds
+ * @param frameRate number of frames per second (must be > 0)
*/
Timestamp(uint32 msecs, int frameRate);