diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-22 17:50:01 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-22 17:50:01 +0000 |
commit | 50b997c85d4dfaf2d01de3448314ca15efcec789 (patch) | |
tree | 507343880830531706c514abac0c69c1b2447b7a /media/audio/linux/audio_manager_linux.cc | |
parent | ca87e49f2bd61d3f5034477631f9c06c6d73c923 (diff) | |
download | chromium_src-50b997c85d4dfaf2d01de3448314ca15efcec789.zip chromium_src-50b997c85d4dfaf2d01de3448314ca15efcec789.tar.gz chromium_src-50b997c85d4dfaf2d01de3448314ca15efcec789.tar.bz2 |
Some fixups for AudioController and unit tests
Some fixes to AudioController and more unit tests. AudioController is
now ready to be used by AudioRendererHost.
BUG=39885
TEST=media_unittests
Review URL: http://codereview.chromium.org/2861010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50480 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/linux/audio_manager_linux.cc')
-rw-r--r-- | media/audio/linux/audio_manager_linux.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/audio/linux/audio_manager_linux.cc b/media/audio/linux/audio_manager_linux.cc index b3d21f5..9fa4799 100644 --- a/media/audio/linux/audio_manager_linux.cc +++ b/media/audio/linux/audio_manager_linux.cc @@ -59,6 +59,12 @@ AudioManagerLinux::AudioManagerLinux() } AudioManagerLinux::~AudioManagerLinux() { + // Make sure we stop the thread first. If we let the default destructor to + // destruct the members, we may destroy audio streams before stopping the + // thread, resulting an unexpected behavior. + // This way we make sure activities of the audio streams are all stopped + // before we destroy them. + audio_thread_.Stop(); active_streams_.clear(); } |