From 150c23c7abdc3b915ff3763d639768e081af7759 Mon Sep 17 00:00:00 2001 From: musil Date: Thu, 11 Dec 2008 19:38:44 +0000 Subject: soundfile_info puts out a 8th float: format code svn path=/trunk/externals/iemlib/; revision=10445 --- iemlib1/src/iemlib1.c | 2 +- iemlib1/src/soundfile_info.c | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'iemlib1/src') diff --git a/iemlib1/src/iemlib1.c b/iemlib1/src/iemlib1.c index f7123d2..811b545 100644 --- a/iemlib1/src/iemlib1.c +++ b/iemlib1/src/iemlib1.c @@ -75,6 +75,6 @@ void iemlib1_setup(void) v2db_setup(); vcf_filter_tilde_setup(); - post("iemlib1 (R-1.17) library loaded! (c) Thomas Musil 03.2008"); + post("iemlib1 (R-1.17) library loaded! (c) Thomas Musil 11.2008"); post(" musil%ciem.at iem KUG Graz Austria", '@'); } diff --git a/iemlib1/src/soundfile_info.c b/iemlib1/src/soundfile_info.c index 2b0903d..1a84403 100644 --- a/iemlib1/src/soundfile_info.c +++ b/iemlib1/src/soundfile_info.c @@ -1,7 +1,7 @@ /* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. -iemlib1 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ +iemlib1 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2008 */ #include "m_pd.h" #include "iemlib.h" @@ -17,8 +17,9 @@ iemlib1 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 #define SFI_HEADER_CHANNELS 4 #define SFI_HEADER_BYTES_PER_SAMPLE 5 #define SFI_HEADER_ENDINESS 6 +#define SFI_HEADER_FORMAT_CODE 7 -#define SFI_HEADER_SIZE 7 +#define SFI_HEADER_SIZE 8 @@ -143,16 +144,17 @@ soundfile_info_fmt: cvec += 4; ss = soundfile_info_str2short(cvec); /* format */ - if(ss != 1) /* PCM = 1 */ + if((ss != 1) && (ss != 3) && (ss != 6) && (ss != 7)) /* PCM = 1 ; IEEE-FLOAT = 3 ; ALAW = 6 ; MULAW = 7 */ { - post("soundfile_info_read-error: %s is not PCM-format coded", completefilename); + post("soundfile_info_read-error: %s has unknown format code", completefilename); goto soundfile_info_end; } + SETFLOAT(x->x_atheader+SFI_HEADER_FORMAT_CODE, (t_float)ss); header_size += 2; cvec += 2; ss = soundfile_info_str2short(cvec); /* channels */ - if((ss < 1) || (ss > 100)) + if((ss < 1) || (ss > 1000)) { post("soundfile_info_read-error: %s has no common channel-number", completefilename); goto soundfile_info_end; -- cgit v1.2.1