29
29
#include "macos_util_macosx.h"
32
// Sound component dispatch selector codes
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
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');
70
31
enum { // ComponentResource struct
72
33
componentSubType = 4,
91
52
componentPFPlatform = 68
94
// Component feature flags
96
k8BitRawIn = (1 << 0),
97
k8BitTwosIn = (1 << 1),
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)
112
56
enum { // ComponentParameters struct
113
57
cp_flags = 0, // call modifiers: sync/async, deferred, immed, etc