[PlanetCCRMA] sndfile-resample fixed (updated libsndfile)
Erik de Castro Lopo
erikd@mega-nerd.com
Mon Jun 21 11:32:00 2004
This is a multi-part message in MIME format.
--Multipart=_Mon__21_Jun_2004_22_22_43_+1000_MvpXvyB6lvOy9.kJ
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On Mon, 21 Jun 2004 04:33:17 -0700 (PDT)
R Parker <rtp405@yahoo.com> wrote:
> Hi Erik and Fernando,
>
> libsndfile-1.0.10-1.rh90.ccrma
> libsndfile-devel-1.0.10-1.rh90.ccrma
>
> Looks like we've got a new problem. Converting from
> .aiff to -pcm24 .wav fails:
> [root@stepdaddy aiff]# sndfile-convert -pcm24
> hide.aiff hide.wav
>
> It just never does the conversion. Ctrl-c to get
> out... I tried with a couple files, both failed to
> convert from .aiff to .wav.
The following patch fixes things.
I really need to add tests for sndfile-convert (which was originally
designed as a demo app :-) ).
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo nospam@mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"Some people don't want genitalia shoved down their throats."
-- Rex Mossop, Australian football commentator and morals crusader
--Multipart=_Mon__21_Jun_2004_22_22_43_+1000_MvpXvyB6lvOy9.kJ
Content-Type: text/plain;
name="sndfile-convert-bugfix.diff"
Content-Disposition: attachment;
filename="sndfile-convert-bugfix.diff"
Content-Transfer-Encoding: 7bit
--- orig/MacOS9/sndfile.h
+++ mod/MacOS9/sndfile.h
@@ -198,6 +198,14 @@
SF_STR_DATE = 0x06
} ;
+/*
+** Use the following as the start and end index when doing metadata
+** transcoding.
+*/
+
+#define SF_STR_FIRST SF_STR_TITLE
+#define SF_STR_LAST SF_STR_DATE
+
enum
{ /* True and false */
SF_FALSE = 0,
--- orig/Win32/sndfile.h
+++ mod/Win32/sndfile.h
@@ -198,6 +198,14 @@
SF_STR_DATE = 0x06
} ;
+/*
+** Use the following as the start and end index when doing metadata
+** transcoding.
+*/
+
+#define SF_STR_FIRST SF_STR_TITLE
+#define SF_STR_LAST SF_STR_DATE
+
enum
{ /* True and false */
SF_FALSE = 0,
--- orig/examples/sndfile-convert.c
+++ mod/examples/sndfile-convert.c
@@ -295,10 +295,12 @@
{ const char *str ;
int k, err = 0 ;
- for (k = 1 ; err == 0 ; k++)
+ for (k = SF_STR_FIRST ; k <= SF_STR_FIRST ; k++)
{ str = sf_get_string (infile, k) ;
- err = sf_set_string (outfile, k, (str != NULL) ? str : "") ;
- }
+ if (str != NULL)
+ err = sf_set_string (outfile, k, str) ;
+ } ;
+
} /* copy_metadata */
static void
--- orig/src/sndfile.h.in
+++ mod/src/sndfile.h.in
@@ -202,6 +202,14 @@
SF_STR_DATE = 0x06
} ;
+/*
+** Use the following as the start and end index when doing metadata
+** transcoding.
+*/
+
+#define SF_STR_FIRST SF_STR_TITLE
+#define SF_STR_LAST SF_STR_DATE
+
enum
{ /* True and false */
SF_FALSE = 0,
--Multipart=_Mon__21_Jun_2004_22_22_43_+1000_MvpXvyB6lvOy9.kJ--