From 22f1fce330059ef8a383cf327a023d6a9da5ad3e Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 15 Feb 2016 02:44:20 +0100 Subject: Include toolame-dab as library --- libtoolame-dab/audio_read.h | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 libtoolame-dab/audio_read.h (limited to 'libtoolame-dab/audio_read.h') diff --git a/libtoolame-dab/audio_read.h b/libtoolame-dab/audio_read.h new file mode 100644 index 0000000..215e89d --- /dev/null +++ b/libtoolame-dab/audio_read.h @@ -0,0 +1,48 @@ +/* AIFF Definitions */ + +#define IFF_ID_FORM 0x464f524d /* "FORM" */ +#define IFF_ID_AIFF 0x41494646 /* "AIFF" */ +#define IFF_ID_COMM 0x434f4d4d /* "COMM" */ +#define IFF_ID_SSND 0x53534e44 /* "SSND" */ +#define IFF_ID_MPEG 0x4d504547 /* "MPEG" */ + +#define AIFF_FORM_HEADER_SIZE 12 +#define AIFF_SSND_HEADER_SIZE 16 + + +typedef struct blockAlign_struct +{ + unsigned long offset; + unsigned long blockSize; +} +blockAlign; + +typedef struct IFF_AIFF_struct +{ + short numChannels; + unsigned long numSampleFrames; + short sampleSize; + double sampleRate; + unsigned long sampleType; + blockAlign blkAlgn; +} +IFF_AIFF; + +#if defined(JACK_INPUT) +void setup_jack(frame_header *header, const char* jackname); +int process(jack_nframes_t nframes, void *arg); +#endif +void jack_shutdown(void *arg); + +void parse_input_file (FILE *musicin, char *, frame_header *header, unsigned long *num_samples); +void aiff_check (char *file_name, IFF_AIFF * pcm_aiff_data, int *version); + +int aiff_read_headers (FILE *, IFF_AIFF *); +int aiff_seek_to_sound_data (FILE *); +enum byte_order DetermineByteOrder (void); +void SwapBytesInWords (short *loc, int words); + unsigned long read_samples (music_in_t*, short[2304], unsigned long, + unsigned long); + unsigned long get_audio (music_in_t*, short[2][1152], unsigned long, + int, frame_header *header); + -- cgit v1.2.3