Update libcubeb to pick up bug 895378 (r=kinetik) and bug 889652 (r=kinetik)

This commit is contained in:
Michael Wu 2013-07-19 21:16:41 -04:00
Родитель 841f54b252
Коммит a90a7c5677
3 изменённых файлов: 17 добавлений и 4 удалений

Просмотреть файл

@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
The git commit ID used was 3246b37960ac519aaea505bab0060c7484746f35.
The git commit ID used was f82d1c2c269c452ac4052da404c6b0a42aff3c66.

Просмотреть файл

@ -13,6 +13,10 @@
#include "cubeb/cubeb.h"
#include "cubeb-internal.h"
#ifdef DISABLE_LIBPULSE_DLOPEN
#define WRAP(x) x
#else
#define WRAP(x) cubeb_##x
#define MAKE_TYPEDEF(x) static typeof(x) * cubeb_##x
MAKE_TYPEDEF(pa_channel_map_init_auto);
MAKE_TYPEDEF(pa_context_connect);
@ -55,7 +59,7 @@ MAKE_TYPEDEF(pa_threaded_mainloop_unlock);
MAKE_TYPEDEF(pa_threaded_mainloop_wait);
MAKE_TYPEDEF(pa_usec_to_bytes);
#undef MAKE_TYPEDEF
#define WRAP(x) cubeb_##x
#endif
static struct cubeb_ops const pulse_ops;
@ -270,11 +274,12 @@ static void pulse_destroy(cubeb * ctx);
/*static*/ int
pulse_init(cubeb ** context, char const * context_name)
{
void * libpulse;
void * libpulse = NULL;
cubeb * ctx;
*context = NULL;
#ifndef DISABLE_LIBPULSE_DLOPEN
libpulse = dlopen("libpulse.so.0", RTLD_LAZY);
if (!libpulse) {
return CUBEB_ERROR;
@ -328,6 +333,7 @@ pulse_init(cubeb ** context, char const * context_name)
LOAD(pa_threaded_mainloop_wait);
LOAD(pa_usec_to_bytes);
#undef LOAD
#endif
ctx = calloc(1, sizeof(*ctx));
assert(ctx);
@ -400,7 +406,9 @@ pulse_destroy(cubeb * ctx)
WRAP(pa_threaded_mainloop_free)(ctx->mainloop);
}
dlclose(ctx->libpulse);
if (ctx->libpulse) {
dlclose(ctx->libpulse);
}
if (ctx->default_sink_info) {
free(ctx->default_sink_info);
}

Просмотреть файл

@ -289,6 +289,11 @@ wasapi_stream_render_loop(LPVOID stream)
switch (waitResult) {
case WAIT_OBJECT_0: { /* shutdown */
is_playing = false;
/* We don't check if the drain is actually finished here, we just want to
* shutdown. */
if (stm->draining) {
stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_DRAINED);
}
continue;
}
case WAIT_OBJECT_0 + 1: { /* refill */