aboutsummaryrefslogtreecommitdiff
path: root/signal/stream.h
blob: 331cf302b4217af8790a8ee31283731e9ee260ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* (C) Guenter Geiger 1999 */

#define SF_FLOAT  1
#define SF_DOUBLE 2
#define SF_8BIT   10
#define SF_16BIT  11
#define SF_32BIT  12
#define SF_ALAW   20
#define SF_MP3    30

#define SF_SIZEOF(a) (a == SF_FLOAT ? sizeof(t_float) : \
                     a == SF_16BIT ? sizeof(short) : 1)



typedef struct _tag {      /* size (bytes) */
     char version;         /*    1         */
     char format;          /*    1         */
     int count;            /*    4         */
     char channels;        /*    1         */
     int framesize;        /*    4         */
     char  extension[5];   /*    5         */
} t_tag;                   /*--------------*/
                           /*   16         */


typedef struct _frame {
     t_tag  tag;
     char*  data;
} t_frame;