aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudvig Strigeus2001-11-05 20:45:07 +0000
committerLudvig Strigeus2001-11-05 20:45:07 +0000
commite2f1fef1f92b1646cf9faa2eb23a47f393b245da (patch)
treeb913bbb3c3a12e15515c451344fade44666b468b
parent54334216089a2da3204df4391f8a3634027a9582 (diff)
downloadscummvm-rg350-e2f1fef1f92b1646cf9faa2eb23a47f393b245da.tar.gz
scummvm-rg350-e2f1fef1f92b1646cf9faa2eb23a47f393b245da.tar.bz2
scummvm-rg350-e2f1fef1f92b1646cf9faa2eb23a47f393b245da.zip
fixed playSfxSound types
svn-id: r3457
-rw-r--r--scumm.h5
-rw-r--r--sdl.cpp12
2 files changed, 12 insertions, 5 deletions
diff --git a/scumm.h b/scumm.h
index 9ed9b23d7f..7641a8acff 100644
--- a/scumm.h
+++ b/scumm.h
@@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
+ * Revision 1.17 2001/11/05 20:45:07 strigeus
+ * fixed playSfxSound types
+ *
* Revision 1.16 2001/11/05 19:21:49 strigeus
* bug fixes,
* speech in dott
@@ -1689,5 +1692,5 @@ void updateScreen(Scumm *s);
void drawMouse(Scumm *s, int x, int y, int color, byte *mask, bool visible);
void blit(byte *dst, byte *src, int w, int h);
byte *findResource(uint32 id, byte *searchin, int index);
-void playSfxSound(void *sound, int size, int rate);
+void playSfxSound(void *sound, uint32 size, uint rate);
bool isSfxFinished(); \ No newline at end of file
diff --git a/sdl.cpp b/sdl.cpp
index c142ba5193..607a0c0de9 100644
--- a/sdl.cpp
+++ b/sdl.cpp
@@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
+ * Revision 1.14 2001/11/05 20:45:07 strigeus
+ * fixed playSfxSound types
+ *
* Revision 1.13 2001/11/05 19:21:49 strigeus
* bug fixes,
* speech in dott
@@ -402,8 +405,8 @@ void drawMouse(Scumm *s, int xdraw, int ydraw, int color, byte *mask, bool visib
#define BITS_PER_SAMPLE 16
static void *_sfx_sound;
-static int _sfx_pos;
-static int _sfx_size;
+static uint32 _sfx_pos;
+static uint32 _sfx_size;
static uint32 _sfx_fp_speed;
static uint32 _sfx_fp_pos;
@@ -412,7 +415,7 @@ bool isSfxFinished() {
return _sfx_size == 0;
}
-void playSfxSound(void *sound, int size, int rate) {
+void playSfxSound(void *sound, uint32 size, uint rate) {
if (_sfx_sound) {
free(_sfx_sound);
}
@@ -420,10 +423,11 @@ void playSfxSound(void *sound, int size, int rate) {
_sfx_pos = 0;
_sfx_fp_speed = (1<<16) * rate / 22050;
_sfx_fp_pos = 0;
+ debug(1, "size=%d, rate=%d", size, rate);
_sfx_size = size * 22050 / rate;
}
-void mix_sound(int16 *data, int len) {
+void mix_sound(int16 *data, uint32 len) {
int8 *s;
int i;
uint32 fp_pos, fp_speed;