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

Side by Side Diff: media/audio/win/audio_low_latency_input_win.h

Issue 15563004: Improved AGC update scheme for the audio backend in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added Start/Stop APIs for the AGC part Created 7 years, 6 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/pulse/pulse_input.cc ('k') | media/audio/win/audio_low_latency_input_win.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 // Implementation of AudioInputStream for Windows using Windows Core Audio 5 // Implementation of AudioInputStream for Windows using Windows Core Audio
6 // WASAPI for low latency capturing. 6 // WASAPI for low latency capturing.
7 // 7 //
8 // Overview of operation: 8 // Overview of operation:
9 // 9 //
10 // - An object of WASAPIAudioInputStream is created by the AudioManager 10 // - An object of WASAPIAudioInputStream is created by the AudioManager
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include <string> 62 #include <string>
63 63
64 #include "base/compiler_specific.h" 64 #include "base/compiler_specific.h"
65 #include "base/threading/non_thread_safe.h" 65 #include "base/threading/non_thread_safe.h"
66 #include "base/threading/platform_thread.h" 66 #include "base/threading/platform_thread.h"
67 #include "base/threading/simple_thread.h" 67 #include "base/threading/simple_thread.h"
68 #include "base/win/scoped_co_mem.h" 68 #include "base/win/scoped_co_mem.h"
69 #include "base/win/scoped_com_initializer.h" 69 #include "base/win/scoped_com_initializer.h"
70 #include "base/win/scoped_comptr.h" 70 #include "base/win/scoped_comptr.h"
71 #include "base/win/scoped_handle.h" 71 #include "base/win/scoped_handle.h"
72 #include "media/audio/audio_input_stream_impl.h" 72 #include "media/audio/agc_audio_stream.h"
73 #include "media/audio/audio_parameters.h" 73 #include "media/audio/audio_parameters.h"
74 #include "media/base/media_export.h" 74 #include "media/base/media_export.h"
75 75
76 namespace media { 76 namespace media {
77 77
78 class AudioManagerWin; 78 class AudioManagerWin;
79 79
80 // AudioInputStream implementation using Windows Core Audio APIs. 80 // AudioInputStream implementation using Windows Core Audio APIs.
81 class MEDIA_EXPORT WASAPIAudioInputStream 81 class MEDIA_EXPORT WASAPIAudioInputStream
82 : public AudioInputStreamImpl, 82 : public AgcAudioStream<AudioInputStream>,
83 public base::DelegateSimpleThread::Delegate, 83 public base::DelegateSimpleThread::Delegate,
84 NON_EXPORTED_BASE(public base::NonThreadSafe) { 84 NON_EXPORTED_BASE(public base::NonThreadSafe) {
85 public: 85 public:
86 // The ctor takes all the usual parameters, plus |manager| which is the 86 // The ctor takes all the usual parameters, plus |manager| which is the
87 // the audio manager who is creating this object. 87 // the audio manager who is creating this object.
88 WASAPIAudioInputStream(AudioManagerWin* manager, 88 WASAPIAudioInputStream(AudioManagerWin* manager,
89 const AudioParameters& params, 89 const AudioParameters& params,
90 const std::string& device_id); 90 const std::string& device_id);
91 // The dtor is typically called by the AudioManager only and it is usually 91 // The dtor is typically called by the AudioManager only and it is usually
92 // triggered by calling AudioInputStream::Close(). 92 // triggered by calling AudioInputStream::Close().
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 // This event will be signaled when capturing shall stop. 201 // This event will be signaled when capturing shall stop.
202 base::win::ScopedHandle stop_capture_event_; 202 base::win::ScopedHandle stop_capture_event_;
203 203
204 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); 204 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream);
205 }; 205 };
206 206
207 } // namespace media 207 } // namespace media
208 208
209 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ 209 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_
OLDNEW
« no previous file with comments | « media/audio/pulse/pulse_input.cc ('k') | media/audio/win/audio_low_latency_input_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698