ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/audio_defs_macosx.h
Revision: 1.1
Committed: 2003-03-23T23:42:04Z (21 years, 3 months ago) by nigel
Content type: text/plain
Branch: MAIN
CVS Tags: nigel-build-12, nigel-build-13
Log Message:
audio_defs.h compatible with OS X

File Contents

# Content
1 /*
2 * $Id$
3 *
4 * audio_defs_macosx.h - Work around clashes with the enums in <CarbonCore/OSUtils.h>
5 * Based on:
6 *
7 * audio_defs.h - Definitions for MacOS audio components
8 *
9 * Basilisk II (C) 1997-2002 Christian Bauer
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25
26 #ifndef AUDIO_DEFS_H
27 #define AUDIO_DEFS_H
28
29 #include "macos_util_macosx.h"
30
31
32 // Sound component dispatch selector codes
33 enum {
34 kSoundComponentInitOutputDeviceSelect = 1,
35 kSoundComponentSetSourceSelect = 2,
36 kSoundComponentGetSourceSelect = 3,
37 kSoundComponentGetSourceDataSelect = 4,
38 kSoundComponentSetOutputSelect = 5,
39 kDelegatedSoundComponentSelectors = 0x0100,
40 kSoundComponentAddSourceSelect = kDelegatedSoundComponentSelectors + 1,
41 kSoundComponentRemoveSourceSelect = kDelegatedSoundComponentSelectors + 2,
42 kSoundComponentGetInfoSelect = kDelegatedSoundComponentSelectors + 3,
43 kSoundComponentSetInfoSelect = kDelegatedSoundComponentSelectors + 4,
44 kSoundComponentStartSourceSelect = kDelegatedSoundComponentSelectors + 5,
45 kSoundComponentStopSourceSelect = kDelegatedSoundComponentSelectors + 6,
46 kSoundComponentPauseSourceSelect = kDelegatedSoundComponentSelectors + 7,
47 kSoundComponentPlaySourceBufferSelect = kDelegatedSoundComponentSelectors + 8
48 };
49
50 // Sound information selectors
51 const uint32 siNumberChannels = FOURCC('c','h','a','n'); // current number of channels
52 const uint32 siChannelAvailable = FOURCC('c','h','a','v'); // number of channels available
53 const uint32 siSampleRate = FOURCC('s','r','a','t'); // current sample rate
54 const uint32 siSampleRateAvailable = FOURCC('s','r','a','v'); // sample rates available
55 const uint32 siSampleSize = FOURCC('s','s','i','z'); // current sample size
56 const uint32 siSampleSizeAvailable = FOURCC('s','s','a','v'); // sample sizes available
57 const uint32 siHardwareMute = FOURCC('h','m','u','t'); // mute state of all hardware
58 const uint32 siHardwareVolume = FOURCC('h','v','o','l'); // volume level of all hardware
59 const uint32 siHardwareVolumeSteps = FOURCC('h','s','t','p'); // number of volume steps for hardware
60 const uint32 siHardwareBusy = FOURCC('h','w','b','s'); // sound hardware is in use
61 const uint32 siHeadphoneMute = FOURCC('p','m','u','t'); // mute state of headphone
62 const uint32 siHeadphoneVolume = FOURCC('p','v','o','l'); // volume level of headphone
63 const uint32 siHeadphoneVolumeSteps = FOURCC('h','d','s','t'); // number of volume steps for headphone
64 const uint32 siSpeakerMute = FOURCC('s','m','u','t'); // mute state of all built-in speakers
65 const uint32 siSpeakerVolume = FOURCC('s','v','o','l'); // volume level of built-in speaker
66 const uint32 siDeviceName = FOURCC('n','a','m','e');
67 const uint32 siDeviceIcon = FOURCC('i','c','o','n');
68 const uint32 siHardwareFormat = FOURCC('h','w','f','m');
69
70 enum { // ComponentResource struct
71 componentType = 0,
72 componentSubType = 4,
73 componentManufacturer = 8,
74 componentFlags = 12,
75 componentFlagsMask = 16,
76 componentResType = 20,
77 componentResID = 24,
78 componentNameType = 26,
79 componentNameID = 30,
80 componentInfoType = 32,
81 componentInfoID = 36,
82 componentIconType = 38,
83 componentIconID = 42,
84 componentVersion = 44,
85 componentRegisterFlags = 48,
86 componentIconFamily = 52,
87 componentPFCount = 54,
88 componentPFFlags = 58,
89 componentPFResType = 62,
90 componentPFResID = 66,
91 componentPFPlatform = 68
92 };
93
94 // Component feature flags
95 enum {
96 k8BitRawIn = (1 << 0),
97 k8BitTwosIn = (1 << 1),
98 k16BitIn = (1 << 2),
99 kStereoIn = (1 << 3),
100 k8BitRawOut = (1 << 8),
101 k8BitTwosOut = (1 << 9),
102 k16BitOut = (1 << 10),
103 kStereoOut = (1 << 11),
104 kReverse = (1L << 16),
105 kRateConvert = (1L << 17),
106 kCreateSoundSource = (1L << 18),
107 kHighQuality = (1L << 22),
108 kNonRealTime = (1L << 23),
109 // cmpWantsRegisterMessage = (1L << 31)
110 };
111
112 enum { // ComponentParameters struct
113 cp_flags = 0, // call modifiers: sync/async, deferred, immed, etc
114 cp_paramSize = 1, // size in bytes of actual parameters passed to this call
115 cp_what = 2, // routine selector, negative for Component management calls
116 cp_params = 4 // actual parameters for the indicated routine
117 };
118
119 enum { // SoundComponentData struct
120 scd_flags = 0,
121 scd_format = 4,
122 scd_numChannels = 8,
123 scd_sampleSize = 10,
124 scd_sampleRate = 12,
125 scd_sampleCount = 16,
126 scd_buffer = 20,
127 scd_reserved = 24,
128 SIZEOF_scd = 28
129 };
130
131 enum { // SoundInfoList struct
132 sil_count = 0,
133 sil_infoHandle = 2
134 };
135
136 #endif