aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
authorNicola Mettifogo2007-10-15 20:20:50 +0000
committerNicola Mettifogo2007-10-15 20:20:50 +0000
commit485b70b2b004d2683e31920b8f33053b46fb811d (patch)
treeffe1833ff839d3a43dcefcec931e39ec15ec7ced /engines/parallaction
parentdb19310ad106db774f752383fea54c8c3af26ebb (diff)
downloadscummvm-rg350-485b70b2b004d2683e31920b8f33053b46fb811d.tar.gz
scummvm-rg350-485b70b2b004d2683e31920b8f33053b46fb811d.tar.bz2
scummvm-rg350-485b70b2b004d2683e31920b8f33053b46fb811d.zip
* Changed IFF/8SVX audio to use signed data (int8), and modified Parallaction accordingly.
* Implemented proper beep in Parallaction for Amiga. svn-id: r29226
Diffstat (limited to 'engines/parallaction')
-rw-r--r--engines/parallaction/sound.cpp23
-rw-r--r--engines/parallaction/sound.h2
2 files changed, 17 insertions, 8 deletions
diff --git a/engines/parallaction/sound.cpp b/engines/parallaction/sound.cpp
index 872ed29b08..c6c108c111 100644
--- a/engines/parallaction/sound.cpp
+++ b/engines/parallaction/sound.cpp
@@ -318,20 +318,29 @@ AmigaSoundMan::~AmigaSoundMan() {
stopSfx(3);
}
-static byte res_amigaBeep[] = {
- 0, 20, 40, 60, 80, 60, 40, 20, 0, 236, 216, 196, 176, 196, 216, 236
+#define AMIGABEEP_SIZE 16
+#define NUM_REPEATS 60
+
+static int8 res_amigaBeep[AMIGABEEP_SIZE] = {
+ 0, 20, 40, 60, 80, 60, 40, 20, 0, -20, -40, -60, -80, -60, -40, -20
};
+
void AmigaSoundMan::loadChannelData(const char *filename, Channel *ch) {
if (!scumm_stricmp("beep", filename)) {
ch->header.oneShotHiSamples = 0;
ch->header.repeatHiSamples = 0;
ch->header.samplesPerHiCycle = 0;
- ch->header.samplesPerSec = 12000;
- ch->header.volume = 255;
- ch->data = res_amigaBeep;
- ch->dataSize = 16;
- ch->dispose = false;
+ ch->header.samplesPerSec = 11934;
+ ch->header.volume = 160;
+ ch->data = new int8[AMIGABEEP_SIZE * NUM_REPEATS];
+ int8* odata = ch->data;
+ for (uint i = 0; i < NUM_REPEATS; i++) {
+ memcpy(odata, res_amigaBeep, AMIGABEEP_SIZE);
+ odata += AMIGABEEP_SIZE;
+ }
+ ch->dataSize = AMIGABEEP_SIZE * NUM_REPEATS;
+ ch->dispose = true;
return;
}
diff --git a/engines/parallaction/sound.h b/engines/parallaction/sound.h
index c07fa9affc..9d6ea01485 100644
--- a/engines/parallaction/sound.h
+++ b/engines/parallaction/sound.h
@@ -89,7 +89,7 @@ class AmigaSoundMan : public SoundMan {
struct Channel {
Audio::Voice8Header header;
- byte *data;
+ int8 *data;
uint32 dataSize;
bool dispose;
Audio::SoundHandle handle;