diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-10-26 02:04:44 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-10-26 02:04:44 +0200 |
commit | f0fc782355d3cf567694e096828a9c6bf177837e (patch) | |
tree | 99c8765af81ca8b7d78e43cca5e46c2c35d96a41 /sbc/sbcenc.c | |
parent | 0242f1216747b69686ae11fdb1de6f6badfc1f3a (diff) |
Let the decoder write Sun/NeXT audio S16_BE files
Diffstat (limited to 'sbc/sbcenc.c')
-rw-r--r-- | sbc/sbcenc.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/sbc/sbcenc.c b/sbc/sbcenc.c index 6a5dde76..38670a94 100644 --- a/sbc/sbcenc.c +++ b/sbc/sbcenc.c @@ -33,41 +33,10 @@ #include <stdint.h> #include <string.h> #include <getopt.h> -#include <byteswap.h> #include <sys/stat.h> #include "sbc.h" - -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define COMPOSE_ID(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24)) -#define LE_SHORT(v) (v) -#define LE_INT(v) (v) -#define BE_SHORT(v) bswap_16(v) -#define BE_INT(v) bswap_32(v) -#elif __BYTE_ORDER == __BIG_ENDIAN -#define COMPOSE_ID(a,b,c,d) ((d) | ((c)<<8) | ((b)<<16) | ((a)<<24)) -#define LE_SHORT(v) bswap_16(v) -#define LE_INT(v) bswap_32(v) -#define BE_SHORT(v) (v) -#define BE_INT(v) (v) -#else -#error "Wrong endian" -#endif - -#define AU_MAGIC COMPOSE_ID('.','s','n','d') - -#define AU_FMT_ULAW 1 -#define AU_FMT_LIN8 2 -#define AU_FMT_LIN16 3 - -struct au_header { - uint32_t magic; /* '.snd' */ - uint32_t hdr_size; /* size of header (min 24) */ - uint32_t data_size; /* size of data */ - uint32_t encoding; /* see to AU_FMT_XXXX */ - uint32_t sample_rate; /* sample rate */ - uint32_t channels; /* number of channels (voices) */ -}; +#include "formats.h" static ssize_t __read(int fd, void *buf, size_t count) { |