mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 15:49:36 +02:00
managed patch for libsndfile to support Album and Track tags in WAV files, created by Joel Bouchat <bouchat@hotmail.com>. This patch is on it's way upstream from the author
This commit is contained in:
parent
8867d65df8
commit
1351caba69
@ -105,8 +105,13 @@ Version in Audacity SVN: 1.0.24
|
||||
Patches: maintainer-mode.patch: AM_MAINTAINER_MODE added to configure.ac
|
||||
id3.patch: already in upstream 1.0.26 (git 41da64d9270b2fa10c93ce74dea014fe8f0bd303)
|
||||
fixes crash when importing mp3s that have duplicated tags
|
||||
libsndfile-ppc-crash-on-some-id3-mp3s.patch - submitted to libsndfile
|
||||
list on may 22 2012 (mchinen)
|
||||
libsndfile-ppc-crash-on-some-id3-mp3s.patch - submitted to libsndfile
|
||||
list on may 22 2012 (mchinen)
|
||||
Add-support-for-Album-and-Track-tags-in-RIFF-files.patch
|
||||
Add support for Album and Track tags in RIFF files in the LIST chunk of WAV files.
|
||||
0001-Add-support-for-Album-and-Track-tags-in-RIFF-files-for-libsndfile-1.0.24.patch for libsndfile 1.0.24, and
|
||||
0001-Add-support-for-Album-and-Track-tags-in-RIFF-files-for-libsndfile-1.0.25.patch for libsndfile 1.0.25,
|
||||
submitted to libsndfile list on August 19 2012.
|
||||
|
||||
Upstream Version: 1.0.25
|
||||
|
||||
|
@ -0,0 +1,50 @@
|
||||
Index: src/wav.c
|
||||
===================================================================
|
||||
--- src/wav.c (revision 12460)
|
||||
+++ src/wav.c (working copy)
|
||||
@@ -89,6 +89,8 @@
|
||||
#define ISRC_MARKER (MAKE_MARKER ('I', 'S', 'R', 'C'))
|
||||
#define ISBJ_MARKER (MAKE_MARKER ('I', 'S', 'B', 'J'))
|
||||
#define ICMT_MARKER (MAKE_MARKER ('I', 'C', 'M', 'T'))
|
||||
+#define IAUT_MARKER (MAKE_MARKER ('I', 'A', 'U', 'T'))
|
||||
+#define ITRK_MARKER (MAKE_MARKER ('I', 'T', 'R', 'K'))
|
||||
|
||||
/* Weird WAVPACK marker which can show up at the start of the DATA section. */
|
||||
#define wvpk_MARKER (MAKE_MARKER ('w', 'v', 'p', 'k'))
|
||||
@@ -1208,6 +1210,14 @@
|
||||
psf_binheader_writef (psf, "ms", IGNR_MARKER, psf->strings [k].str) ;
|
||||
break ;
|
||||
|
||||
+ case SF_STR_ALBUM :
|
||||
+ psf_binheader_writef (psf, "ms", IPRD_MARKER, psf->strings [k].str) ;
|
||||
+ break ;
|
||||
+
|
||||
+ case SF_STR_TRACKNUMBER :
|
||||
+ psf_binheader_writef (psf, "ms", ITRK_MARKER, psf->strings [k].str) ;
|
||||
+ break ;
|
||||
+
|
||||
default :
|
||||
break ;
|
||||
} ;
|
||||
@@ -1338,6 +1348,8 @@
|
||||
case IPRD_MARKER :
|
||||
case ISBJ_MARKER :
|
||||
case ISRC_MARKER :
|
||||
+ case IAUT_MARKER :
|
||||
+ case ITRK_MARKER :
|
||||
bytesread += psf_binheader_readf (psf, "4", &dword) ;
|
||||
dword += (dword & 1) ;
|
||||
if (dword >= SIGNED_SIZEOF (psf->u.cbuf))
|
||||
@@ -1434,6 +1446,12 @@
|
||||
case IGNR_MARKER :
|
||||
psf_store_string (psf, SF_STR_GENRE, psf->u.cbuf) ;
|
||||
break ;
|
||||
+ case IPRD_MARKER :
|
||||
+ psf_store_string (psf, SF_STR_ALBUM, psf->u.cbuf) ;
|
||||
+ break ;
|
||||
+ case ITRK_MARKER :
|
||||
+ psf_store_string (psf, SF_STR_TRACKNUMBER, psf->u.cbuf) ;
|
||||
+ break ;
|
||||
} ;
|
||||
} ;
|
||||
|
@ -0,0 +1,63 @@
|
||||
>From 526864fc49542c8be0a117ae39c45902f86a4ccd Mon Sep 17 00:00:00 2001
|
||||
From: Richard Ash <richard@audacityteam.org>
|
||||
Date: Fri, 16 Aug 2013 22:40:15 +0100
|
||||
Subject: [PATCH] Add support for Album and Track tags in RIFF files
|
||||
Add support for Album and Track tags in RIFF files in the LIST chunk of WAV files
|
||||
as per other formats. Patch by Joel Bouchat <bouchat@hotmail.com> against
|
||||
libsndfile 1.0.24, forward-ported by Richard Ash
|
||||
|
||||
---
|
||||
src/wav.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/src/wav.c b/src/wav.c
|
||||
index daaba39..d28b18d 100644
|
||||
--- a/src/wav.c
|
||||
+++ b/src/wav.c
|
||||
@@ -104,6 +104,7 @@
|
||||
#define ISBJ_MARKER (MAKE_MARKER ('I', 'S', 'B', 'J'))
|
||||
#define ICMT_MARKER (MAKE_MARKER ('I', 'C', 'M', 'T'))
|
||||
#define IAUT_MARKER (MAKE_MARKER ('I', 'A', 'U', 'T'))
|
||||
+#define ITRK_MARKER (MAKE_MARKER ('I', 'T', 'R', 'K'))
|
||||
|
||||
/* Weird WAVPACK marker which can show up at the start of the DATA section. */
|
||||
#define wvpk_MARKER (MAKE_MARKER ('w', 'v', 'p', 'k'))
|
||||
@@ -1253,6 +1254,14 @@ wav_write_strings (SF_PRIVATE *psf, int location)
|
||||
psf_binheader_writef (psf, "ms", IGNR_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
|
||||
break ;
|
||||
|
||||
+ case SF_STR_ALBUM :
|
||||
+ psf_binheader_writef (psf, "ms", IPRD_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
|
||||
+ break ;
|
||||
+
|
||||
+ case SF_STR_TRACKNUMBER :
|
||||
+ psf_binheader_writef (psf, "ms", ITRK_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
|
||||
+ break ;
|
||||
+
|
||||
default :
|
||||
break ;
|
||||
} ;
|
||||
@@ -1384,6 +1393,7 @@ wav_subchunk_parse (SF_PRIVATE *psf, int chunk, uint32_t length)
|
||||
case ISBJ_MARKER :
|
||||
case ISRC_MARKER :
|
||||
case IAUT_MARKER :
|
||||
+ case ITRK_MARKER :
|
||||
bytesread += psf_binheader_readf (psf, "4", &dword) ;
|
||||
dword += (dword & 1) ;
|
||||
if (dword >= SIGNED_SIZEOF (buffer))
|
||||
@@ -1477,6 +1487,12 @@ wav_subchunk_parse (SF_PRIVATE *psf, int chunk, uint32_t length)
|
||||
case IGNR_MARKER :
|
||||
psf_store_string (psf, SF_STR_GENRE, buffer) ;
|
||||
break ;
|
||||
+ case IPRD_MARKER :
|
||||
+ psf_store_string (psf, SF_STR_ALBUM, buffer) ;
|
||||
+ break ;
|
||||
+ case ITRK_MARKER :
|
||||
+ psf_store_string (psf, SF_STR_TRACKNUMBER, buffer) ;
|
||||
+ break ;
|
||||
} ;
|
||||
} ;
|
||||
|
||||
--
|
||||
1.8.1.5
|
||||
|
@ -89,6 +89,8 @@
|
||||
#define ISRC_MARKER (MAKE_MARKER ('I', 'S', 'R', 'C'))
|
||||
#define ISBJ_MARKER (MAKE_MARKER ('I', 'S', 'B', 'J'))
|
||||
#define ICMT_MARKER (MAKE_MARKER ('I', 'C', 'M', 'T'))
|
||||
#define IAUT_MARKER (MAKE_MARKER ('I', 'A', 'U', 'T'))
|
||||
#define ITRK_MARKER (MAKE_MARKER ('I', 'T', 'R', 'K'))
|
||||
|
||||
/* Weird WAVPACK marker which can show up at the start of the DATA section. */
|
||||
#define wvpk_MARKER (MAKE_MARKER ('w', 'v', 'p', 'k'))
|
||||
@ -1208,6 +1210,14 @@ wav_write_strings (SF_PRIVATE *psf, int location)
|
||||
psf_binheader_writef (psf, "ms", IGNR_MARKER, psf->strings [k].str) ;
|
||||
break ;
|
||||
|
||||
case SF_STR_ALBUM :
|
||||
psf_binheader_writef (psf, "ms", IPRD_MARKER, psf->strings [k].str) ;
|
||||
break ;
|
||||
|
||||
case SF_STR_TRACKNUMBER :
|
||||
psf_binheader_writef (psf, "ms", ITRK_MARKER, psf->strings [k].str) ;
|
||||
break ;
|
||||
|
||||
default :
|
||||
break ;
|
||||
} ;
|
||||
@ -1338,6 +1348,8 @@ wav_subchunk_parse (SF_PRIVATE *psf, int chunk)
|
||||
case IPRD_MARKER :
|
||||
case ISBJ_MARKER :
|
||||
case ISRC_MARKER :
|
||||
case IAUT_MARKER :
|
||||
case ITRK_MARKER :
|
||||
bytesread += psf_binheader_readf (psf, "4", &dword) ;
|
||||
dword += (dword & 1) ;
|
||||
if (dword >= SIGNED_SIZEOF (psf->u.cbuf))
|
||||
@ -1434,6 +1446,12 @@ wav_subchunk_parse (SF_PRIVATE *psf, int chunk)
|
||||
case IGNR_MARKER :
|
||||
psf_store_string (psf, SF_STR_GENRE, psf->u.cbuf) ;
|
||||
break ;
|
||||
case IPRD_MARKER :
|
||||
psf_store_string (psf, SF_STR_ALBUM, psf->u.cbuf) ;
|
||||
break ;
|
||||
case ITRK_MARKER :
|
||||
psf_store_string (psf, SF_STR_TRACKNUMBER, psf->u.cbuf) ;
|
||||
break ;
|
||||
} ;
|
||||
} ;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user