File: dwmix.h

package info (click to toggle)
ocp 1%3A0.1.21-1.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,344 kB
  • ctags: 7,862
  • sloc: ansic: 91,449; cpp: 9,729; sh: 3,119; makefile: 2,482
file content (61 lines) | stat: -rw-r--r-- 1,561 bytes parent folder | download | duplicates (9)
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
#ifndef _DWMIX_H
#define _DWMIX_H

/* This is channel options */
#define MIXRQ_PLAYING 1
#define MIXRQ_MUTE 2
#define MIXRQ_LOOPED 4
#define MIXRQ_PINGPONGLOOP 8
#define MIXRQ_PLAY16BIT 16
#define MIXRQ_INTERPOLATE 32
#define MIXRQ_INTERPOLATEMAX 64
#define MIXRQ_PLAYSTEREO 128 /* this flag is local to devwmix.c only */

#define MIXQ_PLAYING		MIXRQ_PLAYING
/*#define MIXQ_PAUSED		MIXRQ_MUTE       not used */
#define MIXQ_LOOPED		MIXRQ_LOOPED
#define MIXQ_PINGPONGLOOP	MIXRQ_PINGPONGLOOP
#define MIXQ_PLAY16BIT		MIXRQ_PLAY16BIT
#define MIXQ_INTERPOLATE	MIXRQ_INTERPOLATE
#define MIXQ_INTERPOLATEMAX	MIXRQ_INTERPOLATEMAX
#define MIXQ_PLAYSTEREO		MIXRQ_PLAYSTEREO /* this flag is local to devwmix.c only */

/* This is not a channel option, but a mixer option */
#define MIXRQ_RESAMPLE 1

struct channel
{
	void *samp;
	union
	{
		int8_t *bit8;
		int16_t *bit16;
		int32_t *bit32;
	} realsamp;
	uint32_t length;
	uint32_t loopstart;
	uint32_t loopend;
	uint32_t replen;
	int32_t step;
	uint32_t pos;
	uint16_t fpos;
	uint16_t status;
	int32_t curvols[4]; /* negativ volume = panning */
	int32_t dstvols[4]; /* -- " -- */

	int32_t vol[2];     /* -- " -- */
	int32_t orgvol[2];  /* -- " -- */
	uint32_t orgrate;
	uint32_t orgfrq;
	uint32_t orgdiv;
	int volopt;   /* only one flag:   0x01 srnd */
	int orgvolx;  /* 0 - 0x100 */
	int orgpan;   /* -0x80 - +0x7f */
	int samptype; /* samptype&mcpSampLoop mcpSampSLoop mcpSampSBiDi mcpSamp16Bit mcpSampStereo */
	uint32_t orgloopstart;
	uint32_t orgloopend;
	uint32_t orgsloopstart;
	uint32_t orgsloopend;
};

#endif