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

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

Issue 344583002: Modifies AudioInputCallback::OnData and use media::AudioBus instead of plain byte vector (Relanding) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added extra non-pure OnData API Created 6 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/agc_audio_stream.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 AudioBus;
78 class AudioManagerWin; 79 class AudioManagerWin;
79 80
80 // AudioInputStream implementation using Windows Core Audio APIs. 81 // AudioInputStream implementation using Windows Core Audio APIs.
81 class MEDIA_EXPORT WASAPIAudioInputStream 82 class MEDIA_EXPORT WASAPIAudioInputStream
82 : public AgcAudioStream<AudioInputStream>, 83 : public AgcAudioStream<AudioInputStream>,
83 public base::DelegateSimpleThread::Delegate, 84 public base::DelegateSimpleThread::Delegate,
84 NON_EXPORTED_BASE(public base::NonThreadSafe) { 85 NON_EXPORTED_BASE(public base::NonThreadSafe) {
85 public: 86 public:
86 // The ctor takes all the usual parameters, plus |manager| which is the 87 // The ctor takes all the usual parameters, plus |manager| which is the
87 // the audio manager who is creating this object. 88 // the audio manager who is creating this object.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // This interface does only work with shared-mode streams. 205 // This interface does only work with shared-mode streams.
205 base::win::ScopedComPtr<ISimpleAudioVolume> simple_audio_volume_; 206 base::win::ScopedComPtr<ISimpleAudioVolume> simple_audio_volume_;
206 207
207 // The audio engine will signal this event each time a buffer has been 208 // The audio engine will signal this event each time a buffer has been
208 // recorded. 209 // recorded.
209 base::win::ScopedHandle audio_samples_ready_event_; 210 base::win::ScopedHandle audio_samples_ready_event_;
210 211
211 // This event will be signaled when capturing shall stop. 212 // This event will be signaled when capturing shall stop.
212 base::win::ScopedHandle stop_capture_event_; 213 base::win::ScopedHandle stop_capture_event_;
213 214
215 // Extra audio bus used for storage of deinterleaved data for the OnData
216 // callback.
217 scoped_ptr<media::AudioBus> audio_bus_;
218
214 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); 219 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream);
215 }; 220 };
216 221
217 } // namespace media 222 } // namespace media
218 223
219 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ 224 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_
OLDNEW
« no previous file with comments | « media/audio/virtual_audio_input_stream_unittest.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