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

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

Issue 1302423006: Ensure that data is not overwritten in the audio input shared memory ring buffer that sits on the b… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed log call expectations for Android in unit test. Rebase. Created 5 years, 3 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
« no previous file with comments | « media/audio/audio_device_thread.cc ('k') | media/audio/audio_input_device.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_INPUT_CONTROLLER_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_
6 #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ 6 #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include "base/atomicops.h" 9 #include "base/atomicops.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 const AudioBus* data) = 0; 122 const AudioBus* data) = 0;
123 virtual void OnLog(AudioInputController* controller, 123 virtual void OnLog(AudioInputController* controller,
124 const std::string& message) = 0; 124 const std::string& message) = 0;
125 125
126 protected: 126 protected:
127 virtual ~EventHandler() {} 127 virtual ~EventHandler() {}
128 }; 128 };
129 129
130 // A synchronous writer interface used by AudioInputController for 130 // A synchronous writer interface used by AudioInputController for
131 // synchronous writing. 131 // synchronous writing.
132 class SyncWriter { 132 class MEDIA_EXPORT SyncWriter {
133 public: 133 public:
134 virtual ~SyncWriter() {} 134 virtual ~SyncWriter() {}
135 135
136 // Write certain amount of data from |data|. 136 // Write certain amount of data from |data|.
137 virtual void Write(const AudioBus* data, 137 virtual void Write(const AudioBus* data,
138 double volume, 138 double volume,
139 bool key_pressed, 139 bool key_pressed,
140 uint32 hardware_delay_bytes) = 0; 140 uint32 hardware_delay_bytes) = 0;
141 141
142 // Close this synchronous writer. 142 // Close this synchronous writer.
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 385
386 // Used for audio debug recordings. Accessed on audio thread. 386 // Used for audio debug recordings. Accessed on audio thread.
387 AudioInputWriter* input_writer_; 387 AudioInputWriter* input_writer_;
388 388
389 DISALLOW_COPY_AND_ASSIGN(AudioInputController); 389 DISALLOW_COPY_AND_ASSIGN(AudioInputController);
390 }; 390 };
391 391
392 } // namespace media 392 } // namespace media
393 393
394 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ 394 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « media/audio/audio_device_thread.cc ('k') | media/audio/audio_input_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698