diff options
| author | Lennart Poettering <lennart@poettering.net> | 2008-05-27 22:34:01 +0000 | 
|---|---|---|
| committer | Lennart Poettering <lennart@poettering.net> | 2008-05-27 22:34:01 +0000 | 
| commit | 5e7628b873a2b34eee43598a2f3ee4363081dc11 (patch) | |
| tree | 108e879e3c4f85131814bf0e374e4dde75fa9b07 | |
| parent | 3a8cef5beec2ac987eb71acf17dd0c128844ad67 (diff) | |
we don't support volatile cacheing in PA; always keep outstanding record around
git-svn-id: file:///home/lennart/svn/public/libcanberra/trunk@32 01b60673-d06a-42c0-afdd-89cb8e0f78ac
| -rw-r--r-- | src/pulse.c | 12 | 
1 files changed, 5 insertions, 7 deletions
diff --git a/src/pulse.c b/src/pulse.c index 9837e53..de1c3cd 100644 --- a/src/pulse.c +++ b/src/pulse.c @@ -550,7 +550,6 @@ static void stream_write_cb(pa_stream *s, size_t bytes, void *userdata) {          }          bytes -= rbytes; -        fprintf(stderr, "writing %lu bytes\n", (unsigned long) rbytes);      }      if (ca_sound_file_get_size(out->file) <= 0) { @@ -680,9 +679,8 @@ int driver_play(ca_context *c, uint32_t id, ca_proplist *proplist, ca_finish_cal      strip_canberra_data(l); -    if (cb) -        if ((ret = subscribe(c)) < 0) -            goto finish; +    if ((ret = subscribe(c)) < 0) +        goto finish;      for (;;) {          pa_threaded_mainloop_lock(p->mainloop); @@ -706,7 +704,7 @@ int driver_play(ca_context *c, uint32_t id, ca_proplist *proplist, ca_finish_cal              goto finish;          /* Hmm, we need to play it directly */ -        if (cache_control == CA_CACHE_CONTROL_NEVER) +        if (cache_control != CA_CACHE_CONTROL_PERMANENT)              break;          /* Don't loop forever */ @@ -781,7 +779,7 @@ int driver_play(ca_context *c, uint32_t id, ca_proplist *proplist, ca_finish_cal  finish:      /* We keep the outstanding struct around if we need clean up later to */ -    if (ret == CA_SUCCESS && (out->type == OUTSTANDING_STREAM || cb)) { +    if (ret == CA_SUCCESS) {          out->clean_up = TRUE;          ca_mutex_lock(p->outstanding_mutex); @@ -901,7 +899,7 @@ int driver_cache(ca_context *c, ca_proplist *proplist) {              goto finish;          } -    if (ct == CA_CACHE_CONTROL_NEVER) { +    if (cache_control != CA_CACHE_CONTROL_PERMANENT) {          ret = CA_ERROR_INVALID;          goto finish;      }  | 
