зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1823780
- Update libcubeb to 2071354a. r=cubeb-reviewers,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D173210
This commit is contained in:
Родитель
ba7df02af3
Коммит
43b5f9420c
|
@ -9,8 +9,8 @@ origin:
|
|||
description: "Cross platform audio library"
|
||||
url: https://github.com/mozilla/cubeb
|
||||
license: ISC
|
||||
release: 70b4e3db7822de4d534959885cda109d6edbee36 (2023-02-01T14:54:51Z).
|
||||
revision: 70b4e3db7822de4d534959885cda109d6edbee36
|
||||
release: 2071354a69aca7ed6df3b4222e305746c2113f60 (2023-03-21T20:02:06Z).
|
||||
revision: 2071354a69aca7ed6df3b4222e305746c2113f60
|
||||
|
||||
vendoring:
|
||||
url: https://github.com/mozilla/cubeb
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
#undef NDEBUG
|
||||
#define _DEFAULT_SOURCE
|
||||
#define _BSD_SOURCE
|
||||
#if defined(__NetBSD__)
|
||||
#define _NETBSD_SOURCE /* timersub() */
|
||||
#endif
|
||||
#define _XOPEN_SOURCE 500
|
||||
#include "cubeb-internal.h"
|
||||
#include "cubeb/cubeb.h"
|
||||
|
|
|
@ -1655,6 +1655,16 @@ opensl_stream_destroy(cubeb_stream * stm)
|
|||
{
|
||||
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) {
|
||||
(*stm->playerObj)->Destroy(stm->playerObj);
|
||||
stm->playerObj = NULL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче