mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 21:36:26 +00:00
(rsound.c) Update rsound
This commit is contained in:
parent
a8c9cd91d8
commit
d7e0a9005b
@ -55,7 +55,9 @@ static void err_cb(void *userdata)
|
||||
scond_signal(rsd->cond);
|
||||
}
|
||||
|
||||
static void *rs_init(const char *device, unsigned rate, unsigned latency, unsigned *new_rate)
|
||||
static void *rs_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
int channels, format;
|
||||
rsound_t *rd = NULL;
|
||||
@ -64,10 +66,7 @@ static void *rs_init(const char *device, unsigned rate, unsigned latency, unsign
|
||||
return NULL;
|
||||
|
||||
if (rsd_init(&rd) < 0)
|
||||
{
|
||||
free(rsd);
|
||||
return NULL;
|
||||
}
|
||||
goto error;
|
||||
|
||||
rsd->cond_lock = slock_new();
|
||||
rsd->cond = scond_new();
|
||||
@ -91,12 +90,15 @@ static void *rs_init(const char *device, unsigned rate, unsigned latency, unsign
|
||||
if (rsd_start(rd) < 0)
|
||||
{
|
||||
free(rsd);
|
||||
rsd_free(rd);
|
||||
return NULL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
rsd->rd = rd;
|
||||
return rsd;
|
||||
|
||||
error:
|
||||
rsd_free(rd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static ssize_t rs_write(void *data, const void *buf, size_t size)
|
||||
|
Loading…
x
Reference in New Issue
Block a user