forked from mirrors/gecko-dev
Bug 1823780 - Update libcubeb to 2071354a. r=cubeb-reviewers,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D173210
This commit is contained in:
parent
ba7df02af3
commit
43b5f9420c
3 changed files with 15 additions and 2 deletions
|
|
@ -9,8 +9,8 @@ origin:
|
||||||
description: "Cross platform audio library"
|
description: "Cross platform audio library"
|
||||||
url: https://github.com/mozilla/cubeb
|
url: https://github.com/mozilla/cubeb
|
||||||
license: ISC
|
license: ISC
|
||||||
release: 70b4e3db7822de4d534959885cda109d6edbee36 (2023-02-01T14:54:51Z).
|
release: 2071354a69aca7ed6df3b4222e305746c2113f60 (2023-03-21T20:02:06Z).
|
||||||
revision: 70b4e3db7822de4d534959885cda109d6edbee36
|
revision: 2071354a69aca7ed6df3b4222e305746c2113f60
|
||||||
|
|
||||||
vendoring:
|
vendoring:
|
||||||
url: https://github.com/mozilla/cubeb
|
url: https://github.com/mozilla/cubeb
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@
|
||||||
#undef NDEBUG
|
#undef NDEBUG
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#define _BSD_SOURCE
|
#define _BSD_SOURCE
|
||||||
|
#if defined(__NetBSD__)
|
||||||
|
#define _NETBSD_SOURCE /* timersub() */
|
||||||
|
#endif
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 500
|
||||||
#include "cubeb-internal.h"
|
#include "cubeb-internal.h"
|
||||||
#include "cubeb/cubeb.h"
|
#include "cubeb/cubeb.h"
|
||||||
|
|
|
||||||
|
|
@ -1655,6 +1655,16 @@ opensl_stream_destroy(cubeb_stream * stm)
|
||||||
{
|
{
|
||||||
assert(stm->draining || stm->shutdown);
|
assert(stm->draining || stm->shutdown);
|
||||||
|
|
||||||
|
// If we're still draining at stream destroy time, pause the streams now so we
|
||||||
|
// can destroy them safely.
|
||||||
|
if (stm->draining) {
|
||||||
|
opensl_stream_stop(stm);
|
||||||
|
}
|
||||||
|
// Sleep for 10ms to give active streams time to pause so that no further
|
||||||
|
// buffer callbacks occur. Inspired by the same workaround (sleepBeforeClose)
|
||||||
|
// in liboboe.
|
||||||
|
usleep(10 * 1000);
|
||||||
|
|
||||||
if (stm->playerObj) {
|
if (stm->playerObj) {
|
||||||
(*stm->playerObj)->Destroy(stm->playerObj);
|
(*stm->playerObj)->Destroy(stm->playerObj);
|
||||||
stm->playerObj = NULL;
|
stm->playerObj = NULL;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue