ref: 779fd7d2ad35da56ec45f1f9bba9789ffed59f49
parent: 36a3fc784e78cb877fb88f15b64ab915255b3a91
author: robs <robs>
date: Thu Feb 8 03:45:11 EST 2007
Attempt to sort out signal.size problems - please check
--- a/src/au.c
+++ b/src/au.c
@@ -61,7 +61,7 @@
static void auwriteheader(ft_t ft, st_size_t data_size);
-static int st_auencodingandsize(int sun_encoding, st_encoding_t * encoding, signed char *size)
+static int st_auencodingandsize(int sun_encoding, st_encoding_t * encoding, int * size)
{
switch (sun_encoding) {
case SUN_ULAW:
--- a/src/sndfile.c
+++ b/src/sndfile.c
@@ -71,8 +71,10 @@
*size = ST_SIZE_64BIT;
return ST_ENCODING_FLOAT;
case SF_FORMAT_ULAW:
+ *size = ST_SIZE_8BIT;
return ST_ENCODING_ULAW;
case SF_FORMAT_ALAW:
+ *size = ST_SIZE_8BIT;
return ST_ENCODING_ALAW;
case SF_FORMAT_IMA_ADPCM:
return ST_ENCODING_IMA_ADPCM;
--- a/src/st.h
+++ b/src/st.h
@@ -198,7 +198,7 @@
typedef struct st_signalinfo
{
st_rate_t rate; /* sampling rate */
- signed char size; /* word length of data */
+ int size; /* compressed or uncompressed datum size */
st_encoding_t encoding; /* format of sample numbers */
unsigned channels; /* number of sound channels */
double compression; /* compression factor (where applicable) */