Don't allow saving if tracks are being added
[cmus.git] / output.h
blobe4c4a50748610b1772952554380a13c6b1da8660
1 /*
2 * Copyright 2005 Timo Hirvonen
3 */
5 #ifndef _OUTPUT_H
6 #define _OUTPUT_H
8 #include "sf.h"
10 extern int soft_vol;
11 extern int soft_vol_l;
12 extern int soft_vol_r;
14 void op_load_plugins(void);
15 void op_exit_plugins(void);
18 * select output plugin and open its mixer
20 * errors: OP_ERROR_{ERRNO, NO_PLUGIN}
22 int op_select(const char *name);
23 int op_select_any(void);
26 * open selected plugin
28 * errors: OP_ERROR_{}
30 int op_open(sample_format_t sf);
33 * drop pcm data
35 * errors: OP_ERROR_{ERRNO}
37 int op_drop(void);
40 * close plugin
42 * errors: OP_ERROR_{}
44 int op_close(void);
47 * returns bytes written or error
49 * errors: OP_ERROR_{ERRNO}
51 int op_write(const char *buffer, int count);
54 * errors: OP_ERROR_{}
56 int op_pause(void);
57 int op_unpause(void);
60 * returns space in output buffer in bytes or -1 if busy
62 int op_buffer_space(void);
65 * errors: OP_ERROR_{}
67 int op_reset(void);
69 int op_set_volume(int left, int right);
70 int op_get_volume(int *left, int *right);
72 void op_set_soft_vol(int soft);
75 * errors: OP_ERROR_{NO_PLUGIN, NOT_INITIALIZED, NOT_OPTION}
77 int op_set_option(unsigned int id, const char *val);
78 int op_get_option(unsigned int id, char **val);
80 int op_for_each_option(void (*cb)(unsigned int id, const char *key));
81 char *op_get_error_msg(int rc, const char *arg);
82 void op_dump_plugins(void);
83 char *op_get_current(void);
85 #endif