Added vorbis-tools.
[vorbis-lancer-gcc.git] / vorbis-tools-1.2.0 / ogg123 / audio.h
blob9f4593483a945bbb30fdaca892965712c9f3b183
1 /********************************************************************
2 * *
3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
5 * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *
6 * PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
7 * *
8 * THE Ogg123 SOURCE CODE IS (C) COPYRIGHT 2000-2001 *
9 * by Stan Seibert <volsung@xiph.org> AND OTHER CONTRIBUTORS *
10 * http://www.xiph.org/ *
11 * *
12 ********************************************************************
14 last mod: $Id: audio.h,v 1.2 2001/12/19 02:52:53 volsung Exp $
16 ********************************************************************/
18 /* ogg123's audio playback functions */
20 #ifndef __AUDIO_H__
21 #define __AUDIO_H__
23 #include <ao/ao.h>
26 typedef struct audio_format_t {
27 int big_endian;
28 int word_size;
29 int signed_sample;
30 int rate;
31 int channels;
32 } audio_format_t;
35 /* For facilitating output to multiple devices */
36 typedef struct audio_device_t {
37 int driver_id;
38 ao_device *device;
39 ao_option *options;
40 char *filename;
41 struct audio_device_t *next_device;
42 } audio_device_t;
45 int audio_format_equal (audio_format_t *a, audio_format_t *b);
46 audio_device_t *append_audio_device(audio_device_t *devices_list,
47 int driver_id,
48 ao_option *options, char *filename);
49 void audio_devices_print_info(audio_device_t *d);
50 int audio_devices_write(audio_device_t *d, void *ptr, int nbytes);
51 int add_ao_option(ao_option **op_h, const char *optstring);
52 void close_audio_devices (audio_device_t *devices);
53 void free_audio_devices (audio_device_t *devices);
54 void ao_onexit (void *arg);
56 #endif /* __AUDIO_H__ */