diff options
author | waker <wakeroid@gmail.com> | 2010-11-21 22:43:15 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2010-11-21 22:43:15 +0100 |
commit | a8e25c3e6edd1bcd7feccbc3c93765f6a70e20ed (patch) | |
tree | e116d6e8676f44e89140ea0df91cb1a7a53650f3 /deadbeef.h | |
parent | a540df0dcbd66f9e178603db1081cef64d1f7db1 (diff) |
moved libsamplerate code to separate plugin
Diffstat (limited to 'deadbeef.h')
-rw-r--r-- | deadbeef.h | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -740,8 +740,14 @@ typedef struct DB_output_s { } DB_output_t; // dsp plugin +#define DDB_INIT_DSP_INSTANCE(var,type) {\ + memset(var,0,sizeof(type));\ + strncpy (var->inst.id, id, 9);\ + var->inst.id[9]=0;\ +} typedef struct DB_dsp_instance_s { + char id[10]; struct DB_dsp_instance_s *next; unsigned enabled : 1; } DB_dsp_instance_t; @@ -749,15 +755,16 @@ typedef struct DB_dsp_instance_s { typedef struct DB_dsp_s { DB_plugin_t plugin; - DB_dsp_instance_t (*open) (void); + // id is a unique name used to get configuration settings + DB_dsp_instance_t* (*open) (const char *id); void (*close) (DB_dsp_instance_t *inst); - // process gets called before SRC - // stereo samples are stored in interleaved format - // stereo sample is counted as 1 sample + // samples are interleaved + // returned value is number of output frames int (*process) (DB_dsp_instance_t *inst, float *samples, int frames, int channels); } DB_dsp_t; + // misc plugin // purpose is to provide extra services // e.g. scrobbling, converting, tagging, custom gui, etc. |