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

Side by Side Diff: media/audio/linux/alsa_util.h

Issue 9418042: Adding microphone volume support to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added a comment about the number of channel, and fix a compiling issue on mac Created 8 years, 9 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 (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_LINUX_ALSA_UTIL_H_ 5 #ifndef MEDIA_AUDIO_LINUX_ALSA_UTIL_H_
6 #define MEDIA_AUDIO_LINUX_ALSA_UTIL_H_ 6 #define MEDIA_AUDIO_LINUX_ALSA_UTIL_H_
7 7
8 #include <alsa/asoundlib.h> 8 #include <alsa/asoundlib.h>
9 #include <string>
9 10
10 class AlsaWrapper; 11 class AlsaWrapper;
11 12
12 namespace alsa_util { 13 namespace alsa_util {
13 14
14 snd_pcm_format_t BitsToFormat(int bits_per_sample); 15 snd_pcm_format_t BitsToFormat(int bits_per_sample);
15 16
16 snd_pcm_t* OpenCaptureDevice(AlsaWrapper* wrapper, 17 snd_pcm_t* OpenCaptureDevice(AlsaWrapper* wrapper,
17 const char* device_name, 18 const char* device_name,
18 int channels, 19 int channels,
19 int sample_rate, 20 int sample_rate,
20 snd_pcm_format_t pcm_format, 21 snd_pcm_format_t pcm_format,
21 int latency_us); 22 int latency_us);
22 23
23 snd_pcm_t* OpenPlaybackDevice(AlsaWrapper* wrapper, 24 snd_pcm_t* OpenPlaybackDevice(AlsaWrapper* wrapper,
24 const char* device_name, 25 const char* device_name,
25 int channels, 26 int channels,
26 int sample_rate, 27 int sample_rate,
27 snd_pcm_format_t pcm_format, 28 snd_pcm_format_t pcm_format,
28 int latency_us); 29 int latency_us);
29 30
30 int CloseDevice(AlsaWrapper* wrapper, snd_pcm_t* handle); 31 int CloseDevice(AlsaWrapper* wrapper, snd_pcm_t* handle);
31 32
33 snd_mixer_t* OpenMixer(AlsaWrapper* wrapper, const std::string& device_name);
34
35 void CloseMixer(AlsaWrapper* wrapper,
36 snd_mixer_t* mixer,
37 const std::string& device_name);
38
39 snd_mixer_elem_t* LoadCaptureMixerElement(AlsaWrapper* wrapper,
40 snd_mixer_t* mixer);
41
32 } 42 }
33 43
34 #endif // MEDIA_AUDIO_LINUX_ALSA_UTIL_H_ 44 #endif // MEDIA_AUDIO_LINUX_ALSA_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698