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 AudioOutputStream. It is used for testing purpose. | 5 // A fake implementation of AudioOutputStream. It is used for testing purpose. |
6 // TODO(hclam): Implement a thread in this fake output stream to simulate an | 6 // TODO(hclam): Implement a thread in this fake output stream to simulate an |
7 // audio output stream reading from AudioSourceCallback. | 7 // audio output stream reading from AudioSourceCallback. |
8 | 8 |
9 #ifndef MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ | 9 #ifndef MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ |
10 #define MEDIA_AUDIO_FAKE_AUDIO_OUTOUT_STREAM_H_ | 10 #define MEDIA_AUDIO_FAKE_AUDIO_OUTOUT_STREAM_H_ |
(...skipping 28 matching lines...) Expand all Loading... |
39 const AudioParameters& params); | 39 const AudioParameters& params); |
40 | 40 |
41 virtual ~FakeAudioOutputStream(); | 41 virtual ~FakeAudioOutputStream(); |
42 | 42 |
43 static FakeAudioOutputStream* current_fake_stream_; | 43 static FakeAudioOutputStream* current_fake_stream_; |
44 | 44 |
45 AudioManagerBase* audio_manager_; | 45 AudioManagerBase* audio_manager_; |
46 double volume_; | 46 double volume_; |
47 AudioSourceCallback* callback_; | 47 AudioSourceCallback* callback_; |
48 scoped_array<uint8> buffer_; | 48 scoped_array<uint8> buffer_; |
49 uint32 packet_size_; | 49 uint32 bytes_per_buffer_; |
50 bool closed_; | 50 bool closed_; |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputStream); | 52 DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputStream); |
53 }; | 53 }; |
54 | 54 |
55 #endif // MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ | 55 #endif // MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ |
OLD | NEW |