aboutsummaryrefslogtreecommitdiff
path: root/sword1/sound.h
diff options
context:
space:
mode:
authorRobert Göffringmann2003-12-28 23:24:03 +0000
committerRobert Göffringmann2003-12-28 23:24:03 +0000
commite9766658b666dfe5065ccb5f27549f0719b16cda (patch)
tree1083411aca1741dedc6d8269ac267d6c31e73e4f /sword1/sound.h
parent2548df9cf8ae51a55a7959ca24741a9f8ceb8414 (diff)
downloadscummvm-rg350-e9766658b666dfe5065ccb5f27549f0719b16cda.tar.gz
scummvm-rg350-e9766658b666dfe5065ccb5f27549f0719b16cda.tar.bz2
scummvm-rg350-e9766658b666dfe5065ccb5f27549f0719b16cda.zip
this fixes the remaining glitches
svn-id: r12004
Diffstat (limited to 'sword1/sound.h')
-rw-r--r--sword1/sound.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/sword1/sound.h b/sword1/sound.h
index 340a54b6ef..975d3df256 100644
--- a/sword1/sound.h
+++ b/sword1/sound.h
@@ -52,6 +52,8 @@ struct FxDef {
class SoundMixer;
class ResMan;
+#define WAVE_VOL_TAB_LENGTH 480
+#define WAVE_VOL_THRESHOLD 190000 //120000
class SwordSound {
public:
@@ -60,11 +62,10 @@ public:
void newScreen(uint32 screen);
void quitScreen(void);
- bool startSpeech(uint16 roomNo, uint16 localNo); // this should work more or less.
- // Maybe we'll need a delay of 3 gameCycles.
+ bool startSpeech(uint16 roomNo, uint16 localNo);
bool speechFinished(void);
void stopSpeech();
- bool amISpeaking(void); // this is supposed to return if the sounddata is near the ending or very silent...
+ bool amISpeaking(void);
void fnStopFx(int32 fxNo);
int addToQueue(int32 fxNo);
@@ -77,6 +78,9 @@ private:
void closeCowSystem(void);
int16 *uncompressSpeech(uint32 index, uint32 cSize, uint32 *size);
+ void calcWaveVolume(int16 *data, uint32 length);
+ bool _waveVolume[WAVE_VOL_TAB_LENGTH];
+ uint16 _waveVolPos;
File _cowFile;
uint32 *_cowHeader;
uint32 _cowHeaderSize;