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

Side by Side Diff: media/audio/cras/audio_manager_cras.h

Issue 132773002: Fix chromeos=1 so Pulse is preferred when use_cras=0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove alsa_util.h dependency. Created 6 years, 11 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CRAS_AUDIO_MANAGER_CRAS_H_ 5 #ifndef MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_
6 #define MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_ 6 #define MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_
7 7
8 #include <cras_types.h>
9
8 #include <string> 10 #include <string>
9 11
10 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
12 #include "media/audio/audio_manager_base.h" 14 #include "media/audio/audio_manager_base.h"
13 15
14 namespace media { 16 namespace media {
15 17
16 class MEDIA_EXPORT AudioManagerCras : public AudioManagerBase { 18 class MEDIA_EXPORT AudioManagerCras : public AudioManagerBase {
17 public: 19 public:
(...skipping 15 matching lines...) Expand all
33 const AudioParameters& params) OVERRIDE; 35 const AudioParameters& params) OVERRIDE;
34 virtual AudioOutputStream* MakeLowLatencyOutputStream( 36 virtual AudioOutputStream* MakeLowLatencyOutputStream(
35 const AudioParameters& params, 37 const AudioParameters& params,
36 const std::string& device_id, 38 const std::string& device_id,
37 const std::string& input_device_id) OVERRIDE; 39 const std::string& input_device_id) OVERRIDE;
38 virtual AudioInputStream* MakeLinearInputStream( 40 virtual AudioInputStream* MakeLinearInputStream(
39 const AudioParameters& params, const std::string& device_id) OVERRIDE; 41 const AudioParameters& params, const std::string& device_id) OVERRIDE;
40 virtual AudioInputStream* MakeLowLatencyInputStream( 42 virtual AudioInputStream* MakeLowLatencyInputStream(
41 const AudioParameters& params, const std::string& device_id) OVERRIDE; 43 const AudioParameters& params, const std::string& device_id) OVERRIDE;
42 44
45 static snd_pcm_format_t BitsToFormat(int bits_per_sample);
46
43 protected: 47 protected:
44 virtual ~AudioManagerCras(); 48 virtual ~AudioManagerCras();
45 49
46 virtual AudioParameters GetPreferredOutputStreamParameters( 50 virtual AudioParameters GetPreferredOutputStreamParameters(
47 const std::string& output_device_id, 51 const std::string& output_device_id,
48 const AudioParameters& input_params) OVERRIDE; 52 const AudioParameters& input_params) OVERRIDE;
49 53
50 private: 54 private:
51 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream. 55 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
52 AudioOutputStream* MakeOutputStream(const AudioParameters& params); 56 AudioOutputStream* MakeOutputStream(const AudioParameters& params);
53 57
54 // Called by MakeLinearInputStream and MakeLowLatencyInputStream. 58 // Called by MakeLinearInputStream and MakeLowLatencyInputStream.
55 AudioInputStream* MakeInputStream(const AudioParameters& params, 59 AudioInputStream* MakeInputStream(const AudioParameters& params,
56 const std::string& device_id); 60 const std::string& device_id);
57 61
58 DISALLOW_COPY_AND_ASSIGN(AudioManagerCras); 62 DISALLOW_COPY_AND_ASSIGN(AudioManagerCras);
59 }; 63 };
60 64
61 } // namespace media 65 } // namespace media
62 66
63 #endif // MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_ 67 #endif // MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/cras/audio_manager_cras.cc » ('j') | media/audio/cras/cras_input_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698