OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |