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

Unified Diff: Source/core/platform/audio/AudioBus.h

Issue 14628008: Require use of AudioBus::create() to avoid ref-counting issues (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Require use of Created 7 years, 7 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 | Source/core/platform/audio/AudioBus.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/audio/AudioBus.h
diff --git a/Source/core/platform/audio/AudioBus.h b/Source/core/platform/audio/AudioBus.h
index 9447f35c436f9998ea5a2f3d5cc11294adba4e10..6f4ed2b21877fb907d22264a84a69305939979af 100644
--- a/Source/core/platform/audio/AudioBus.h
+++ b/Source/core/platform/audio/AudioBus.h
@@ -66,7 +66,7 @@ public:
// allocate indicates whether or not to initially have the AudioChannels created with managed storage.
// Normal usage is to pass true here, in which case the AudioChannels will memory-manage their own storage.
// If allocate is false then setChannelMemory() has to be called later on for each channel before the AudioBus is useable...
- AudioBus(unsigned numberOfChannels, size_t length, bool allocate = true);
+ static PassRefPtr<AudioBus> create(unsigned numberOfChannels, size_t length, bool allocate = true);
// Tells the given channel to use an externally allocated buffer.
void setChannelMemory(unsigned channelIndex, float* storage, size_t length);
@@ -149,6 +149,8 @@ public:
protected:
AudioBus() { };
+ AudioBus(unsigned numberOfChannels, size_t length, bool allocate);
+
void speakersCopyFrom(const AudioBus&);
void discreteCopyFrom(const AudioBus&);
void speakersSumFrom(const AudioBus&);
« no previous file with comments | « no previous file | Source/core/platform/audio/AudioBus.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698