2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_AUDIO_IN_H
20 #define MPLAYER_AUDIO_IN_H
22 #define AUDIO_IN_ALSA 1
23 #define AUDIO_IN_OSS 2
28 #include <alsa/asoundlib.h>
35 int buffer_time
, period_time
, chunk_size
;
36 size_t bits_per_sample
, bits_per_frame
;
40 #ifdef CONFIG_OSS_AUDIO
53 /* requested values */
57 /* real values read-only */
67 #ifdef CONFIG_OSS_AUDIO
72 int audio_in_init(audio_in_t
*ai
, int type
);
73 int audio_in_setup(audio_in_t
*ai
);
74 int audio_in_set_device(audio_in_t
*ai
, char *device
);
75 int audio_in_set_samplerate(audio_in_t
*ai
, int rate
);
76 int audio_in_set_channels(audio_in_t
*ai
, int channels
);
77 int audio_in_uninit(audio_in_t
*ai
);
78 int audio_in_start_capture(audio_in_t
*ai
);
79 int audio_in_read_chunk(audio_in_t
*ai
, unsigned char *buffer
);
82 int ai_alsa_setup(audio_in_t
*ai
);
83 int ai_alsa_init(audio_in_t
*ai
);
84 int ai_alsa_xrun(audio_in_t
*ai
);
87 #ifdef CONFIG_OSS_AUDIO
88 int ai_oss_set_samplerate(audio_in_t
*ai
);
89 int ai_oss_set_channels(audio_in_t
*ai
);
90 int ai_oss_init(audio_in_t
*ai
);
93 #endif /* MPLAYER_AUDIO_IN_H */