From 68c6add8ccd9aa32eb799a433aa8a3b05ec84a57 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 5 Jul 2007 12:23:54 +0000 Subject: (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model. --- src/music/os2_m.h | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/music/os2_m.h') diff --git a/src/music/os2_m.h b/src/music/os2_m.h index fef15b91f..b0f4d71ce 100644 --- a/src/music/os2_m.h +++ b/src/music/os2_m.h @@ -3,8 +3,30 @@ #ifndef MUSIC_OS2_H #define MUSIC_OS2_H -#include "../hal.h" +#include "music_driver.hpp" -extern const HalMusicDriver _os2_music_driver; +class MusicDriver_OS2: public MusicDriver { +public: + /* virtual */ bool CanProbe() { return true; } + + /* virtual */ const char *Start(const char * const *param); + + /* virtual */ void Stop(); + + /* virtual */ void PlaySong(const char *filename); + + /* virtual */ void StopSong(); + + /* virtual */ bool IsSongPlaying(); + + /* virtual */ void SetVolume(byte vol); +}; + +class FMusicDriver_OS2: public MusicDriverFactory { +public: + /* virtual */ const char *GetName() { return "os2"; } + /* virtual */ const char *GetDescription() { return "OS/2 Music Driver"; } + /* virtual */ Driver *CreateInstance() { return new MusicDriver_OS2(); } +}; #endif /* MUSIC_OS2_H */ -- cgit v1.2.3-70-g09d2