Changeset - r3721:bc7989173f88
[Not reviewed]
master
0 1 0
peter1138 - 18 years ago 2006-05-02 19:09:49
peter1138@openttd.org
(svn r4692) - Use DEBUG() instead of direct fprintf in extmidi music driver, and silence 'set volume not implemented' warning at the default debug level.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
music/extmidi.c
Show inline comments
 
@@ -3,12 +3,13 @@
 
#ifndef __MORPHOS__
 
#include "../stdafx.h"
 
#include "../openttd.h"
 
#include "../sound.h"
 
#include "../string.h"
 
#include "../variables.h"
 
#include "../debug.h"
 
#include "extmidi.h"
 
#include <fcntl.h>
 
#include <sys/types.h>
 
#include <sys/wait.h>
 
#include <unistd.h>
 
#include <signal.h>
 
@@ -55,13 +56,13 @@ static bool ExtMidiIsPlaying(void)
 
	if (_midi.pid == -1 && _midi.song[0] != '\0') DoPlay();
 
	return _midi.pid != -1;
 
}
 

	
 
static void ExtMidiSetVolume(byte vol)
 
{
 
	fprintf(stderr, "extmidi: set volume not implemented\n");
 
	DEBUG(driver, 1) ("extmidi: set volume not implemented");
 
}
 

	
 
static void DoPlay(void)
 
{
 
	_midi.pid = fork();
 
	switch (_midi.pid) {
 
@@ -78,13 +79,13 @@ static void DoPlay(void)
 
				#endif
 
			}
 
			_exit(1);
 
		}
 

	
 
		case -1:
 
			fprintf(stderr, "extmidi: couldn't fork: %s\n", strerror(errno));
 
			DEBUG(driver, 0) ("extmidi: couldn't fork: %s", strerror(errno));
 
			/* FALLTHROUGH */
 

	
 
		default:
 
			_midi.song[0] = '\0';
 
			break;
 
	}
0 comments (0 inline, 0 general)