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

Unified Diff: media/audio/audio_manager_base.h

Issue 9692038: stopping the audio thread before destroying the AudioManager<Platform> (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: used the correct way to delete the fake streams & addressed Tommi's comment Created 8 years, 9 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 | media/audio/audio_manager_base.cc » ('j') | media/audio/fake_audio_input_stream.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager_base.h
diff --git a/media/audio/audio_manager_base.h b/media/audio/audio_manager_base.h
index ea9c78a870965d95fb99608697280504473fe724..d26a8b9f27a33f57a55756ec755fc8e02e198333 100644
--- a/media/audio/audio_manager_base.h
+++ b/media/audio/audio_manager_base.h
@@ -59,11 +59,6 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
void IncreaseActiveInputStreamCount();
void DecreaseActiveInputStreamCount();
- // Shuts down the audio thread and releases all the audio output dispatchers
- // on the audio thread. All AudioOutputProxy instances should be freed before
- // Shutdown is called.
- void Shutdown();
-
// Creates the output stream for the |AUDIO_PCM_LINEAR| format. The legacy
// name is also from |AUDIO_PCM_LINEAR|.
virtual AudioOutputStream* MakeLinearOutputStream(
@@ -89,6 +84,12 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
AudioParameters::Compare>
AudioOutputDispatchersMap;
+ // Shuts down the audio thread and releases all the audio output dispatchers
+ // on the audio thread. All audio streams should be freed before
+ // Shutdown is called.
+ // This must be called in the destructor of the AudioManager<Platform>.
+ void Shutdown();
+
void ShutdownOnAudioThread();
void SetMaxOutputStreamsAllowed(int max) { max_num_output_streams_ = max; }
@@ -107,13 +108,19 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
// is currently recording in Chrome.
base::AtomicRefCount num_active_input_streams_;
- // Max number of open output streams, modified by
+ // Max number of opened output streams, modified by
tommi (sloooow) - chröme 2012/03/13 14:16:52 language nit: 'open', as it was is technically mor
no longer working on chromium 2012/03/13 15:03:39 Done.
// SetMaxOutputStreamsAllowed().
int max_num_output_streams_;
- // Number of currently open output streams.
+ // Max number of opened input streams.
tommi (sloooow) - chröme 2012/03/13 14:16:52 same here and below.
no longer working on chromium 2012/03/13 15:03:39 Done.
+ int max_num_input_streams_;
+
+ // Number of currently opened output streams.
int num_output_streams_;
+ // Number of currently opened input streams.
+ int num_input_streams_;
+
DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
};
« no previous file with comments | « no previous file | media/audio/audio_manager_base.cc » ('j') | media/audio/fake_audio_input_stream.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698