diff options
-rw-r--r-- | dists/msvc9/kyra.vcproj | 4 | ||||
-rw-r--r-- | engines/kyra/kyra_v1.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/module.mk | 1 | ||||
-rw-r--r-- | engines/kyra/sound_intern.h | 28 | ||||
-rw-r--r-- | sound/mods/maxtrax.cpp | 1 |
5 files changed, 35 insertions, 1 deletions
diff --git a/dists/msvc9/kyra.vcproj b/dists/msvc9/kyra.vcproj index 24575c6d5d..683dde6449 100644 --- a/dists/msvc9/kyra.vcproj +++ b/dists/msvc9/kyra.vcproj @@ -502,6 +502,10 @@ > </File> <File + RelativePath="..\..\engines\kyra\sound_amiga.cpp" + > + </File> + <File RelativePath="..\..\engines\kyra\sound_digital.cpp" > </File> diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 80872877d5..a8889768a7 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -113,6 +113,8 @@ Common::Error KyraEngine_v1::init() { _sound = new SoundPC98(this, _mixer); else _sound = new SoundTownsPC98_v2(this, _mixer); + } else if (_flags.platform == Common::kPlatformAmiga) { + _sound = new SoundAmiga(this, _mixer); } else if (midiDriver == MD_ADLIB) { _sound = new SoundAdlibPC(this, _mixer); assert(_sound); diff --git a/engines/kyra/module.mk b/engines/kyra/module.mk index 7b0c0dfb68..b484fa345f 100644 --- a/engines/kyra/module.mk +++ b/engines/kyra/module.mk @@ -50,6 +50,7 @@ MODULE_OBJS := \ sequences_hof.o \ sequences_mr.o \ sound_adlib.o \ + sound_amiga.o \ sound_digital.o \ sound_midi.o \ sound_pcspk.o \ diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h index 8792c14815..a41ca2258c 100644 --- a/engines/kyra/sound_intern.h +++ b/engines/kyra/sound_intern.h @@ -36,6 +36,7 @@ namespace Audio { class PCSpeaker; +class MaxTrax; } // end of namespace Audio namespace Kyra { @@ -343,6 +344,33 @@ private: static const uint8 _noteTable2[]; }; +class SoundAmiga : public Sound { +public: + SoundAmiga(KyraEngine_v1 *vm, Audio::Mixer *mixer); + ~SoundAmiga(); + + virtual kType getMusicType() const { return kPC98; } //FIXME + + bool init(); + + void process() {} + void loadSoundFile(uint file); + void loadSoundFile(Common::String); + + void playTrack(uint8 track); + void haltTrack(); + void beginFadeOut(); + + int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx) { return -1; } + void playSoundEffect(uint8); + +protected: + Audio::MaxTrax *_driver; + uint _fileLoaded; + + static const char *const kFilenameTable[3][2]; +}; + } // end of namespace Kyra #endif diff --git a/sound/mods/maxtrax.cpp b/sound/mods/maxtrax.cpp index b72089261c..686a74864e 100644 --- a/sound/mods/maxtrax.cpp +++ b/sound/mods/maxtrax.cpp @@ -567,7 +567,6 @@ void MaxTrax::freePatches() { } memset(const_cast<Patch *>(_patch), 0, sizeof(_patch)); } -// LONG PlayNote(UWORD note,UWORD patch,UWORD duration,UWORD volume,UWORD pan) int MaxTrax::playNote(byte note, byte patch, uint16 duration, uint16 volume, bool rightSide) { assert(patch < ARRAYSIZE(_patch)); |