lirc anc lircc are MPlayer-only, so add LDFLAGS for MPlayer link only.
[mplayer/glamo.git] / stream / audio_in.h
blob855d613964db84eefe5273ae94df798c58b4dc85
1 #ifndef MPLAYER_AUDIO_IN_H
2 #define MPLAYER_AUDIO_IN_H
4 #define AUDIO_IN_ALSA 1
5 #define AUDIO_IN_OSS 2
7 #include "config.h"
9 #ifdef CONFIG_ALSA
10 #include <alsa/asoundlib.h>
12 typedef struct {
13 char *device;
15 snd_pcm_t *handle;
16 snd_output_t *log;
17 int buffer_time, period_time, chunk_size;
18 size_t bits_per_sample, bits_per_frame;
19 } ai_alsa_t;
20 #endif
22 #ifdef CONFIG_OSS_AUDIO
23 typedef struct {
24 char *device;
26 int audio_fd;
27 } ai_oss_t;
28 #endif
30 typedef struct
32 int type;
33 int setup;
35 /* requested values */
36 int req_channels;
37 int req_samplerate;
39 /* real values read-only */
40 int channels;
41 int samplerate;
42 int blocksize;
43 int bytes_per_sample;
44 int samplesize;
46 #ifdef CONFIG_ALSA
47 ai_alsa_t alsa;
48 #endif
49 #ifdef CONFIG_OSS_AUDIO
50 ai_oss_t oss;
51 #endif
52 } audio_in_t;
54 int audio_in_init(audio_in_t *ai, int type);
55 int audio_in_setup(audio_in_t *ai);
56 int audio_in_set_device(audio_in_t *ai, char *device);
57 int audio_in_set_samplerate(audio_in_t *ai, int rate);
58 int audio_in_set_channels(audio_in_t *ai, int channels);
59 int audio_in_uninit(audio_in_t *ai);
60 int audio_in_start_capture(audio_in_t *ai);
61 int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer);
63 #ifdef CONFIG_ALSA
64 int ai_alsa_setup(audio_in_t *ai);
65 int ai_alsa_init(audio_in_t *ai);
66 int ai_alsa_xrun(audio_in_t *ai);
67 #endif
69 #ifdef CONFIG_OSS_AUDIO
70 int ai_oss_set_samplerate(audio_in_t *ai);
71 int ai_oss_set_channels(audio_in_t *ai);
72 int ai_oss_init(audio_in_t *ai);
73 #endif
75 #endif /* MPLAYER_AUDIO_IN_H */