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 // A fake implementation of AudioInputStream, useful for testing purpose. | 5 // A fake implementation of AudioInputStream, useful for testing purpose. |
6 | 6 |
7 #ifndef MEDIA_AUDIO_FAKE_AUDIO_INPUT_STREAM_H_ | 7 #ifndef MEDIA_AUDIO_FAKE_AUDIO_INPUT_STREAM_H_ |
8 #define MEDIA_AUDIO_FAKE_AUDIO_INPUT_STREAM_H_ | 8 #define MEDIA_AUDIO_FAKE_AUDIO_INPUT_STREAM_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 void DoCallback(); | 56 void DoCallback(); |
57 | 57 |
58 AudioManagerBase* audio_manager_; | 58 AudioManagerBase* audio_manager_; |
59 AudioInputCallback* callback_; | 59 AudioInputCallback* callback_; |
60 scoped_ptr<uint8[]> buffer_; | 60 scoped_ptr<uint8[]> buffer_; |
61 int buffer_size_; | 61 int buffer_size_; |
62 AudioParameters params_; | 62 AudioParameters params_; |
63 base::Thread thread_; | 63 base::Thread thread_; |
64 base::TimeTicks last_callback_time_; | 64 base::TimeTicks last_callback_time_; |
65 base::TimeDelta callback_interval_; | 65 base::TimeDelta callback_interval_; |
| 66 base::TimeDelta interval_from_last_beep_; |
66 int beep_duration_in_buffers_; | 67 int beep_duration_in_buffers_; |
67 int beep_generated_in_buffers_; | 68 int beep_generated_in_buffers_; |
68 int beep_period_in_frames_; | 69 int beep_period_in_frames_; |
69 int frames_elapsed_; | 70 int frames_elapsed_; |
70 | 71 |
71 DISALLOW_COPY_AND_ASSIGN(FakeAudioInputStream); | 72 DISALLOW_COPY_AND_ASSIGN(FakeAudioInputStream); |
72 }; | 73 }; |
73 | 74 |
74 } // namespace media | 75 } // namespace media |
75 | 76 |
76 #endif // MEDIA_AUDIO_FAKE_AUDIO_INPUT_STREAM_H_ | 77 #endif // MEDIA_AUDIO_FAKE_AUDIO_INPUT_STREAM_H_ |
OLD | NEW |