Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Unified Diff: third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.h

Issue 2154473003: Simplify locking in HRTFDatabaseLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.h
diff --git a/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.h b/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.h
index bf8ec64e0df305027dde98a880216f757f247a7f..8de2595bf1ca3d1959d7db89d37bb7a8e24954d2 100644
--- a/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.h
+++ b/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.h
@@ -53,13 +53,16 @@ public:
// Both constructor and destructor must be called from the main thread.
~HRTFDatabaseLoader();
- // Returns true once the default database has been completely loaded.
- bool isLoaded();
+ // Returns true once the default database has been completely loaded. This
+ // must be called from the audio thread.
+ bool isLoaded() { return database(); }
// waitForLoaderThreadCompletion() may be called more than once and is thread-safe.
void waitForLoaderThreadCompletion();
- HRTFDatabase* database() { return m_hrtfDatabase.get(); }
+ // Returns the database or nullptr if the database doesn't yet exist. Must
+ // be called from the audio thread.
+ HRTFDatabase* database();
float databaseSampleRate() const { return m_databaseSampleRate; }
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698