diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-09-26 17:02:26 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-09-26 17:02:26 +0000 |
commit | 5bac3c3ce515cb588f3928431db4fe1c396d53e7 (patch) | |
tree | 7ec714219121bee11db5f7f497879e805ea30926 /polyp/source-output.c | |
parent | 405fac5ea7070fa7b50a77952fa8042f87f588a8 (diff) |
bum version number
add new macro PA_API_VERSION for preprocessor level conditional compiling
add new native APIs:
- counter
- cork & flush for record streams
- add flags parameters to pa_stream_connect_xx()
- new prebuf command
- time api, and total latency calculator
- return sample spec
ability to cork source output streams
dump server status on SIGHUP to syslog
show sink input/source outputs status in cli-text.c
don't flush esound output buffer when client disconnects
move version api to polyplib-version.h
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@240 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/source-output.c')
-rw-r--r-- | polyp/source-output.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/polyp/source-output.c b/polyp/source-output.c index 13b39658..5a40fa42 100644 --- a/polyp/source-output.c +++ b/polyp/source-output.c @@ -79,7 +79,7 @@ struct pa_source_output* pa_source_output_new(struct pa_source *s, const char *n } void pa_source_output_disconnect(struct pa_source_output*o) { - assert(o && o->state == PA_SOURCE_OUTPUT_RUNNING && o->source && o->source->core); + assert(o && o->state != PA_SOURCE_OUTPUT_DISCONNECTED && o->source && o->source->core); pa_idxset_remove_by_data(o->source->core->source_outputs, o, NULL); pa_idxset_remove_by_data(o->source->outputs, o, NULL); @@ -133,6 +133,9 @@ void pa_source_output_push(struct pa_source_output *o, const struct pa_memchunk struct pa_memchunk rchunk; assert(o && chunk && chunk->length && o->push); + if (o->state == PA_SOURCE_OUTPUT_CORKED) + return; + if (!o->resampler) { o->push(o, chunk); return; @@ -163,3 +166,12 @@ pa_usec_t pa_source_output_get_latency(struct pa_source_output *o) { return 0; } + +void pa_source_output_cork(struct pa_source_output *o, int b) { + assert(o && o->ref >= 1); + + if (o->state == PA_SOURCE_OUTPUT_DISCONNECTED) + return; + + o->state = b ? PA_SOURCE_OUTPUT_CORKED : PA_SOURCE_OUTPUT_RUNNING; +} |