mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(tinyalsa) open with O_NONBLOCK
This commit is contained in:
parent
03ee897ae2
commit
7cda786906
@ -1780,7 +1780,7 @@ static struct pcm *pcm_open(unsigned int card, unsigned int device,
|
||||
flags & PCM_IN ? 'c' : 'p');
|
||||
|
||||
pcm->flags = flags;
|
||||
pcm->fd = open(fn, O_RDWR);
|
||||
pcm->fd = open(fn, O_RDWR|O_NONBLOCK);
|
||||
if (pcm->fd < 0)
|
||||
{
|
||||
RARCH_ERR("[TINYALSA]: cannot open device '%s'\n", fn);
|
||||
@ -2229,7 +2229,7 @@ tinyalsa_write(void *data, const void *buf_, size_t size_)
|
||||
snd_pcm_sframes_t frames = pcm_writei(tinyalsa->pcm, buf, size);
|
||||
|
||||
if (frames < 0)
|
||||
return -1;
|
||||
pcm_stop(tinyalsa->pcm);
|
||||
|
||||
written += frames;
|
||||
buf += (frames << 1) * frames_size;
|
||||
|
Loading…
x
Reference in New Issue
Block a user