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

Side by Side Diff: media/audio/audio_output_resampler.h

Issue 481193003: Remove AudioBuffersState usage in Chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix audio muter build buster. Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/audio_output_proxy_unittest.cc ('k') | media/audio/audio_output_resampler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_
6 #define MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "media/audio/audio_io.h" 13 #include "media/audio/audio_io.h"
14 #include "media/audio/audio_manager.h" 14 #include "media/audio/audio_manager.h"
15 #include "media/audio/audio_output_dispatcher.h" 15 #include "media/audio/audio_output_dispatcher.h"
16 #include "media/audio/audio_parameters.h" 16 #include "media/audio/audio_parameters.h"
17 17
18 namespace media { 18 namespace media {
19 19
20 class OnMoreDataConverter; 20 class OnMoreDataConverter;
21 21
22 // AudioOutputResampler is a browser-side resampling and buffering solution 22 // AudioOutputResampler is a browser-side resampling and buffering solution
23 // which ensures audio data is always output at given parameters. See the 23 // which ensures audio data is always output at given parameters. See the
24 // AudioConverter class for details on the conversion process. 24 // AudioConverter class for details on the conversion process.
25 // 25 //
26 // AOR works by intercepting the AudioSourceCallback provided to StartStream() 26 // AOR works by intercepting the AudioSourceCallback provided to StartStream()
27 // and redirecting it through an AudioConverter instance. AudioBuffersState is 27 // and redirecting it through an AudioConverter instance. |total_bytes_delay|
28 // adjusted for buffer delay caused by the conversion process. 28 // is adjusted for buffer delay caused by the conversion process.
29 // 29 //
30 // AOR will automatically fall back from AUDIO_PCM_LOW_LATENCY to 30 // AOR will automatically fall back from AUDIO_PCM_LOW_LATENCY to
31 // AUDIO_PCM_LINEAR if the output device fails to open at the requested output 31 // AUDIO_PCM_LINEAR if the output device fails to open at the requested output
32 // parameters. 32 // parameters.
33 // 33 //
34 // TODO(dalecurtis): Ideally the low latency path will be as reliable as the 34 // TODO(dalecurtis): Ideally the low latency path will be as reliable as the
35 // high latency path once we have channel mixing and support querying for the 35 // high latency path once we have channel mixing and support querying for the
36 // hardware's configured bit depth. Monitor the UMA stats for fallback and 36 // hardware's configured bit depth. Monitor the UMA stats for fallback and
37 // remove fallback support once it's stable. http://crbug.com/148418 37 // remove fallback support once it's stable. http://crbug.com/148418
38 class MEDIA_EXPORT AudioOutputResampler : public AudioOutputDispatcher { 38 class MEDIA_EXPORT AudioOutputResampler : public AudioOutputDispatcher {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Whether any streams have been opened through |dispatcher_|, if so we can't 81 // Whether any streams have been opened through |dispatcher_|, if so we can't
82 // fallback on future OpenStream() failures. 82 // fallback on future OpenStream() failures.
83 bool streams_opened_; 83 bool streams_opened_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler); 85 DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler);
86 }; 86 };
87 87
88 } // namespace media 88 } // namespace media
89 89
90 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ 90 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_
OLDNEW
« no previous file with comments | « media/audio/audio_output_proxy_unittest.cc ('k') | media/audio/audio_output_resampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698