6
* $Id: glame_types.h,v 1.19 2001/10/06 23:08:55 richi Exp $
7
* Copyright (C) 2000 Alexander Ehlert, Richard Guenther, Daniel Kobras
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29
/* internal SAMPLE format and size.
30
* this should be changable w/o any code breakage!
33
/* The recommended buffer size is GLAME_WBUFSIZE, the minimum
34
* and maximum allowed sizes are GLAME_MIN_BUFSIZE and GLAME_MAX_BUFSIZE.
35
* These numbers are specified in number of samples. */
36
extern int _GLAME_WBUFSIZE;
37
#define GLAME_MIN_BUFSIZE (GLAME_WBUFSIZE/4)
38
#define GLAME_MAX_BUFSIZE (GLAME_WBUFSIZE*4)
39
#define GLAME_BULK_BUFSIZE (64*1024)
41
#define GLAME_DEFAULT_SAMPLERATE 44100
43
/* SAMPLE is defined by config.h now.
44
* typedef float SAMPLE; */
45
#define SAMPLE_SIZE ((long)sizeof(SAMPLE))
47
/* Sigh! Why is there no portable standard for those types? */
48
typedef signed char gl_s8; /* Hope this covers 'char is unsigned' case. */
49
typedef unsigned char gl_u8;
51
typedef signed short gl_s16;
52
typedef unsigned short gl_u16;
54
typedef signed int gl_s16;
55
typedef unsigned int gl_u16;
57
#error No 16 bit data type available.
60
typedef signed int gl_s32;
61
typedef unsigned int gl_u32;
62
#elif SIZEOF_LONG == 4
63
typedef signed long gl_s32;
64
typedef unsigned long gl_u32;
66
#error No 32 bit data type available.
68
/* Add when needed. Beware: long long is a GNU extension! */
70
typedef signed long gl_s64;
71
typedef unsigned long gl_u64;
72
#elif SIZEOF_LONG_LONG == 8
73
typedef signed long long gl_s64;
74
typedef unsigned long long gl_u64;
76
#error No 64 bit data type available.