Changeset - r5389:c57022721d23
[Not reviewed]
master
0 1 0
bjarni - 18 years ago 2006-12-27 14:34:09
bjarni@openttd.org
(svn r7578) -Fix r7577: fixed typo
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
music/qtmidi.c
Show inline comments
 
@@ -154,49 +154,49 @@ static bool LoadMovieForMIDIFile(const c
 

	
 
/**
 
 * Flag which has the @c true value when QuickTime is available and
 
 * initialized.
 
 */
 
static bool _quicktime_started = false;
 

	
 

	
 
/**
 
 * Initialize QuickTime if needed. This function sets the
 
 * #_quicktime_started flag to @c true if QuickTime is present in the system
 
 * and it was initialized properly.
 
 */
 
static void InitQuickTimeIfNeeded(void)
 
{
 
	OSStatus dummy;
 

	
 
	if (_quicktime_started) return;
 

	
 
	DEBUG(driver, 2, "qtmidi: initializing Quicktime");
 
	/* Be polite: check wether QuickTime is available and initialize it. */
 
	_quicktime_started =
 
		(noErr == Gestalt(gestaltQuickTime, &dummy)) &&
 
		(noErr == EnterMovies());
 
	if (!_quicktime_started) DEBUG(driver, 0, "qtmidi: Quicktime initialization failed!);
 
	if (!_quicktime_started) DEBUG(driver, 0, "qtmidi: Quicktime initialization failed!");
 
}
 

	
 

	
 
/** Possible states of the QuickTime music driver. */
 
enum {
 
	QT_STATE_IDLE, /**< No file loaded. */
 
	QT_STATE_PLAY, /**< File loaded, playing. */
 
	QT_STATE_STOP, /**< File loaded, stopped. */
 
};
 

	
 

	
 
static Movie _quicktime_movie;                  /**< Current QuickTime @c Movie. */
 
static byte  _quicktime_volume = 127;           /**< Current volume. */
 
static int   _quicktime_state  = QT_STATE_IDLE; /**< Current player state. */
 

	
 

	
 
/**
 
 * Maps OpenTTD volume to QuickTime notion of volume.
 
 */
 
#define VOLUME  ((short)((0x00FF & _quicktime_volume) << 1))
 

	
 

	
 
static void StopSong(void);
 

	
0 comments (0 inline, 0 general)