summaryrefslogtreecommitdiffstats
path: root/dom/media/webaudio/blink/HRTFDatabaseLoader.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-09-23 23:45:46 +0000
committerMoonchild <moonchild@palemoon.org>2020-09-23 23:45:46 +0000
commit9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f (patch)
tree831e0ae1649d6135429def03688bc93ff7c86b03 /dom/media/webaudio/blink/HRTFDatabaseLoader.h
parent42f895f27f239e973c9c06241f7a58da7381353c (diff)
parentf624bd1375655dea196cdcb70a9860bc5817df49 (diff)
downloadUXP-RC_20200924.tar
UXP-RC_20200924.tar.gz
UXP-RC_20200924.tar.lz
UXP-RC_20200924.tar.xz
UXP-RC_20200924.zip
Merge branch 'redwood' into releaseRELBASE_20200929RC_20200924
Diffstat (limited to 'dom/media/webaudio/blink/HRTFDatabaseLoader.h')
-rw-r--r--dom/media/webaudio/blink/HRTFDatabaseLoader.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/dom/media/webaudio/blink/HRTFDatabaseLoader.h b/dom/media/webaudio/blink/HRTFDatabaseLoader.h
index 50a875b18..4dfbd4fc8 100644
--- a/dom/media/webaudio/blink/HRTFDatabaseLoader.h
+++ b/dom/media/webaudio/blink/HRTFDatabaseLoader.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2020 M. Straver. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -85,7 +86,12 @@ public:
// on any thread except m_databaseLoaderThread.
void waitForLoaderThreadCompletion();
- HRTFDatabase* database() { return m_hrtfDatabase.get(); }
+ HRTFDatabase* database() {
+ if (!m_databaseLoaded) {
+ return nullptr;
+ }
+ return m_hrtfDatabase.get();
+ }
float databaseSampleRate() const { return m_databaseSampleRate; }
@@ -141,6 +147,7 @@ private:
PRThread* m_databaseLoaderThread;
float m_databaseSampleRate;
+ mozilla::Atomic<bool> m_databaseLoaded;
};
} // namespace WebCore