diff options
-rw-r--r-- | src/pcm.c | 7 |
1 files changed, 0 insertions, 7 deletions
@@ -215,8 +215,6 @@ struct pcm { int fd; /** Flags that were passed to @ref pcm_open */ unsigned int flags; - /** Whether the PCM is running or not */ - int running:1; /** The number of underruns that have occured */ int underruns; /** Size of the buffer */ @@ -617,7 +615,6 @@ int pcm_writei(struct pcm *pcm, const void *data, unsigned int frame_count) x.result = 0; for (;;) { if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_WRITEI_FRAMES, &x)) { - pcm->running = 0; if (errno == EPIPE) { /* we failed to make our window -- try to restart if we are * allowed to do so. Otherwise, simply allow the EPIPE error to @@ -665,7 +662,6 @@ int pcm_readi(struct pcm *pcm, void *data, unsigned int frame_count) x.result = 0; for (;;) { if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_READI_FRAMES, &x)) { - pcm->running = 0; if (errno == EPIPE) { /* we failed to make our window -- try to restart */ pcm->underruns++; @@ -923,7 +919,6 @@ int pcm_close(struct pcm *pcm) if (pcm->fd >= 0) close(pcm->fd); - pcm->running = 0; pcm->buffer_size = 0; pcm->fd = -1; free(pcm); @@ -1128,7 +1123,6 @@ int pcm_start(struct pcm *pcm) return oops(pcm, errno, "cannot start channel"); } - pcm->running = 1; return 0; } @@ -1142,7 +1136,6 @@ int pcm_stop(struct pcm *pcm) if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_DROP) < 0) return oops(pcm, errno, "cannot stop channel"); - pcm->running = 0; return 0; } |