diff options
author | Taylor Holberton <taylorcholberton@gmail.com> | 2018-04-10 06:21:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-10 06:21:41 -0400 |
commit | ab216f5225024cfeb3558a89a94bc15465046095 (patch) | |
tree | 6d225b3c6df0aed77c94354181d7f1befebce166 /src | |
parent | b038ae7a5bb0c6744c6732ea6c3575adb0904220 (diff) | |
parent | f6fe5233ad4ad11f4a7eff3da6a9de9396a6ad98 (diff) |
Merge pull request #111 from mgaio/topic/fix-pcm_readi
Fix pcm_writei return value if pcm is in not running state.
Diffstat (limited to 'src')
-rw-r--r-- | src/pcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -695,7 +695,7 @@ int pcm_writei(struct pcm *pcm, const void *data, unsigned int frame_count) if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_WRITEI_FRAMES, &x)) return oops(pcm, errno, "cannot write initial data"); pcm->running = 1; - return 0; + return x.result; } if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_WRITEI_FRAMES, &x)) { pcm->prepared = 0; |