Skip to content

Latest commit

 

History

History
57 lines (44 loc) · 1.59 KB

output.h

File metadata and controls

57 lines (44 loc) · 1.59 KB
 
Oct 18, 2017
Oct 18, 2017
1
2
/*
Oct 21, 1999
Oct 21, 1999
3
4
5
6
TiMidity -- Experimental MIDI to WAVE converter
Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi>
This program is free software; you can redistribute it and/or modify
Dec 31, 2011
Dec 31, 2011
7
it under the terms of the Perl Artistic License, available in COPYING.
Oct 18, 2017
Oct 18, 2017
8
9
10
11
output.h
*/
Oct 21, 1999
Oct 21, 1999
12
13
14
15
16
17
/* Data format encoding bits */
#define PE_MONO 0x01 /* versus stereo */
#define PE_SIGNED 0x02 /* versus unsigned */
#define PE_16BIT 0x04 /* versus 8-bit */
Oct 21, 2017
Oct 21, 2017
18
#define PE_32BIT 0x08 /* versus 8-bit or 16-bit */
Oct 21, 1999
Oct 21, 1999
19
Oct 18, 2017
Oct 18, 2017
20
/* Conversion functions -- These overwrite the Sint32 data in *lp with
Oct 21, 1999
Oct 21, 1999
21
22
23
data in another format */
/* 8-bit signed and unsigned*/
Oct 18, 2017
Oct 18, 2017
24
25
extern void s32tos8(void *dp, Sint32 *lp, Sint32 c);
extern void s32tou8(void *dp, Sint32 *lp, Sint32 c);
Oct 21, 1999
Oct 21, 1999
26
27
/* 16-bit */
Oct 18, 2017
Oct 18, 2017
28
29
extern void s32tos16(void *dp, Sint32 *lp, Sint32 c);
extern void s32tou16(void *dp, Sint32 *lp, Sint32 c);
Oct 21, 1999
Oct 21, 1999
30
31
/* byte-exchanged 16-bit */
Oct 18, 2017
Oct 18, 2017
32
33
extern void s32tos16x(void *dp, Sint32 *lp, Sint32 c);
extern void s32tou16x(void *dp, Sint32 *lp, Sint32 c);
Oct 21, 1999
Oct 21, 1999
34
Oct 21, 2017
Oct 21, 2017
35
36
37
38
39
40
41
/* 32-bit */
extern void s32tof32(void *dp, Sint32 *lp, Sint32 c);
extern void s32tos32(void *dp, Sint32 *lp, Sint32 c);
/* byte-exchanged 32-bit */
extern void s32tos32x(void *dp, Sint32 *lp, Sint32 c);
Oct 21, 1999
Oct 21, 1999
42
/* little-endian and big-endian specific */
Apr 30, 2006
Apr 30, 2006
43
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
Oct 21, 1999
Oct 21, 1999
44
45
#define s32tos16l s32tos16
#define s32tos16b s32tos16x
Oct 21, 2017
Oct 21, 2017
46
47
48
49
#define s32tou16l s32tou16
#define s32tou16b s32tou16x
#define s32tos32l s32tos32
#define s32tos32b s32tos32x
Oct 21, 1999
Oct 21, 1999
50
51
52
#else
#define s32tos16l s32tos16x
#define s32tos16b s32tos16
Oct 21, 2017
Oct 21, 2017
53
54
55
56
#define s32tou16l s32tou16x
#define s32tou16b s32tou16
#define s32tos32l s32tos32x
#define s32tos32b s32tos32
Oct 21, 1999
Oct 21, 1999
57
#endif