File: sndconfig.h

package info (click to toggle)
mixviews 1.20-10.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,928 kB
  • ctags: 5,960
  • sloc: cpp: 32,879; ansic: 2,110; makefile: 445; sh: 17
file content (107 lines) | stat: -rw-r--r-- 3,532 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// sndconfig.h

/******************************************************************************
 *
 *  MiXViews - an X window system based sound & data editor/processor
 *
 *  Copyright (c) 1993, 1994 Regents of the University of California
 *
 *  Author:     Douglas Scott
 *  Date:       December 13, 1994
 *
 *  Permission to use, copy and modify this software and its documentation
 *  for research and/or educational purposes and without fee is hereby granted,
 *  provided that the above copyright notice appear in all copies and that
 *  both that copyright notice and this permission notice appear in
 *  supporting documentation. The author reserves the right to distribute this
 *  software and its documentation.  The University of California and the author
 *  make no representations about the suitability of this software for any 
 *  purpose, and in no event shall University of California be liable for any
 *  damage, loss of data, or profits resulting from its use.
 *  It is provided "as is" without express or implied warranty.
 *
 ******************************************************************************/


// defines for determining soundfile and converter formats based upon the
// architecture and some user-set defines.

#ifndef SNDCONFIG_H
#define SNDCONFIG_H

#if defined(sparc) && !defined(linux)
#undef USE_NeXT_HEADERS		/* for NeXT header compatibility */
#define USE_SPARC_HEADERS		/* for SPARC .au headers only */
#endif	/* sparc */

#if defined(USE_NeXT_HEADERS) || defined(NeXT)
#define SOUND_SUFFIX ".snd"
#define SOUND_FLOAT_SUFFIX ".fp"
#define SOUND_DEFAULT_RATE 44100
#define SOUND_DEFAULT_TYPE ShortData
#define HEADER_DEFAULT_TYPE Hybrid
#elif defined(USE_SPARC_HEADERS)
#define SOUND_SUFFIX ".au"
#define SOUND_FLOAT_SUFFIX ".fp"
#define SOUND_DEFAULT_RATE 8000
#define SOUND_DEFAULT_TYPE MuLawData
#define HEADER_DEFAULT_TYPE Snd
#elif defined(AIFF_AUDIO)
#define SOUND_SUFFIX ".aifc"
#define SOUND_FLOAT_SUFFIX ".fp"
#define SOUND_DEFAULT_RATE 44100
#define SOUND_DEFAULT_TYPE ShortData
#define HEADER_DEFAULT_TYPE Aifc
#elif defined(VOXWARE_DACS)
#define SOUND_SUFFIX ".wav"
#define SOUND_FLOAT_SUFFIX ".fp"
#define SOUND_DEFAULT_RATE 11025
#define SOUND_DEFAULT_TYPE UnsignedCharData
#define HEADER_DEFAULT_TYPE Wave
#else
#define SOUND_SUFFIX ".short"
#define SOUND_FLOAT_SUFFIX ".fp"
#define SOUND_DEFAULT_RATE 44100
#define SOUND_DEFAULT_TYPE ShortData
#define HEADER_DEFAULT_TYPE Ircam
#endif

#if defined(NeXT) || defined(USE_NeXT_HEADERS)

#include "next_sound.h"
#define SOUNDSTRUCT_H
#define DOUBLE_FORMAT SND_FORMAT_DOUBLE
#define FLOAT_FORMAT SND_FORMAT_FLOAT
#define INT_FORMAT SND_FORMAT_LINEAR_32
#define SHORT_FORMAT SND_FORMAT_LINEAR_16
#define MULAW_FORMAT SND_FORMAT_MULAW_8
#define ALAW_FORMAT (27) /* SND_FORMAT_ALAW_8 */
#define CHAR_FORMAT	SND_FORMAT_LINEAR_8

#elif defined(sparc) && defined(USE_SPARC_HEADERS)

#include <multimedia/audio_filehdr.h>
#define AUDIO_FILEHDR_H
#define DOUBLE_FORMAT (7)
#define FLOAT_FORMAT AUDIO_FILE_ENCODING_FLOAT
#define SHORT_FORMAT AUDIO_FILE_ENCODING_LINEAR_16
#define INT_FORMAT AUDIO_FILE_ENCODING_LINEAR_32
#define MULAW_FORMAT AUDIO_FILE_ENCODING_MULAW_8
#define ALAW_FORMAT (27)
#define CHAR_FORMAT	AUDIO_FILE_ENCODING_LINEAR_8

#else

// these macros taken from NeXT header files -- hope they don't change.

#define DOUBLE_FORMAT (7)
#define FLOAT_FORMAT (6)
#define INT_FORMAT (5)
#define SHORT_FORMAT (3)
#define CHAR_FORMAT (2)
#define MULAW_FORMAT (1)
#define ALAW_FORMAT (27)

#endif

#endif /* SNDCONFIG_H */