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

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

Issue 3185022: Share one thread between all AudioOutputControllers instead of creating one per stream. (Closed)
Patch Set: - Created 10 years, 3 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « media/audio/fake_audio_input_stream_unittest.cc ('k') | media/audio/fake_audio_output_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698