sound_mixer.h
浏览该文件的文档.
1 /*
2  * Copyright (C) 2015-2017 Alibaba Group Holding Limited
3  */
4 
5 #ifndef SOUND_CONTROL_H
6 #define SOUND_CONTROL_H
7 
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <fcntl.h>
11 #include <stdarg.h>
12 #include <string.h>
13 #include <errno.h>
14 #include <unistd.h>
15 #include <aos/list.h>
16 #include <aos/kernel.h>
17 #ifndef HAAS_AUDIO_DEMO
18 #include <sys/ioctl.h>
19 #endif
20 #include "audio_drv.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
40 /* 音频mixer设备节点描述信息 */
41 typedef struct {
42  int fd;
43  int card;
44  char *name;
45  struct audio_ctl_card_info card_info;
46  struct audio_ctl_elem_info *elem_info;
47  unsigned int count;
48 } aos_mixer_t;
49 
58 int aos_mixer_open(aos_mixer_t **mixer, int card);
59 
68 
78 int aos_mixer_set_int_value(aos_mixer_t *mixer, char *name, int value);
79 
89 int aos_mixer_get_int_value(aos_mixer_t *mixer, char *name, int *value);
90 
99 
107 int aos_set_master_volume(int volume);
108 
116 int aos_get_master_volume(int *volume);
117 
125 int aos_set_mute_state(int mute);
126 
134 int aos_get_mute_state(int *mute);
135 
140 #ifdef __cplusplus
141 }
142 #endif
143 #endif /* SOUND_CONTROL_H */
int aos_mixer_get_int_value(aos_mixer_t *mixer, char *name, int *value)
int aos_set_master_volume(int volume)
int aos_mixer_print_info(aos_mixer_t *mixer)
int aos_mixer_set_int_value(aos_mixer_t *mixer, char *name, int value)
int aos_set_mute_state(int mute)
int aos_mixer_open(aos_mixer_t **mixer, int card)
int aos_get_master_volume(int *volume)
int aos_get_mute_state(int *mute)
int aos_mixer_close(aos_mixer_t *mixer)
unsigned int count
Definition: sound_mixer.h:47
struct audio_ctl_elem_info * elem_info
Definition: sound_mixer.h:46