File: ddksample.h

package info (click to toggle)
oss4 4.2-build2020-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,332 kB
  • sloc: ansic: 239,151; cpp: 18,981; sh: 4,590; pascal: 3,863; asm: 1,189; makefile: 553; php: 53; xml: 46
file content (49 lines) | stat: -rw-r--r-- 936 bytes parent folder | download | duplicates (3)
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
#ifndef _DDKSAMPLE_H
#define _DDKSAMPLE_H

// Audio engine (port) control structure.

#define MAX_SUBDEVICE	4

typedef struct
{
  int dev;
  int open_mode;		/* OPEN_READ | OPEN_WRITE */

  int speed;
  int channels;
  int format, bits;

  int prepare_flags;
  int audio_active;

  int timeout_value;
  timeout_id_t timeout_id;

  int left_volume, right_volume;
  int mute;
#define DDKSAMPLE_MAX_VOL	100

  int left_peak, right_peak;
} ddksample_portc;

// Device control structure
typedef struct
{
  oss_device_t *osdev;
  kmutex_t mutex;

  int mixer_dev;
  int mainvol_left, mainvol_right;

  int num_portc;
  ddksample_portc portc[MAX_SUBDEVICE];
  int audio_open_count;		/* Number of channels currently opened */

} ddksample_devc;

extern int ddksample_mixer_init (ddksample_devc * devc);
extern int ddksample_audio_init (ddksample_devc * devc);
extern void ddksample_do_math (ddksample_portc * portc, void *buf, int len);

#endif