aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJames Brown2002-03-14 14:45:04 +0000
committerJames Brown2002-03-14 14:45:04 +0000
commitd8adad386fd4a59b484534e48be5739705b65897 (patch)
tree9489f4f07b4393adfdb841fc6448f17cf4285253 /sound
parentd8ca3d29875813733996c079147a092fd3ead359 (diff)
downloadscummvm-rg350-d8adad386fd4a59b484534e48be5739705b65897.tar.gz
scummvm-rg350-d8adad386fd4a59b484534e48be5739705b65897.tar.bz2
scummvm-rg350-d8adad386fd4a59b484534e48be5739705b65897.zip
winCE part 2 - still gui.cpp and scummvm.cpp left
svn-id: r3752
Diffstat (limited to 'sound')
-rw-r--r--sound/adlib.cpp7
-rw-r--r--sound/imuse.cpp18
2 files changed, 20 insertions, 5 deletions
diff --git a/sound/adlib.cpp b/sound/adlib.cpp
index 792617f388..faa3dd371e 100644
--- a/sound/adlib.cpp
+++ b/sound/adlib.cpp
@@ -124,7 +124,12 @@ void AdlibSoundDriver::init(SoundEngine *eng) {
}
_adlib_reg_cache = (byte*)calloc(256,1);
- _opl = OPLCreate(OPL_TYPE_YM3812,3579545,22050);
+
+ #ifdef _WIN32_WCE // Poor WIN32 won't handle 22050 well !
+ _opl = OPLCreate(OPL_TYPE_YM3812,3579545,11025);
+ #else
+ _opl = OPLCreate(OPL_TYPE_YM3812,3579545,22050);
+ #endif
adlib_write(1,0x20);
adlib_write(8,0x40);
adlib_write(0xBD, 0x00);
diff --git a/sound/imuse.cpp b/sound/imuse.cpp
index 065459d094..9cd4841c19 100644
--- a/sound/imuse.cpp
+++ b/sound/imuse.cpp
@@ -28,12 +28,17 @@ int num_mix;
#define TICKS_PER_BEAT 480
#ifdef USE_ADLIB
-#define TEMPO_BASE 0x1924E0
-#define HARDWARE_TYPE 1
+ #ifdef _WIN32_WCE
+ #define TEMPO_BASE 0x1F0000 * 2 // Sampled down to 11 kHz
+ #else
+ #define TEMPO_BASE 0x1924E0
+ #endif
+ #define HARDWARE_TYPE 1
#else
-#define TEMPO_BASE 0x400000
-#define HARDWARE_TYPE 5
+ #define TEMPO_BASE 0x400000
+ #define HARDWARE_TYPE 5
#endif
+
#define SYSEX_ID 0x7D
#define SPECIAL_CHANNEL 9
@@ -2111,6 +2116,11 @@ int SoundEngine::save_or_load(Serializer *ser) {
stop_all_sounds();
}
+ #ifdef _WIN32_WCE // Don't break savegames made with andys' build
+ if (!ser->isSaving() && ser->checkEOFLoadStream())
+ return 0;
+ #endif
+
ser->_ref_me = this;
ser->_saveload_ref = ser->isSaving() ? ((void*)&saveReference) : ((void*)&loadReference);