summaryrefslogtreecommitdiff
path: root/src/driver.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-02-20 17:30:22 +0000
committerrubidium <rubidium@openttd.org>2010-02-20 17:30:22 +0000
commit9c6512ef9e24cace8e83a4df2e65b6d0f9ebffe3 (patch)
treeca902c2f28eb041bc978f04c3e31f73da585a8e9 /src/driver.h
parente905cb57d8200b363dbab5732e090b222d2fd34a (diff)
downloadopenttd-9c6512ef9e24cace8e83a4df2e65b6d0f9ebffe3.tar.xz
(svn r19168) -Fix: under some circumstances timidity (via extmidi) would not shut down properly causing all kinds of trouble (e.g. blocked audio output). Try harder to shut down timidity and first shut down the music so shut down order is the inverse of initialisation order. Based on a patch by Jindřich Makovička.
Diffstat (limited to 'src/driver.h')
-rw-r--r--src/driver.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/driver.h b/src/driver.h
index cf86051de..6b4ae7bc6 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -28,12 +28,13 @@ public:
virtual ~Driver() { }
+ /** The type of driver */
enum Type {
- DT_BEGIN = 0,
- DT_SOUND = 0,
- DT_MUSIC,
- DT_VIDEO,
- DT_END,
+ DT_BEGIN = 0, ///< Helper for iteration
+ DT_MUSIC = 0, ///< A music driver, needs to be before sound to properly shut down extmidi forked music players
+ DT_SOUND, ///< A sound driver
+ DT_VIDEO, ///< A video driver
+ DT_END, ///< Helper for iteration
};
virtual const char *GetName() const = 0;
@@ -64,7 +65,7 @@ private:
static const char *GetDriverTypeName(Driver::Type type)
{
- static const char * const driver_type_name[] = { "sound", "music", "video" };
+ static const char * const driver_type_name[] = { "music", "sound", "video" };
return driver_type_name[type];
}