OLD | NEW |
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 // AlsaWrapper is a simple stateless class that wraps the alsa library commands | 5 // AlsaWrapper is a simple stateless class that wraps the alsa library commands |
6 // we want to use. It's purpose is to allow injection of a mock so that the | 6 // we want to use. It's purpose is to allow injection of a mock so that the |
7 // higher level code is testable. | 7 // higher level code is testable. |
8 | 8 |
9 #ifndef MEDIA_AUDIO_ALSA_ALSA_WRAPPER_H_ | 9 #ifndef MEDIA_AUDIO_ALSA_ALSA_WRAPPER_H_ |
10 #define MEDIA_AUDIO_ALSA_ALSA_WRAPPER_H_ | 10 #define MEDIA_AUDIO_ALSA_ALSA_WRAPPER_H_ |
11 | 11 |
12 #include <alsa/asoundlib.h> | 12 #include <alsa/asoundlib.h> |
13 | 13 |
14 #include "base/basictypes.h" | 14 #include "base/macros.h" |
15 #include "media/base/media_export.h" | 15 #include "media/base/media_export.h" |
16 | 16 |
17 namespace media { | 17 namespace media { |
18 | 18 |
19 class MEDIA_EXPORT AlsaWrapper { | 19 class MEDIA_EXPORT AlsaWrapper { |
20 public: | 20 public: |
21 AlsaWrapper(); | 21 AlsaWrapper(); |
22 virtual ~AlsaWrapper(); | 22 virtual ~AlsaWrapper(); |
23 | 23 |
24 virtual int DeviceNameHint(int card, const char* iface, void*** hints); | 24 virtual int DeviceNameHint(int card, const char* iface, void*** hints); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 int ConfigureHwParams(snd_pcm_t* handle, snd_pcm_hw_params_t* hw_params, | 78 int ConfigureHwParams(snd_pcm_t* handle, snd_pcm_hw_params_t* hw_params, |
79 snd_pcm_format_t format, snd_pcm_access_t access, | 79 snd_pcm_format_t format, snd_pcm_access_t access, |
80 unsigned int channels, unsigned int rate, | 80 unsigned int channels, unsigned int rate, |
81 int soft_resample, unsigned int latency); | 81 int soft_resample, unsigned int latency); |
82 DISALLOW_COPY_AND_ASSIGN(AlsaWrapper); | 82 DISALLOW_COPY_AND_ASSIGN(AlsaWrapper); |
83 }; | 83 }; |
84 | 84 |
85 } // namespace media | 85 } // namespace media |
86 | 86 |
87 #endif // MEDIA_AUDIO_ALSA_ALSA_WRAPPER_H_ | 87 #endif // MEDIA_AUDIO_ALSA_ALSA_WRAPPER_H_ |
OLD | NEW |