output/wasapi: combine two if
statements to one switch
This commit is contained in:
parent
a2be91aea5
commit
2ac2bd26f8
@ -354,16 +354,23 @@ try {
|
|||||||
event.Wait();
|
event.Wait();
|
||||||
|
|
||||||
Status current_state = status.load();
|
Status current_state = status.load();
|
||||||
if (current_state == Status::FINISH) {
|
switch (current_state) {
|
||||||
|
case Status::FINISH:
|
||||||
FormatDebug(wasapi_output_domain,
|
FormatDebug(wasapi_output_domain,
|
||||||
"Working thread stopped");
|
"Working thread stopped");
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (!started && current_state != Status::PLAY)
|
case Status::PAUSE:
|
||||||
/* don't bother starting the IAudioClient if
|
if (!started)
|
||||||
we're paused */
|
/* don't bother starting the
|
||||||
continue;
|
IAudioClient if we're paused */
|
||||||
|
continue;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Status::PLAY:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
UINT32 write_in_frames = buffer_size_in_frames;
|
UINT32 write_in_frames = buffer_size_in_frames;
|
||||||
if (!is_exclusive) {
|
if (!is_exclusive) {
|
||||||
|
Loading…
Reference in New Issue
Block a user