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

Unified Diff: media/audio/linux/alsa_util.h

Issue 3299005: Implement audio recording for Linux via ALSA. (Closed)
Patch Set: . Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: media/audio/linux/alsa_util.h
diff --git a/media/audio/linux/alsa_util.h b/media/audio/linux/alsa_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..5c9a0a04dc4c1cc2378fbd15074be98003c75a73
--- /dev/null
+++ b/media/audio/linux/alsa_util.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_AUDIO_LINUX_ALSA_UTIL_H_
+#define MEDIA_AUDIO_LINUX_ALSA_UTIL_H_
+
+#include <alsa/asoundlib.h>
+
+class AlsaWrapper;
+
+namespace alsa_util {
+
+snd_pcm_format_t BitsToFormat(int bits_per_sample);
+
+snd_pcm_t* OpenCaptureDevice(AlsaWrapper* wrapper,
+ const char* device_name,
+ int channels,
+ int sample_rate,
+ snd_pcm_format_t pcm_format,
+ int latency_us);
+
+snd_pcm_t* OpenPlaybackDevice(AlsaWrapper* wrapper,
+ const char* device_name,
+ int channels,
+ int sample_rate,
+ snd_pcm_format_t pcm_format,
+ int latency_us);
+
+int CloseDevice(AlsaWrapper* wrapper, snd_pcm_t* handle);
+
+}
+
+#endif // MEDIA_AUDIO_LINUX_ALSA_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698