aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/sound.h
diff options
context:
space:
mode:
authorTravis Howell2009-03-08 08:45:21 +0000
committerTravis Howell2009-03-08 08:45:21 +0000
commit2620d6836c001f2f295cb6efd6beab78f5a3c50f (patch)
tree81d5055b74abfc7b0be105bee13b39e6505fce91 /engines/agos/sound.h
parent7bfab75a0814d0655a2504bf4c461df0000da0e4 (diff)
downloadscummvm-rg350-2620d6836c001f2f295cb6efd6beab78f5a3c50f.tar.gz
scummvm-rg350-2620d6836c001f2f295cb6efd6beab78f5a3c50f.tar.bz2
scummvm-rg350-2620d6836c001f2f295cb6efd6beab78f5a3c50f.zip
Add initial support for Personal Nightmare.
Thanks to dreammaster for file decompression and icon decoding code. NOTE: setjmp/longjmp code will require conversion for portability. svn-id: r39216
Diffstat (limited to 'engines/agos/sound.h')
-rw-r--r--engines/agos/sound.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/engines/agos/sound.h b/engines/agos/sound.h
index 1e5a8a47d2..be7aa6c076 100644
--- a/engines/agos/sound.h
+++ b/engines/agos/sound.h
@@ -26,6 +26,7 @@
#ifndef AGOS_SOUND_H
#define AGOS_SOUND_H
+#include "sound/audiostream.h"
#include "sound/mixer.h"
#include "agos/intern.h"
#include "common/str.h"
@@ -60,12 +61,23 @@ private:
bool _hasEffectsFile;
bool _hasVoiceFile;
- uint _ambientPlaying;
+ uint16 _ambientPlaying;
+ // Personal Nightmare specfic
+ byte *_soundQueuePtr;
+ uint16 _soundQueueNum;
+ uint32 _soundQueueSize;
+ uint16 _soundQueueFreq;
public:
Sound(AGOSEngine *vm, const GameSpecificSettings *gss, Audio::Mixer *mixer);
~Sound();
+ enum TypeFlags {
+ TYPE_AMBIENT = 1 << 0,
+ TYPE_SFX = 1 << 1,
+ TYPE_SFX5 = 1 << 2
+ };
+
void loadVoiceFile(const GameSpecificSettings *gss);
void loadSfxFile(const GameSpecificSettings *gss);
@@ -77,8 +89,12 @@ public:
void playEffects(uint sound);
void playAmbient(uint sound);
+ // Personal Nightmare specfic
+ void handleSound();
+ void queueSound(byte *ptr, uint16 sound, uint32 size, uint16 freq);
+
// Elvira 1/2 and Waxworks specific
- void playRawData(byte *soundData, uint sound, uint size);
+ void playRawData(byte *soundData, uint sound, uint size, uint freq);
// Feeble Files specific
void playAmbientData(byte *soundData, uint sound, uint pan, uint vol);
@@ -89,8 +105,10 @@ public:
void switchVoiceFile(const GameSpecificSettings *gss, uint disc);
bool hasVoice() const;
+ bool isSfxActive() const;
bool isVoiceActive() const;
void stopAllSfx();
+ void stopSfx();
void stopSfx5();
void stopVoice();
void stopAll();