From 4f37ce04f6b3957673b7bd6b4044ddb5fd87382e Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 30 Jul 2008 09:02:31 +0000 Subject: [PATCH] gst-libs/gst/riff/riff-ids.h: Adding acid chunk for tempo and loop information. Original commit message from CVS: * gst-libs/gst/riff/riff-ids.h: Adding acid chunk for tempo and loop information. --- ChangeLog | 5 +++++ gst-libs/gst/riff/riff-ids.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/ChangeLog b/ChangeLog index ee82d9c..241682a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-30 Stefan Kost + + * gst-libs/gst/riff/riff-ids.h: + Adding acid chunk for tempo and loop information. + 2008-07-29 Stefan Kost * sys/xvimage/Makefile.am: diff --git a/gst-libs/gst/riff/riff-ids.h b/gst-libs/gst/riff/riff-ids.h index dcd3cee..cf45f6d 100644 --- a/gst-libs/gst/riff/riff-ids.h +++ b/gst-libs/gst/riff/riff-ids.h @@ -52,6 +52,7 @@ G_BEGIN_DECLS #define GST_RIFF_TAG_bext GST_MAKE_FOURCC ('b','e','x','t') #define GST_RIFF_TAG_BEXT GST_MAKE_FOURCC ('B','E','X','T') #define GST_RIFF_TAG_fact GST_MAKE_FOURCC ('f','a','c','t') +#define GST_RIFF_TAG_acid GST_MAKE_FOURCC ('a','c','i','d') /* LIST types */ #define GST_RIFF_LIST_movi GST_MAKE_FOURCC ('m','o','v','i') @@ -455,6 +456,41 @@ typedef struct _gst_riff_dmlh { guint32 totalframes; } gst_riff_dmlh; +/* taken from libsndfile/wav.c (LGPL) */ +typedef struct _gst_riff_acid { + /* 4 bytes (int) type of file: + * this appears to be a bit mask,however some combinations + * are probably impossible and/or qualified as "errors" + * + * 0x01 On: One Shot Off: Loop + * 0x02 On: Root note is Set Off: No root + * 0x04 On: Stretch is On, Off: Strech is OFF + * 0x08 On: Disk Based Off: Ram based + * 0x10 On: ?????????? Off: ????????? (Acidizer puts that ON) + */ + guint32 loop_type; + /* 2 bytes (short) root note + * if type 0x10 is OFF : [C,C#,(...),B] -> [0x30 to 0x3B] + * if type 0x10 is ON : [C,C#,(...),B] -> [0x3C to 0x47] + * (both types fit on same MIDI pitch albeit different octaves, so who cares) + */ + guint16 root_note; + /* 2 bytes (short) ??? always set to 0x8000 + * 4 bytes (float) ??? seems to be always 0 + */ + guint16 unknown1; + gfloat unknown2; + /* 4 bytes (int) number of beats + * 2 bytes (short) meter denominator //always 4 in SF/ACID + * 2 bytes (short) meter numerator //always 4 in SF/ACID + * //are we sure about the order?? usually its num/denom + * 4 bytes (float) tempo + */ + guint32 number_of_beats; + guint16 meter_d, meter_n; + gfloat tempo; +} gst_riff_acid; + G_END_DECLS #endif /* __GST_RIFF_IDS_H__ */ -- 2.7.4