mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
add missed checks to i_winmusc and i_flmusic
This commit is contained in:
parent
2d296deeb0
commit
af60bcad49
@ -222,6 +222,13 @@ static boolean I_FL_InitMusic(int device)
|
|||||||
|
|
||||||
synth = new_fluid_synth(settings);
|
synth = new_fluid_synth(settings);
|
||||||
|
|
||||||
|
if (synth == NULL)
|
||||||
|
{
|
||||||
|
fprintf(stderr,
|
||||||
|
"I_FL_InitMusic: FluidSynth failed to initialize synth.\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
lumpnum = W_CheckNumForName("SNDFONT");
|
lumpnum = W_CheckNumForName("SNDFONT");
|
||||||
if (lumpnum >= 0)
|
if (lumpnum >= 0)
|
||||||
{
|
{
|
||||||
@ -337,6 +344,13 @@ static void *I_FL_RegisterSong(void *data, int len)
|
|||||||
|
|
||||||
player = new_fluid_player(synth);
|
player = new_fluid_player(synth);
|
||||||
|
|
||||||
|
if (player == NULL)
|
||||||
|
{
|
||||||
|
fprintf(stderr,
|
||||||
|
"I_FL_InitMusic: FluidSynth failed to initialize player.\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (IsMid(data, len))
|
if (IsMid(data, len))
|
||||||
{
|
{
|
||||||
result = fluid_player_add_mem(player, data, len);
|
result = fluid_player_add_mem(player, data, len);
|
||||||
|
@ -1432,6 +1432,7 @@ static boolean I_WIN_InitMusic(int device)
|
|||||||
if (mmr != MMSYSERR_NOERROR)
|
if (mmr != MMSYSERR_NOERROR)
|
||||||
{
|
{
|
||||||
MidiError("midiStreamOpen", mmr);
|
MidiError("midiStreamOpen", mmr);
|
||||||
|
hMidiStream = NULL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user