This commit is contained in:
twinaphex 2018-05-02 20:51:52 +02:00
parent 44e935c64d
commit 68a2f18bfb
1 changed files with 11 additions and 8 deletions

View File

@ -1132,8 +1132,7 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
#endif #endif
break; break;
case AUDIO_MIXER_TYPE_NONE: case AUDIO_MIXER_TYPE_NONE:
free(buf); break;
return false;
} }
if (!handle) if (!handle)
@ -1142,12 +1141,16 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
return false; return false;
} }
if (params->state == AUDIO_STREAM_STATE_PLAYING) switch (params->state)
voice = audio_mixer_play(handle, looped, params->volume, stop_cb);
else if (params->state == AUDIO_STREAM_STATE_PLAYING_LOOPED)
{ {
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
looped = true; looped = true;
/* fall-through */
case AUDIO_STREAM_STATE_PLAYING:
voice = audio_mixer_play(handle, looped, params->volume, stop_cb); voice = audio_mixer_play(handle, looped, params->volume, stop_cb);
break;
default:
break;
} }
audio_mixer_active = true; audio_mixer_active = true;