aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-06-29 17:58:02 +0200
committerTakashi Iwai <tiwai@suse.de>2007-06-29 17:58:02 +0200
commit3b6ee45de5e2e0cb0bac8e00c9cdb95540ade0ce (patch)
treeaa5b78c2f382a32f59d09aae83c08ed515b72923
parentc7f54f4c2dfed3665d308c33ea74b816f1214c4f (diff)
downloadsalsa-lib-3b6ee45de5e2e0cb0bac8e00c9cdb95540ade0ce.tar.gz
Fix the check of stop_threshold in snd_pcm_avail_update()
Removed unused fields (of snd_pcm_sw_params_t) in snd_pcm_t, too.
-rw-r--r--src/pcm.c2
-rw-r--r--src/pcm_macros.h10
2 files changed, 1 insertions, 11 deletions
diff --git a/src/pcm.c b/src/pcm.c
index a40fecc..b61fe21 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -923,7 +923,7 @@ snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t *pcm)
avail = snd_pcm_mmap_avail(pcm);
switch (snd_pcm_state(pcm)) {
case SNDRV_PCM_STATE_RUNNING:
- if (avail >= pcm->stop_threshold) {
+ if (avail >= pcm->sw_params.stop_threshold) {
if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_XRUN) < 0)
return -errno;
/* everything is ok,
diff --git a/src/pcm_macros.h b/src/pcm_macros.h
index b64f4b3..8c343bd 100644
--- a/src/pcm_macros.h
+++ b/src/pcm_macros.h
@@ -45,16 +45,6 @@ struct _snd_pcm {
unsigned int period_time; /* period duration */
snd_interval_t periods;
unsigned int tick_time;
- snd_pcm_tstamp_t tstamp_mode; /* timestamp mode */
- unsigned int period_step;
- unsigned int sleep_min;
- snd_pcm_uframes_t avail_min; /* min avail frames for wakeup */
- snd_pcm_uframes_t start_threshold;
- snd_pcm_uframes_t stop_threshold;
- snd_pcm_uframes_t silence_threshold; /* Silence filling happens when
- noise is nearest than this */
- snd_pcm_uframes_t silence_size; /* Silence filling size */
- snd_pcm_uframes_t xfer_align; /* xfer size need to be a multiple */
snd_pcm_uframes_t boundary; /* pointers wrap point */
unsigned int info; /* Info for returned setup */
unsigned int msbits; /* used most significant bits */