Handle streams separately in tree_add_track()
[cmus.git] / output.h
blobaf5e3e32fe6040a004bc0007b597e9617d059ea5
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);
77 void op_add_options(void);
78 char *op_get_error_msg(int rc, const char *arg);
79 void op_dump_plugins(void);
80 const char *op_get_current(void);
82 #endif