2
audio: audio output interface
4
copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
5
see COPYING and AUTHORS files in distribution or http://mpg123.de
6
initially written by Michael Hipp
14
#ifndef _MPG123_AUDIO_H_
15
#define _MPG123_AUDIO_H_
17
#define AUDIO_OUT_HEADPHONES 0x01
18
#define AUDIO_OUT_INTERNAL_SPEAKER 0x02
19
#define AUDIO_OUT_LINE_OUT 0x04
32
#define AUDIO_FORMAT_MASK 0x100
33
#define AUDIO_FORMAT_16 0x100
34
#define AUDIO_FORMAT_8 0x000
36
#define AUDIO_FORMAT_SIGNED_16 0x110
37
#define AUDIO_FORMAT_UNSIGNED_16 0x120
38
#define AUDIO_FORMAT_UNSIGNED_8 0x1
39
#define AUDIO_FORMAT_SIGNED_8 0x2
40
#define AUDIO_FORMAT_ULAW_8 0x4
41
#define AUDIO_FORMAT_ALAW_8 0x8
43
/* 3% rate tolerance */
44
#define AUDIO_RATE_TOLERANCE 3
48
struct audio_info_struct
50
int fn; /* filenumber */
51
void *handle; /* driver specific pointer */
70
/* ------ Declarations from "audio.c" ------ */
72
extern void audio_info_struct_init(struct audio_info_struct *);
73
extern void audio_info_struct_dump(struct audio_info_struct *ai);
74
extern void audio_capabilities(struct audio_info_struct *);
75
extern void audio_fit_capabilities(struct audio_info_struct *ai,int c,int r);
76
extern char *audio_encoding_name(int format);
79
/* ------ Declarations from "audio_*.c" ------ */
81
extern int audio_open(struct audio_info_struct *);
82
extern int audio_get_formats(struct audio_info_struct *);
83
extern int audio_play_samples(struct audio_info_struct *, unsigned char *,int);
84
extern void audio_queueflush(struct audio_info_struct *ai);
85
extern int audio_close(struct audio_info_struct *);