diff options
author | Max Horn | 2006-05-06 18:10:38 +0000 |
---|---|---|
committer | Max Horn | 2006-05-06 18:10:38 +0000 |
commit | ae50315fa05598e83699b87e797c88a57858962e (patch) | |
tree | 0493addf8b30688cd04e1d932bba7183f582c0ef | |
parent | 37d2f30999398acc4bb3edff5b6cdac29a2af7c3 (diff) | |
download | scummvm-rg350-ae50315fa05598e83699b87e797c88a57858962e.tar.gz scummvm-rg350-ae50315fa05598e83699b87e797c88a57858962e.tar.bz2 scummvm-rg350-ae50315fa05598e83699b87e797c88a57858962e.zip |
Added a default implementation of the OSystem CD API (which simply does nothing)
svn-id: r22370
-rwxr-xr-x | backends/PalmOS/Src/be_base.h | 6 | ||||
-rw-r--r-- | backends/gp32/gp32_osys.cpp | 22 | ||||
-rw-r--r-- | backends/gp32/gp32_osys.h | 7 | ||||
-rw-r--r-- | backends/null/null.cpp | 22 | ||||
-rw-r--r-- | backends/ps2/systemps2.cpp | 17 | ||||
-rw-r--r-- | backends/ps2/systemps2.h | 6 | ||||
-rw-r--r-- | backends/psp/osys_psp.cpp | 17 | ||||
-rw-r--r-- | backends/psp/osys_psp.h | 7 | ||||
-rw-r--r-- | backends/x11/x11.cpp | 17 | ||||
-rw-r--r-- | backends/x11/x11.h | 16 | ||||
-rw-r--r-- | common/system.cpp | 19 | ||||
-rw-r--r-- | common/system.h | 11 |
12 files changed, 25 insertions, 142 deletions
diff --git a/backends/PalmOS/Src/be_base.h b/backends/PalmOS/Src/be_base.h index ec12ee0401..f5cad4a903 100755 --- a/backends/PalmOS/Src/be_base.h +++ b/backends/PalmOS/Src/be_base.h @@ -235,12 +235,6 @@ public: virtual void clearSoundCallback() = 0; int getOutputSampleRate() const { return _samplesPerSec; } - bool openCD(int drive) { return false;}; - bool pollCD() { return false;}; - void playCD(int track, int num_loops, int start_frame, int duration) {}; - void stopCD() {}; - void updateCD() {}; - void quit(); virtual void setWindowCaption(const char *caption) = 0; diff --git a/backends/gp32/gp32_osys.cpp b/backends/gp32/gp32_osys.cpp index d2e239361f..52dd1d32a5 100644 --- a/backends/gp32/gp32_osys.cpp +++ b/backends/gp32/gp32_osys.cpp @@ -712,28 +712,6 @@ int OSystem_GP32::getOutputSampleRate() const { return _samplesPerSec; } -bool OSystem_GP32::openCD(int drive) { - NP("OSys::openCD()"); - return true; -} - -bool OSystem_GP32::pollCD() { - NP("OSys::pollCD()"); - return true; -} - -void OSystem_GP32::playCD(int track, int num_loops, int start_frame, int duration) { - NP("OSys::playCD()"); -} - -void OSystem_GP32::stopCD() { - NP("OSys::stopCD()"); -} - -void OSystem_GP32::updateCD() { - NP("OSys::updateCD()"); -} - void OSystem_GP32::quit() { NP("OSys::quit()"); clearSoundCallback(); diff --git a/backends/gp32/gp32_osys.h b/backends/gp32/gp32_osys.h index 2f1eeaf566..4bb2bfb1f1 100644 --- a/backends/gp32/gp32_osys.h +++ b/backends/gp32/gp32_osys.h @@ -136,13 +136,6 @@ public: virtual void clearSoundCallback(); virtual int getOutputSampleRate() const; - virtual bool openCD(int drive); - virtual bool pollCD(); - - virtual void playCD(int track, int num_loops, int start_frame, int duration); - virtual void stopCD(); - virtual void updateCD(); - virtual void quit(); virtual void setWindowCaption(const char *caption); diff --git a/backends/null/null.cpp b/backends/null/null.cpp index e4d7a7a2b1..fdc275178a 100644 --- a/backends/null/null.cpp +++ b/backends/null/null.cpp @@ -295,28 +295,6 @@ int OSystem_NULL::getOutputSampleRate() const return 22050; } -bool OSystem_NULL::openCD(int drive) -{ - return false; -} - -bool OSystem_NULL::pollCD() -{ - return false; -} - -void OSystem_NULL::playCD(int track, int num_loops, int start_frame, int duration) -{ -} - -void OSystem_NULL::stopCD() -{ -} - -void OSystem_NULL::updateCD() -{ -} - void OSystem_NULL::quit() { } diff --git a/backends/ps2/systemps2.cpp b/backends/ps2/systemps2.cpp index 2279a4bed6..320ad78b8f 100644 --- a/backends/ps2/systemps2.cpp +++ b/backends/ps2/systemps2.cpp @@ -614,23 +614,6 @@ void OSystem_PS2::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, _screen->setMouseOverlay(buf, w, h, hotspot_x, hotspot_y, keycolor); } -bool OSystem_PS2::openCD(int drive) { - return false; -} - -bool OSystem_PS2::pollCD(void) { - return false; -} - -void OSystem_PS2::playCD(int track, int num_loops, int start_frame, int duration) { -} - -void OSystem_PS2::stopCD(void) { -} - -void OSystem_PS2::updateCD(void) { -} - void OSystem_PS2::showOverlay(void) { _screen->showOverlay(); } diff --git a/backends/ps2/systemps2.h b/backends/ps2/systemps2.h index 973a1e61be..a77ea7a31a 100644 --- a/backends/ps2/systemps2.h +++ b/backends/ps2/systemps2.h @@ -76,12 +76,6 @@ public: virtual void clearSoundCallback(); virtual int getOutputSampleRate(void) const; - virtual bool openCD(int drive); - virtual bool pollCD(); - virtual void playCD(int track, int num_loops, int start_frame, int duration); - virtual void stopCD(); - virtual void updateCD(); - virtual MutexRef createMutex(void); virtual void lockMutex(MutexRef mutex); virtual void unlockMutex(MutexRef mutex); diff --git a/backends/psp/osys_psp.cpp b/backends/psp/osys_psp.cpp index a873d32473..2cb4431994 100644 --- a/backends/psp/osys_psp.cpp +++ b/backends/psp/osys_psp.cpp @@ -606,23 +606,6 @@ int OSystem_PSP::getOutputSampleRate() const { return _samplesPerSec; } -bool OSystem_PSP::openCD(int drive) { - return false; -} - -bool OSystem_PSP::pollCD() { - return false; -} - -void OSystem_PSP::playCD(int track, int num_loops, int start_frame, int duration) { -} - -void OSystem_PSP::stopCD() { -} - -void OSystem_PSP::updateCD() { -} - void OSystem_PSP::quit() { clearSoundCallback(); SDL_Quit(); diff --git a/backends/psp/osys_psp.h b/backends/psp/osys_psp.h index 8876e7335e..8131467b0b 100644 --- a/backends/psp/osys_psp.h +++ b/backends/psp/osys_psp.h @@ -121,13 +121,6 @@ public: virtual void clearSoundCallback(); virtual int getOutputSampleRate() const; - virtual bool openCD(int drive); - virtual bool pollCD(); - - virtual void playCD(int track, int num_loops, int start_frame, int duration); - virtual void stopCD(); - virtual void updateCD(); - virtual void quit(); virtual void setWindowCaption(const char *caption); diff --git a/backends/x11/x11.cpp b/backends/x11/x11.cpp index 1ceb20703b..e356bcc83d 100644 --- a/backends/x11/x11.cpp +++ b/backends/x11/x11.cpp @@ -743,23 +743,6 @@ int OSystem_X11::getOutputSampleRate() const { return SAMPLES_PER_SEC; } -bool OSystem_X11::openCD(int drive) { - return false; -} - -bool OSystem_X11::pollCD() { - return false; -} - -void OSystem_X11::playCD(int track, int num_loops, int start_frame, int duration) { -} - -void OSystem_X11::stopCD() { -} - -void OSystem_X11::updateCD() { -} - void OSystem_X11::delayMillis(uint msecs) { usleep(msecs * 1000); } diff --git a/backends/x11/x11.h b/backends/x11/x11.h index a67caee172..36085ccc00 100644 --- a/backends/x11/x11.h +++ b/backends/x11/x11.h @@ -98,22 +98,6 @@ public: // callback will be played using this rate. int getOutputSampleRate() const; - // Initialise the specified CD drive for audio playback. - bool openCD(int drive); - - // Poll cdrom status - // Returns true if cd audio is playing - bool pollCD(); - - // Play cdrom audio track - void playCD(int track, int num_loops, int start_frame, int duration); - - // Stop cdrom audio track - void stopCD(); - - // Update cdrom audio status - void updateCD(); - // Quit void quit(); diff --git a/common/system.cpp b/common/system.cpp index 8b40114630..4207b1f64f 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -64,3 +64,22 @@ void OSystem::displayMessageOnOSD(const char *msg) { Common::SaveFileManager *OSystem::getSavefileManager() { return new Common::DefaultSaveFileManager(); } + + +bool OSystem::openCD(int drive) { + return false; +} + +bool OSystem::pollCD() { + return false; +} + +void OSystem::playCD(int track, int num_loops, int start_frame, int duration) { +} + +void OSystem::stopCD() { +} + +void OSystem::updateCD() { +} + diff --git a/common/system.h b/common/system.h index 415f642449..99a0d112fd 100644 --- a/common/system.h +++ b/common/system.h @@ -859,6 +859,7 @@ public: /** * @name Audio CD * The methods in this group deal with Audio CD playback. + * The default implementation simply does nothing. */ //@{ @@ -866,13 +867,13 @@ public: * Initialise the specified CD drive for audio playback. * @return true if the CD drive was inited succesfully */ - virtual bool openCD(int drive) = 0; + virtual bool openCD(int drive); /** * Poll CD status. * @return true if CD audio is playing */ - virtual bool pollCD() = 0; + virtual bool pollCD(); /** * Start audio CD playback. @@ -881,17 +882,17 @@ public: * @param start_frame the frame at which playback should start (75 frames = 1 second). * @param duration the number of frames to play. */ - virtual void playCD(int track, int num_loops, int start_frame, int duration) = 0; + virtual void playCD(int track, int num_loops, int start_frame, int duration); /** * Stop audio CD playback. */ - virtual void stopCD() = 0; + virtual void stopCD(); /** * Update cdrom audio status. */ - virtual void updateCD() = 0; + virtual void updateCD(); //@} |