author | sandman <sandman> | 2002-06-18 12:46:11 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-06-18 12:46:11 (UTC) |
commit | 61e2f9e5eb634b17ef480d79bdbcbc3a715990cb (patch) (unidiff) | |
tree | 013600ee0ababcc25f37ff98cede8f67cbdc9d2a /library/sound.cpp | |
parent | e21322ab34a8df36344eece685e604abe4f83fc6 (diff) | |
download | opie-61e2f9e5eb634b17ef480d79bdbcbc3a715990cb.zip opie-61e2f9e5eb634b17ef480d79bdbcbc3a715990cb.tar.gz opie-61e2f9e5eb634b17ef480d79bdbcbc3a715990cb.tar.bz2 |
Moved platform specific things from custom-*.h #defines to virtual methods
in libopie/odevice.{h,cpp}
Minor fix in Sound + reformating
-rw-r--r-- | library/sound.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/library/sound.cpp b/library/sound.cpp index 602fcf0..1ff3b3f 100644 --- a/library/sound.cpp +++ b/library/sound.cpp | |||
@@ -109,2 +109,3 @@ public: | |||
109 | loopsleft=0; | 109 | loopsleft=0; |
110 | ms = WAVsoundDuration(filename); | ||
110 | } | 111 | } |
@@ -116,3 +117,2 @@ public: | |||
116 | 117 | ||
117 | int ms = WAVsoundDuration(filename); | ||
118 | if ( ms ) | 118 | if ( ms ) |
@@ -125,6 +125,8 @@ public: | |||
125 | if (loopsleft >= 0) { | 125 | if (loopsleft >= 0) { |
126 | if (--loopsleft <= 0) | 126 | if ( --loopsleft <= 0 ) { |
127 | killTimer (e->timerId()); | 127 | killTimer (e->timerId()); |
128 | loopsleft = 0; | ||
128 | return; | 129 | return; |
129 | } | 130 | } |
131 | } | ||
130 | play(); | 132 | play(); |
@@ -140,3 +142,5 @@ private: | |||
140 | int loopsleft; | 142 | int loopsleft; |
143 | int ms; | ||
141 | }; | 144 | }; |
145 | |||
142 | #endif | 146 | #endif |
@@ -160,3 +164,2 @@ void Sound::play() | |||
160 | #ifndef QT_NO_SOUND | 164 | #ifndef QT_NO_SOUND |
161 | d->killTimers(); | ||
162 | d->playLoop(1); | 165 | d->playLoop(1); |
@@ -184,2 +187,4 @@ bool Sound::isFinished() const | |||
184 | return d->isFinished(); | 187 | return d->isFinished(); |
188 | #else | ||
189 | return true; | ||
185 | #endif | 190 | #endif |