| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 23 matching lines...) Expand all Loading... |
| 34 virtual ~FakeAudioOutputStream() {} | 34 virtual ~FakeAudioOutputStream() {} |
| 35 | 35 |
| 36 static void DestroyLastFakeStream(void* param); | 36 static void DestroyLastFakeStream(void* param); |
| 37 static bool has_created_fake_stream_; | 37 static bool has_created_fake_stream_; |
| 38 static FakeAudioOutputStream* last_fake_stream_; | 38 static FakeAudioOutputStream* last_fake_stream_; |
| 39 | 39 |
| 40 double volume_; | 40 double volume_; |
| 41 AudioSourceCallback* callback_; | 41 AudioSourceCallback* callback_; |
| 42 scoped_array<char> buffer_; | 42 scoped_array<char> buffer_; |
| 43 uint32 packet_size_; | 43 uint32 packet_size_; |
| 44 bool closed_; |
| 44 | 45 |
| 45 DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputStream); | 46 DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputStream); |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 #endif // MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ | 49 #endif // MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ |
| 49 | |
| OLD | NEW |