-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsndlib.h
90 lines (77 loc) · 2.51 KB
/
sndlib.h
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
#pragma once
/*
sndlib main include
--wbcbz7 28.o6.2o22
*/
// options setup
#include "snddefs.h"
// main sndlib includes
#include "convert.h"
#include "snderror.h"
#include "sndfmt.h"
#include "snddev.h"
#include "sndmisc.h"
// init sound library (called before any device using)
uint32_t sndlibInit();
// done sound library (called at exit)
uint32_t sndlibDone();
// create device object, optionally autodetect and select best device, request specific device driver, etc...
uint32_t sndlibCreateDevice(SoundDevice **dev, uint32_t flags = 0);
// destroy device
uint32_t sndlibDestroyDevice(SoundDevice *dev);
// sndlibCreateDevice() enums
enum {
SND_CREATE_DEVICE_MANUAL_SELECT = 0, // manual setup
SND_CREATE_DEVICE_AUTO_DETECT = 1, // autodetect and select best available device
SND_CREATE_DEVICE_SPECIFIC = 0x1000, // select specific device
SND_CREATE_DEVICE_MASK = 0x1FFF, //
SND_CREATE_SKIP_NONDMA_DEVICES = (1 << 24), // skip non-DMA devices
SND_CREATE_SKIP_DETECTION = (1 << 25), // skip device detection
/// ------------------------------------------
// device driver IDs
// non-DMA devices...
SND_CREATE_DEVICE_NONDMA_FIRST = 0x1000,
SND_CREATE_DEVICE_PC_SPEAKER = SND_CREATE_DEVICE_NONDMA_FIRST,
SND_CREATE_DEVICE_COVOX,
SND_CREATE_DEVICE_DUAL_COVOX,
SND_CREATE_DEVICE_STEREO_ON_1,
SND_CREATE_DEVICE_NONDMA_LAST,
// ISA DMA devices...
SND_CREATE_DEVICE_ISA_DMA_FIRST = 0x1100,
SND_CREATE_DEVICE_SB = SND_CREATE_DEVICE_ISA_DMA_FIRST,
SND_CREATE_DEVICE_SB16,
SND_CREATE_DEVICE_GUS,
SND_CREATE_DEVICE_WSS,
SND_CREATE_DEVICE_ESS,
SND_CREATE_DEVICE_PAS,
SND_CREATE_DEVICE_ISA_DMA_LAST,
// PCI/PCIe bus master devices...
SND_CREATE_DEVICE_PCI_FIRST = 0x1200,
SND_CREATE_DEVICE_HDA = SND_CREATE_DEVICE_PCI_FIRST,
SND_CREATE_DEVICE_DS1,
SND_CREATE_DEVICE_PCI_LAST,
};
// devices include
#if (defined(SNDLIB_DEVICE_ENABLE_SB) || \
defined(SNDLIB_DEVICE_ENABLE_SB16) || \
defined(SNDLIB_DEVICE_ENABLE_ESS))
#include "devsb.h"
#endif
#if defined(SNDLIB_DEVICE_ENABLE_GUS)
#include "devgus.h"
#endif
#if defined(SNDLIB_DEVICE_ENABLE_WSS)
#include "devwss.h"
#endif
#if defined(SNDLIB_DEVICE_ENABLE_PAS)
#include "devpas.h"
#endif
#if defined(SNDLIB_DEVICE_ENABLE_NONDMA)
#include "devhonk.h"
#endif
#if defined(SNDLIB_DEVICE_ENABLE_HDA)
#include "devhda.h"
#endif
#if defined(SNDLIB_DEVICE_ENABLE_DS1)
#include "devds1.h"
#endif