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

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

Issue 1687213002: Express audio delay more precisely in frames rather than milliseconds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
« no previous file with comments | « content/renderer/media/webrtc_audio_renderer.cc ('k') | media/audio/audio_device_thread.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_DEVICE_THREAD_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_
6 #define MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_ 6 #define MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 virtual void MapSharedMemory() = 0; 53 virtual void MapSharedMemory() = 0;
54 54
55 // Called whenever we receive notifications about pending input data. 55 // Called whenever we receive notifications about pending input data.
56 virtual void Process(uint32_t pending_data) = 0; 56 virtual void Process(uint32_t pending_data) = 0;
57 57
58 protected: 58 protected:
59 // Protected so that derived classes can access directly. 59 // Protected so that derived classes can access directly.
60 // The variables are 'const' since values are calculated/set in the 60 // The variables are 'const' since values are calculated/set in the
61 // constructor and must never change. 61 // constructor and must never change.
62 const AudioParameters audio_parameters_; 62 const AudioParameters audio_parameters_;
63 const int samples_per_ms_; 63 const double samples_per_ms_;
64 const int bytes_per_ms_; 64 const double bytes_per_ms_;
65 const uint32_t bytes_per_frame_;
65 66
66 base::SharedMemory shared_memory_; 67 base::SharedMemory shared_memory_;
67 const int memory_length_; 68 const int memory_length_;
68 const int total_segments_; 69 const int total_segments_;
69 int segment_length_; 70 int segment_length_;
70 71
71 private: 72 private:
72 DISALLOW_COPY_AND_ASSIGN(Callback); 73 DISALLOW_COPY_AND_ASSIGN(Callback);
73 }; 74 };
74 75
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 110
110 base::Lock thread_lock_; 111 base::Lock thread_lock_;
111 scoped_refptr<AudioDeviceThread::Thread> thread_; 112 scoped_refptr<AudioDeviceThread::Thread> thread_;
112 113
113 DISALLOW_COPY_AND_ASSIGN(AudioDeviceThread); 114 DISALLOW_COPY_AND_ASSIGN(AudioDeviceThread);
114 }; 115 };
115 116
116 } // namespace media. 117 } // namespace media.
117 118
118 #endif // MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_ 119 #endif // MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_renderer.cc ('k') | media/audio/audio_device_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698