1 |
|
/* |
2 |
|
* audio_defs.h - Definitions for MacOS audio components |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-1999 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2008 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
21 |
|
#ifndef AUDIO_DEFS_H |
22 |
|
#define AUDIO_DEFS_H |
23 |
|
|
24 |
+ |
#include "macos_util.h" |
25 |
+ |
|
26 |
+ |
|
27 |
|
// Error codes |
28 |
|
enum { |
29 |
|
badComponentSelector = (int32)0x80008002, |
62 |
|
}; |
63 |
|
|
64 |
|
// Sound information selectors |
65 |
< |
enum { |
66 |
< |
siSampleRate = 'srat', // current sample rate |
67 |
< |
siSampleRateAvailable = 'srav', // sample rates available |
68 |
< |
siSampleSize = 'ssiz', // current sample size |
69 |
< |
siSampleSizeAvailable = 'ssav', // sample sizes available |
70 |
< |
siNumberChannels = 'chan', // current number of channels |
71 |
< |
siChannelAvailable = 'chav', // number of channels available |
72 |
< |
siSpeakerMute = 'smut', // mute state of all built-in speaker |
73 |
< |
siSpeakerVolume = 'svol', // volume level of built-in speaker |
74 |
< |
siHardwareMute = 'hmut', // mute state of all hardware |
75 |
< |
siHardwareVolume = 'hvol', // volume level of all hardware |
76 |
< |
siHardwareVolumeSteps = 'hstp', // number of volume steps for hardware |
77 |
< |
siHardwareBusy = 'hwbs' // sound hardware is in use |
78 |
< |
}; |
65 |
> |
const uint32 siNumberChannels = FOURCC('c','h','a','n'); // current number of channels |
66 |
> |
const uint32 siChannelAvailable = FOURCC('c','h','a','v'); // number of channels available |
67 |
> |
const uint32 siSampleRate = FOURCC('s','r','a','t'); // current sample rate |
68 |
> |
const uint32 siSampleRateAvailable = FOURCC('s','r','a','v'); // sample rates available |
69 |
> |
const uint32 siSampleSize = FOURCC('s','s','i','z'); // current sample size |
70 |
> |
const uint32 siSampleSizeAvailable = FOURCC('s','s','a','v'); // sample sizes available |
71 |
> |
const uint32 siHardwareMute = FOURCC('h','m','u','t'); // mute state of all hardware |
72 |
> |
const uint32 siHardwareVolume = FOURCC('h','v','o','l'); // volume level of all hardware |
73 |
> |
const uint32 siHardwareVolumeSteps = FOURCC('h','s','t','p'); // number of volume steps for hardware |
74 |
> |
const uint32 siHardwareBusy = FOURCC('h','w','b','s'); // sound hardware is in use |
75 |
> |
const uint32 siHeadphoneMute = FOURCC('p','m','u','t'); // mute state of headphone |
76 |
> |
const uint32 siHeadphoneVolume = FOURCC('p','v','o','l'); // volume level of headphone |
77 |
> |
const uint32 siHeadphoneVolumeSteps = FOURCC('h','d','s','t'); // number of volume steps for headphone |
78 |
> |
const uint32 siSpeakerMute = FOURCC('s','m','u','t'); // mute state of all built-in speakers |
79 |
> |
const uint32 siSpeakerVolume = FOURCC('s','v','o','l'); // volume level of built-in speaker |
80 |
> |
const uint32 siDeviceName = FOURCC('n','a','m','e'); |
81 |
> |
const uint32 siDeviceIcon = FOURCC('i','c','o','n'); |
82 |
> |
const uint32 siHardwareFormat = FOURCC('h','w','f','m'); |
83 |
|
|
84 |
|
enum { // ComponentResource struct |
85 |
|
componentType = 0, |
97 |
|
componentIconID = 42, |
98 |
|
componentVersion = 44, |
99 |
|
componentRegisterFlags = 48, |
100 |
< |
componentIconFamily = 52 |
100 |
> |
componentIconFamily = 52, |
101 |
> |
componentPFCount = 54, |
102 |
> |
componentPFFlags = 58, |
103 |
> |
componentPFResType = 62, |
104 |
> |
componentPFResID = 66, |
105 |
> |
componentPFPlatform = 68 |
106 |
|
}; |
107 |
|
|
108 |
|
// Component feature flags |