diff options
author | Ludvig Strigeus | 2002-04-16 12:07:19 +0000 |
---|---|---|
committer | Ludvig Strigeus | 2002-04-16 12:07:19 +0000 |
commit | 71eac5acd30cb1fd48cbfbc464b4a37adee8a6b4 (patch) | |
tree | 8b6e4950c5dd6805344f8051cac517461691d76d /sound | |
parent | d91b85049fc8d40cd9ac5ac42fef2d4f1008d63e (diff) | |
download | scummvm-rg350-71eac5acd30cb1fd48cbfbc464b4a37adee8a6b4.tar.gz scummvm-rg350-71eac5acd30cb1fd48cbfbc464b4a37adee8a6b4.tar.bz2 scummvm-rg350-71eac5acd30cb1fd48cbfbc464b4a37adee8a6b4.zip |
endian fixes,
don't use adlib driver if sound initialization fails,
simon1 savedialog works
svn-id: r3955
Diffstat (limited to 'sound')
-rw-r--r-- | sound/mixer.cpp | 4 | ||||
-rw-r--r-- | sound/mixer.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp index add23d9e91..084dced7d8 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -55,7 +55,7 @@ void SoundMixer::on_generate_samples(void *s, byte *samples, int len) { ((SoundMixer*)s)->mix((int16*)samples, len>>1); } -void SoundMixer::bind_to_system(OSystem *syst) { +bool SoundMixer::bind_to_system(OSystem *syst) { _volume_table = (int16*)calloc(256*sizeof(int16),1); uint rate = (uint)syst->property(OSystem::PROP_GET_SAMPLE_RATE, 0); @@ -65,7 +65,7 @@ void SoundMixer::bind_to_system(OSystem *syst) { if (rate == 0) error("OSystem returned invalid sample rate"); - syst->set_sound_proc(this, on_generate_samples, OSystem::SOUND_16BIT); + return syst->set_sound_proc(this, on_generate_samples, OSystem::SOUND_16BIT); } void SoundMixer::stop_all() { diff --git a/sound/mixer.h b/sound/mixer.h index e2002a9e87..9894d20a87 100644 --- a/sound/mixer.h +++ b/sound/mixer.h @@ -90,7 +90,7 @@ public: /* bind to the OSystem object => mixer will be * invoked automatically when samples need * to be generated */ - void bind_to_system(OSystem *syst); + bool bind_to_system(OSystem *syst); /* set the volume, 0-256 */ void set_volume(int volume); |