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

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

Issue 9965076: Revert 130180 - Move media/audio files into media namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/fake_audio_input_stream.cc ('k') | media/audio/fake_audio_output_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_
11 11
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "media/audio/audio_io.h" 15 #include "media/audio/audio_io.h"
16 #include "media/audio/audio_parameters.h" 16 #include "media/audio/audio_parameters.h"
17 17
18 namespace media {
19
20 class AudioManagerBase; 18 class AudioManagerBase;
21 19
22 class MEDIA_EXPORT FakeAudioOutputStream : public AudioOutputStream { 20 class MEDIA_EXPORT FakeAudioOutputStream : public AudioOutputStream {
23 public: 21 public:
24 static AudioOutputStream* MakeFakeStream(AudioManagerBase* manager, 22 static AudioOutputStream* MakeFakeStream(AudioManagerBase* manager,
25 const AudioParameters& params); 23 const AudioParameters& params);
26 24
27 static FakeAudioOutputStream* GetCurrentFakeStream(); 25 static FakeAudioOutputStream* GetCurrentFakeStream();
28 26
29 virtual bool Open() OVERRIDE; 27 virtual bool Open() OVERRIDE;
(...skipping 17 matching lines...) Expand all
47 AudioManagerBase* audio_manager_; 45 AudioManagerBase* audio_manager_;
48 double volume_; 46 double volume_;
49 AudioSourceCallback* callback_; 47 AudioSourceCallback* callback_;
50 scoped_array<uint8> buffer_; 48 scoped_array<uint8> buffer_;
51 uint32 bytes_per_buffer_; 49 uint32 bytes_per_buffer_;
52 bool closed_; 50 bool closed_;
53 51
54 DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputStream); 52 DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputStream);
55 }; 53 };
56 54
57 } // namespace media
58
59 #endif // MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ 55 #endif // MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_
OLDNEW
« no previous file with comments | « media/audio/fake_audio_input_stream.cc ('k') | media/audio/fake_audio_output_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698