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

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

Issue 2689483006: Switch browser side audio capture path to use base time primitives. (Closed)
Patch Set: Bloop Created 3 years, 10 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
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // A synchronous writer interface used by AudioInputController for 113 // A synchronous writer interface used by AudioInputController for
114 // synchronous writing. 114 // synchronous writing.
115 class MEDIA_EXPORT SyncWriter { 115 class MEDIA_EXPORT SyncWriter {
116 public: 116 public:
117 virtual ~SyncWriter() {} 117 virtual ~SyncWriter() {}
118 118
119 // Write certain amount of data from |data|. 119 // Write certain amount of data from |data|.
120 virtual void Write(const AudioBus* data, 120 virtual void Write(const AudioBus* data,
121 double volume, 121 double volume,
122 bool key_pressed, 122 bool key_pressed,
123 uint32_t hardware_delay_bytes) = 0; 123 base::TimeDelta delay,
124 base::TimeTicks delay_timestamp) = 0;
124 125
125 // Close this synchronous writer. 126 // Close this synchronous writer.
126 virtual void Close() = 0; 127 virtual void Close() = 0;
127 }; 128 };
128 129
129 // enum used for determining what UMA stats to report. 130 // enum used for determining what UMA stats to report.
130 enum StreamType { 131 enum StreamType {
131 VIRTUAL = 0, 132 VIRTUAL = 0,
132 HIGH_LATENCY = 1, 133 HIGH_LATENCY = 1,
133 LOW_LATENCY = 2, 134 LOW_LATENCY = 2,
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // The weak_ptr_factory_ and all outstanding weak pointers, are invalidated 392 // The weak_ptr_factory_ and all outstanding weak pointers, are invalidated
392 // at the end of DoClose. 393 // at the end of DoClose.
393 base::WeakPtrFactory<AudioInputController> weak_ptr_factory_; 394 base::WeakPtrFactory<AudioInputController> weak_ptr_factory_;
394 395
395 DISALLOW_COPY_AND_ASSIGN(AudioInputController); 396 DISALLOW_COPY_AND_ASSIGN(AudioInputController);
396 }; 397 };
397 398
398 } // namespace media 399 } // namespace media
399 400
400 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ 401 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698