summaryrefslogtreecommitdiff
path: root/deadbeef.h
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-09-16 21:27:08 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-09-16 21:27:08 +0200
commit6d505b25848c8db7363e54a6902aebc859f53bc7 (patch)
treeea8bd4b5d748f61c838214de550997d734c95aec /deadbeef.h
parent743cf8e3a236a18080de2fb9467185d54e60afe4 (diff)
gapless playback 2nd iteration - sample-accurate seeking on flac and ape
Diffstat (limited to 'deadbeef.h')
-rw-r--r--deadbeef.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/deadbeef.h b/deadbeef.h
index fc9fd897..05fb499c 100644
--- a/deadbeef.h
+++ b/deadbeef.h
@@ -54,7 +54,7 @@ extern "C" {
// DON'T release plugins without DB_PLUGIN_SET_API_VERSION
#define DB_API_VERSION_MAJOR 0
-#define DB_API_VERSION_MINOR 1
+#define DB_API_VERSION_MINOR 2
#define DB_PLUGIN_SET_API_VERSION\
.plugin.api_vmajor = DB_API_VERSION_MAJOR,\
@@ -64,11 +64,13 @@ extern "C" {
// playlist structures
// playlist item
-// there are "public" fields, available to plugins
+// these are "public" fields, available to plugins
typedef struct {
char *fname; // full pathname
struct DB_decoder_s *decoder; // codec to use with this file
int tracknum; // used for stuff like sid, nsf, cue (will be ignored by most codecs)
+ int startsample;
+ int endsample;
float timestart; // start time of cue track, or -1
float timeend; // end time of cue track, or -1
float duration; // in seconds
@@ -164,8 +166,8 @@ typedef struct {
void (*pl_add_meta) (DB_playItem_t *it, const char *key, const char *value);
const char *(*pl_find_meta) (DB_playItem_t *song, const char *meta);
// cuesheet support
- DB_playItem_t *(*pl_insert_cue_from_buffer) (DB_playItem_t *after, const char *fname, const uint8_t *buffer, int buffersize, struct DB_decoder_s *decoder, const char *ftype, float duration);
- DB_playItem_t * (*pl_insert_cue) (DB_playItem_t *after, const char *filename, struct DB_decoder_s *decoder, const char *ftype, float duration);
+ DB_playItem_t *(*pl_insert_cue_from_buffer) (DB_playItem_t *after, const char *fname, const uint8_t *buffer, int buffersize, struct DB_decoder_s *decoder, const char *ftype, int numsamples, int samplerate);
+ DB_playItem_t * (*pl_insert_cue) (DB_playItem_t *after, const char *filename, struct DB_decoder_s *decoder, const char *ftype, int numsamples, int samplerate);
// volume control
void (*volume_set_db) (float dB);
float (*volume_get_db) (void);
@@ -239,7 +241,7 @@ typedef struct DB_decoder_s {
// perform seeking in samples (if possible)
// return -1 if failed, or 0 on success
// if -1 is returned, that will mean that streamer must skip that song
- int (*seek_sample) (int64_t samples);
+ int (*seek_sample) (int sample);
// 'insert' is called to insert new item to playlist
// decoder is responsible to calculate duration, split it into subsongs, load cuesheet, etc