summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-04-10 17:39:24 +0000
committerLennart Poettering <lennart@poettering.net>2006-04-10 17:39:24 +0000
commit137f0a7140271b1151b1d97e1863d237e8458316 (patch)
treee0d086c6f6c48c1b8ff53e49942cfb56197c6ef4
parent190a8691326513d8d6e407b3fdded842f8661a52 (diff)
* implement PA_STREAM_AUTO_TIMING_UPDATE
* accept PA_STREAM_NOT_MONOTONOUS properly git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@673 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/polyp/stream.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/polyp/stream.c b/src/polyp/stream.c
index 4a98dd60..0fcc36b7 100644
--- a/src/polyp/stream.c
+++ b/src/polyp/stream.c
@@ -372,7 +372,7 @@ void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED
pa_stream_ref(s);
if (s->direction != PA_STREAM_UPLOAD &&
- s->flags & PA_STREAM_INTERPOLATE_TIMING) {
+ s->flags & PA_STREAM_AUTO_TIMING_UPDATE) {
struct timeval tv;
pa_gettimeofday(&tv);
@@ -407,7 +407,11 @@ static int create_stream(
assert(s->ref >= 1);
PA_CHECK_VALIDITY(s->context, s->state == PA_STREAM_UNCONNECTED, PA_ERR_BADSTATE);
- PA_CHECK_VALIDITY(s->context, !(flags & ~(PA_STREAM_START_CORKED|PA_STREAM_INTERPOLATE_TIMING)), PA_ERR_INVALID);
+ PA_CHECK_VALIDITY(s->context, !(flags & ~((direction != PA_STREAM_UPLOAD ?
+ PA_STREAM_START_CORKED|
+ PA_STREAM_INTERPOLATE_TIMING|
+ PA_STREAM_NOT_MONOTONOUS|
+ PA_STREAM_AUTO_TIMING_UPDATE : 0))), PA_ERR_INVALID);
PA_CHECK_VALIDITY(s->context, direction == PA_STREAM_PLAYBACK || flags == 0, PA_ERR_INVALID);
PA_CHECK_VALIDITY(s->context, !volume || volume->channels == s->sample_spec.channels, PA_ERR_INVALID);
PA_CHECK_VALIDITY(s->context, !sync_stream || (direction == PA_STREAM_PLAYBACK && sync_stream->direction == PA_STREAM_PLAYBACK), PA_ERR_INVALID);
@@ -621,7 +625,7 @@ size_t pa_stream_writable_size(pa_stream *s) {
assert(s->ref >= 1);
PA_CHECK_VALIDITY_RETURN_ANY(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE, (size_t) -1);
- PA_CHECK_VALIDITY_RETURN_ANY(s->context, s->direction == PA_STREAM_PLAYBACK, PA_ERR_BADSTATE, (size_t) -1);
+ PA_CHECK_VALIDITY_RETURN_ANY(s->context, s->direction != PA_STREAM_RECORD, PA_ERR_BADSTATE, (size_t) -1);
return s->requested_bytes;
}
@@ -952,7 +956,7 @@ pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, voi
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction != PA_STREAM_UPLOAD, PA_ERR_BADSTATE);
- if (s->flags & PA_STREAM_INTERPOLATE_TIMING) {
+ if (s->flags & PA_STREAM_AUTO_TIMING_UPDATE) {
if (!s->corked && b) {
/* Refresh the interpolated data just befor pausing */
pa_stream_get_time(s, NULL);