aac: Collect all interesting ID3 frames
[cmus.git] / output.h
blob2aecaa7fadcf268fd259cb7103cea24cae0866a3
1 /*
2 * Copyright 2005 Timo Hirvonen
3 */
5 #ifndef _OUTPUT_H
6 #define _OUTPUT_H
8 #include "mixer.h"
9 #include "op.h"
10 #include "sf.h"
12 extern int volume_max;
13 extern int volume_l;
14 extern int volume_r;
16 void op_load_plugins(void);
17 void op_exit_plugins(void);
20 * select output plugin and open its mixer
22 * errors: OP_ERROR_{ERRNO, NO_PLUGIN}
24 int op_select(const char *name);
25 int op_select_any(void);
28 * open selected plugin
30 * errors: OP_ERROR_{}
32 int op_open(sample_format_t sf);
35 * drop pcm data
37 * errors: OP_ERROR_{ERRNO}
39 int op_drop(void);
42 * close plugin
44 * errors: OP_ERROR_{}
46 int op_close(void);
49 * returns bytes written or error
51 * errors: OP_ERROR_{ERRNO}
53 int op_write(const char *buffer, int count);
56 * errors: OP_ERROR_{}
58 int op_pause(void);
59 int op_unpause(void);
62 * returns space in output buffer in bytes or -1 if busy
64 int op_buffer_space(void);
67 * errors: OP_ERROR_{}
69 int op_reset(void);
71 void mixer_open(void);
72 void mixer_close(void);
73 int mixer_set_volume(int left, int right);
74 int mixer_read_volume(void);
75 int mixer_get_fds(int *fds);
78 * errors: OP_ERROR_{NO_PLUGIN, NOT_INITIALIZED, NOT_OPTION}
80 int op_set_option(unsigned int id, const char *val);
81 int op_get_option(unsigned int id, char **val);
83 int op_for_each_option(void (*cb)(unsigned int id, const char *key));
84 char *op_get_error_msg(int rc, const char *arg);
85 void op_dump_plugins(void);
86 char *op_get_current(void);
88 #endif