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

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

Issue 5158003: Implement AudioOutputProxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 10 years 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 | « no previous file | media/audio/audio_manager_base.h » ('j') | media/audio/audio_output_dispatcher.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "media/audio/audio_parameters.h" 10 #include "media/audio/audio_parameters.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // 47 //
48 // |params.format| can be set to AUDIO_PCM_LOW_LATENCY and that has two 48 // |params.format| can be set to AUDIO_PCM_LOW_LATENCY and that has two
49 // effects: 49 // effects:
50 // 1- Instead of triple buffered the audio will be double buffered. 50 // 1- Instead of triple buffered the audio will be double buffered.
51 // 2- A low latency driver or alternative audio subsystem will be used when 51 // 2- A low latency driver or alternative audio subsystem will be used when
52 // available. 52 // available.
53 // 53 //
54 // Do not free the returned AudioOutputStream. It is owned by AudioManager. 54 // Do not free the returned AudioOutputStream. It is owned by AudioManager.
55 virtual AudioOutputStream* MakeAudioOutputStream(AudioParameters params) = 0; 55 virtual AudioOutputStream* MakeAudioOutputStream(AudioParameters params) = 0;
56 56
57 // Creates new audio output proxy. A proxy implements
58 // AudioOutputStream inteface, but unlike regular output stream
scherkus (not reviewing) 2010/11/24 02:01:59 nit: inteface -> interface
Sergey Ulanov 2010/11/24 03:49:54 Done.
59 // created with MakeAudioOutputStream() it opens device only when a
60 // sound is actually playing.
61 virtual AudioOutputStream* MakeAudioOutputStreamProxy(
62 const AudioParameters& params) = 0;
63
57 // Factory to create audio recording streams. 64 // Factory to create audio recording streams.
58 // |channels| can be 1 or 2. 65 // |channels| can be 1 or 2.
59 // |sample_rate| is in hertz and can be any value supported by the platform. 66 // |sample_rate| is in hertz and can be any value supported by the platform.
60 // |bits_per_sample| can be any value supported by the platform. 67 // |bits_per_sample| can be any value supported by the platform.
61 // |samples_per_packet| is in hertz as well and can be 0 to |sample_rate|, 68 // |samples_per_packet| is in hertz as well and can be 0 to |sample_rate|,
62 // with 0 suggesting that the implementation use a default value for that 69 // with 0 suggesting that the implementation use a default value for that
63 // platform. 70 // platform.
64 // Returns NULL if the combination of the parameters is not supported, or if 71 // Returns NULL if the combination of the parameters is not supported, or if
65 // we have reached some other platform specific limit. 72 // we have reached some other platform specific limit.
66 // 73 //
(...skipping 20 matching lines...) Expand all
87 virtual void Init() = 0; 94 virtual void Init() = 0;
88 95
89 private: 96 private:
90 static void Destroy(void*); 97 static void Destroy(void*);
91 98
92 // Called by GetAudioManager() to create platform-specific audio manager. 99 // Called by GetAudioManager() to create platform-specific audio manager.
93 static AudioManager* CreateAudioManager(); 100 static AudioManager* CreateAudioManager();
94 }; 101 };
95 102
96 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ 103 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/audio_manager_base.h » ('j') | media/audio/audio_output_dispatcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698