diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-26 21:14:16 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-26 21:14:16 +0000 |
commit | 46491f691e2d322192769544f2d7c6a82deaaf4b (patch) | |
tree | 1c56d00f6ff9a591fea63412cb103d0a744f87f2 /media | |
parent | 6b9b735dc9ba95674f2ae3db94ef13bcfc7dada7 (diff) | |
download | chromium_src-46491f691e2d322192769544f2d7c6a82deaaf4b.zip chromium_src-46491f691e2d322192769544f2d7c6a82deaaf4b.tar.gz chromium_src-46491f691e2d322192769544f2d7c6a82deaaf4b.tar.bz2 |
Fixed bug in AudioRendererBase and made AudioRendererImpl check for audio devices.
TBR=hclam
Review URL: http://codereview.chromium.org/42660
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12602 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/filters/audio_renderer_base.cc | 2 | ||||
-rw-r--r-- | media/filters/audio_renderer_impl.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/media/filters/audio_renderer_base.cc b/media/filters/audio_renderer_base.cc index 548586e..880ca37 100644 --- a/media/filters/audio_renderer_base.cc +++ b/media/filters/audio_renderer_base.cc @@ -35,7 +35,7 @@ void AudioRendererBase::Stop() { OnStop(); AutoLock auto_lock(lock_); - while (queue_.empty()) { + while (!queue_.empty()) { queue_.front()->Release(); queue_.pop_front(); } diff --git a/media/filters/audio_renderer_impl.cc b/media/filters/audio_renderer_impl.cc index 6412d38..7b66e14 100644 --- a/media/filters/audio_renderer_impl.cc +++ b/media/filters/audio_renderer_impl.cc @@ -29,7 +29,8 @@ bool AudioRendererImpl::IsMediaFormatSupported( int channels; int sample_rate; int sample_bits; - return ParseMediaFormat(media_format, &channels, &sample_rate, &sample_bits); + return AudioManager::GetAudioManager()->HasAudioDevices() && + ParseMediaFormat(media_format, &channels, &sample_rate, &sample_bits); } void AudioRendererImpl::SetPlaybackRate(float playback_rate) { |