~ubuntu-branches/ubuntu/feisty/basilisk2/feisty

« back to all changes in this revision

Viewing changes to src/MacOSX/audio_defs_macosx.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2006-06-01 01:11:16 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060601011116-xjhegbgyfsxag5fl
Tags: 0.9.20060529-1
* New upstream CVS snapshot.
* Update local cdbs snippet copyright-check.mk:
  + Broaden scan to also look for "(c)" by default.
  + Make egrep options configurable.
  + Ignore auto-tools files.
* Bump up standards-version to 3.7.2 (no changes needed).
* Let dh_strip do the stripping (not the make install target).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *      $Id: audio_defs_macosx.h,v 1.3 2005/01/30 21:42:13 gbeauche Exp $
 
2
 *      $Id: audio_defs_macosx.h,v 1.4 2006/01/16 23:10:33 nigel Exp $
3
3
 *
4
4
 *      audio_defs_macosx.h - Work around clashes with the enums in <CarbonCore/OSUtils.h>
5
5
 *                                                Based on:
6
6
 *
7
7
 *  audio_defs.h - Definitions for MacOS audio components
8
8
 *
9
 
 *  Basilisk II (C) 1997-2005 Christian Bauer
 
9
 *  Basilisk II (C) 1997-2006 Christian Bauer
10
10
 *
11
11
 *  This program is free software; you can redistribute it and/or modify
12
12
 *  it under the terms of the GNU General Public License as published by
28
28
 
29
29
#include "macos_util_macosx.h"
30
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
31
enum {  // ComponentResource struct
71
32
        componentType = 0,
72
33
        componentSubType = 4,
91
52
        componentPFPlatform = 68
92
53
};
93
54
 
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
55
 
112
56
enum {  // ComponentParameters struct
113
57
        cp_flags = 0,           // call modifiers: sync/async, deferred, immed, etc