mirror of
https://github.com/libretro/RetroArch
synced 2025-03-22 07:21:15 +00:00
Get rid of some extraneous elses
This commit is contained in:
parent
5c2006c072
commit
cec2afe6cb
@ -175,13 +175,10 @@ static ssize_t alsa_write(void *data, const void *buf_, size_t size_)
|
|||||||
eagain_retry = false;
|
eagain_retry = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return written;
|
return written;
|
||||||
}
|
}
|
||||||
else if (frames == -EAGAIN) // Expected if we're running nonblock.
|
else if (frames == -EAGAIN) // Expected if we're running nonblock.
|
||||||
{
|
|
||||||
return written;
|
return written;
|
||||||
}
|
|
||||||
else if (frames < 0)
|
else if (frames < 0)
|
||||||
{
|
{
|
||||||
RARCH_ERR("[ALSA]: Unknown error occured (%s).\n", snd_strerror(frames));
|
RARCH_ERR("[ALSA]: Unknown error occured (%s).\n", snd_strerror(frames));
|
||||||
@ -199,6 +196,7 @@ static ssize_t alsa_write(void *data, const void *buf_, size_t size_)
|
|||||||
static bool alsa_stop(void *data)
|
static bool alsa_stop(void *data)
|
||||||
{
|
{
|
||||||
alsa_t *alsa = (alsa_t*)data;
|
alsa_t *alsa = (alsa_t*)data;
|
||||||
|
|
||||||
if (alsa->can_pause && !alsa->is_paused)
|
if (alsa->can_pause && !alsa->is_paused)
|
||||||
{
|
{
|
||||||
if (snd_pcm_pause(alsa->pcm, 1) == 0)
|
if (snd_pcm_pause(alsa->pcm, 1) == 0)
|
||||||
@ -206,10 +204,9 @@ static bool alsa_stop(void *data)
|
|||||||
alsa->is_paused = true;
|
alsa->is_paused = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +233,6 @@ static bool alsa_start(void *data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,10 +267,9 @@ static bool alsa_qsa_stop(void *data)
|
|||||||
alsa->is_paused = true;
|
alsa->is_paused = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,9 +307,8 @@ static bool alsa_qsa_start(void *data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return true;
|
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool alsa_qsa_use_float(void *data)
|
static bool alsa_qsa_use_float(void *data)
|
||||||
|
@ -27,11 +27,11 @@ struct fifo_buffer
|
|||||||
fifo_buffer_t *fifo_new(size_t size)
|
fifo_buffer_t *fifo_new(size_t size)
|
||||||
{
|
{
|
||||||
fifo_buffer_t *buf = (fifo_buffer_t*)calloc(1, sizeof(*buf));
|
fifo_buffer_t *buf = (fifo_buffer_t*)calloc(1, sizeof(*buf));
|
||||||
if (buf == NULL)
|
if (!buf)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
buf->buffer = (uint8_t*)calloc(1, size + 1);
|
buf->buffer = (uint8_t*)calloc(1, size + 1);
|
||||||
if (buf->buffer == NULL)
|
if (!buf->buffer)
|
||||||
{
|
{
|
||||||
free(buf);
|
free(buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user