aboutsummaryrefslogtreecommitdiff
path: root/system.h
diff options
context:
space:
mode:
authorLudvig Strigeus2002-04-14 18:13:08 +0000
committerLudvig Strigeus2002-04-14 18:13:08 +0000
commitac62a7cb2e17a86350681366d768a99db3b9845d (patch)
tree48a6f9eca1242f7ebf03f05835372811a4048f7a /system.h
parenta5e3dbb85dad96d8ffb6205e07d12ff8396ba5c7 (diff)
downloadscummvm-rg350-ac62a7cb2e17a86350681366d768a99db3b9845d.tar.gz
scummvm-rg350-ac62a7cb2e17a86350681366d768a99db3b9845d.tar.bz2
scummvm-rg350-ac62a7cb2e17a86350681366d768a99db3b9845d.zip
wrote new mixer class,
cleaned up sound header files, integrated mixer into scummvm & simon svn-id: r3937
Diffstat (limited to 'system.h')
-rw-r--r--system.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/system.h b/system.h
index 69f4a9ee49..8bfd7a85c0 100644
--- a/system.h
+++ b/system.h
@@ -3,7 +3,7 @@
class OSystem {
public:
typedef int ThreadProc(void *param);
- typedef void SoundProc(void *param, int16 *buf, int len);
+ typedef void SoundProc(void *param, byte *buf, int len);
struct Event {
int event_code;
@@ -34,17 +34,17 @@ public:
};
enum {
- PARAM_TOGGLE_FULLSCREEN = 1,
- PARAM_WINDOW_CAPTION = 2,
- PARAM_OPEN_CD = 3,
- PARAM_HOTSWAP_GFX_MODE = 4,
- PARAM_SHOW_DEFAULT_CURSOR = 5,
+ PROP_TOGGLE_FULLSCREEN = 1,
+ PROP_SET_WINDOW_CAPTION = 2,
+ PROP_OPEN_CD = 3,
+ PROP_SET_GFX_MODE = 4,
+ PROP_SHOW_DEFAULT_CURSOR = 5,
+ PROP_GET_SAMPLE_RATE = 6,
};
enum {
- SOUND_NONE = 0,
- SOUND_8BIT = 1,
- SOUND_16BIT = 2,
+ SOUND_8BIT = 0,
+ SOUND_16BIT = 1,
};
// Set colors of the palette
@@ -52,7 +52,7 @@ public:
// Set the size of the video bitmap.
// Typically, 320x200
- virtual void init_size(uint w, uint h, byte sound) = 0;
+ virtual void init_size(uint w, uint h) = 0;
// Draw a bitmap to screen.
// The screen will not be updated to reflect the new bitmap
@@ -87,9 +87,12 @@ public:
virtual bool poll_event(Event *event) = 0;
// Set the function to be invoked whenever samples need to be generated
- virtual void set_sound_proc(void *param, SoundProc *proc) = 0;
+ // Format is the sample type format.
+ // Only 16-bit signed mode is needed for simon & scumm
+ virtual void set_sound_proc(void *param, SoundProc *proc, byte format) = 0;
- virtual uint32 set_param(int param, uint32 value) = 0;
+ // Get or set a property
+ virtual uint32 property(int param, uint32 value) = 0;
// Quit
virtual void quit() = 0;