From 0f74124d789488d42bc62b6a8bcf67d31e0b9bfd Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 17 Jul 2008 15:56:24 +0000 Subject: Committing PS2 changes on behalf of the other Max ;) svn-id: r33089 --- backends/platform/ps2/systemps2.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'backends/platform/ps2/systemps2.cpp') diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp index 28ced7b345..d4dd9aedcf 100644 --- a/backends/platform/ps2/systemps2.cpp +++ b/backends/platform/ps2/systemps2.cpp @@ -54,9 +54,11 @@ #include "graphics/surface.h" #include "graphics/font.h" #include "backends/timer/default/default-timer.h" -#include "sound/mixer.h" +#include "sound/mixer_intern.h" #include "common/events.h" #include "backends/platform/ps2/ps2debug.h" +#include "backends/fs/ps2/ps2-fs-factory.h" + // asm("mfc0 %0, $9\n" : "=r"(tickStart)); extern void *_gp; @@ -309,7 +311,9 @@ OSystem_PS2::OSystem_PS2(const char *elfPath) { void OSystem_PS2::init(void) { sioprintf("Timer...\n"); _scummTimerManager = new DefaultTimerManager(); - _scummMixer = new Audio::Mixer(); + _scummMixer = new Audio::MixerImpl(this); + _scummMixer->setOutputRate(44100); + _scummMixer->setReady(true); initTimer(); sioprintf("Starting SavefileManager\n"); @@ -410,7 +414,8 @@ void OSystem_PS2::soundThread(void) { // we have to produce more samples, call sound mixer // the scratchpad at 0x70000000 is used as temporary soundbuffer //_scummSoundProc(_scummSoundParam, (uint8*)0x70000000, SMP_PER_BLOCK * 2 * sizeof(int16)); - Audio::Mixer::mixCallback(_scummMixer, (byte*)0x70000000, SMP_PER_BLOCK * 2 * sizeof(int16)); + // Audio::Mixer::mixCallback(_scummMixer, (byte*)0x70000000, SMP_PER_BLOCK * 2 * sizeof(int16)); + _scummMixer->mixCallback((byte*)0x70000000, SMP_PER_BLOCK * 2 * sizeof(int16)); // demux data into 2 buffers, L and R __asm__ ( @@ -534,10 +539,6 @@ Common::TimerManager *OSystem_PS2::getTimerManager() { return _scummTimerManager; } -int OSystem_PS2::getOutputSampleRate(void) const { - return 48000; -} - Audio::Mixer *OSystem_PS2::getMixer() { return _scummMixer; } @@ -546,6 +547,10 @@ Common::SaveFileManager *OSystem_PS2::getSavefileManager(void) { return _saveManager; } +FilesystemFactory *OSystem_PS2::getFilesystemFactory() { + return &Ps2FilesystemFactory::instance(); +} + void OSystem_PS2::setShakePos(int shakeOffset) { _screen->setShakePos(shakeOffset); } -- cgit v1.2.3