user32: Implement InternalGetWindowIcon().
[wine.git] / include / x3daudio.h
blob26e2d1df7280bc2404457b06a1643e70be415630
1 /*
2 * Copyright (c) 2015 Andrew Eikum for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef _X3DAUDIO_H
20 #define _X3DAUDIO_H
22 typedef struct X3DAUDIO_VECTOR {
23 float x, y, z;
24 } X3DAUDIO_VECTOR;
26 typedef struct X3DAUDIO_CONE {
27 float InnerAngle;
28 float OuterAngle;
29 float InnerVolume;
30 float OuterVolume;
31 float InnerLPF;
32 float OuterLPF;
33 float InnerReverb;
34 float OuterReverb;
35 } X3DAUDIO_CONE;
37 typedef struct X3DAUDIO_DISTANCE_CURVE_POINT {
38 float Distance;
39 float DSPSetting;
40 } X3DAUDIO_DISTANCE_CURVE_POINT;
42 typedef struct X3DAUDIO_DISTANCE_CURVE {
43 X3DAUDIO_DISTANCE_CURVE_POINT *pPoints;
44 UINT32 PointCount;
45 } X3DAUDIO_DISTANCE_CURVE;
47 typedef struct X3DAUDIO_LISTENER {
48 X3DAUDIO_VECTOR OrientFront;
49 X3DAUDIO_VECTOR OrientTop;
50 X3DAUDIO_VECTOR Position;
51 X3DAUDIO_VECTOR Velocity;
52 X3DAUDIO_CONE *pCone;
53 } X3DAUDIO_LISTENER;
55 typedef struct X3DAUDIO_EMITTER {
56 X3DAUDIO_CONE *pCone;
57 X3DAUDIO_VECTOR OrientFront;
58 X3DAUDIO_VECTOR OrientTop;
59 X3DAUDIO_VECTOR Position;
60 X3DAUDIO_VECTOR Velocity;
61 float InnerRadius;
62 float InnerRadiusAngle;
63 UINT32 ChannelCount;
64 float ChannelRadius;
65 float *pChannelAzimuths;
66 X3DAUDIO_DISTANCE_CURVE *pVolumeCurve;
67 X3DAUDIO_DISTANCE_CURVE *pLFECurve;
68 X3DAUDIO_DISTANCE_CURVE *pLPFDirectCurve;
69 X3DAUDIO_DISTANCE_CURVE *pLPFReverbCurve;
70 X3DAUDIO_DISTANCE_CURVE *pReverbCurve;
71 float CurveDistanceScalar;
72 float DopplerScalar;
73 } X3DAUDIO_EMITTER;
75 typedef struct X3DAUDIO_DSP_SETTINGS {
76 float *pMatrixCoefficients;
77 float *pDelayTimes;
78 UINT32 SrcChannelCount;
79 UINT32 DstChannelCount;
80 float LPFDirectCoefficient;
81 float LPFReverbCoefficient;
82 float ReverbLevel;
83 float DopplerFactor;
84 float EmitterToListenerAngle;
85 float EmitterToListenerDistance;
86 float EmitterVelocityComponent;
87 float ListenerVelocityComponent;
88 } X3DAUDIO_DSP_SETTINGS;
90 #define X3DAUDIO_CALCULATE_MATRIX 0x00000001
91 #define X3DAUDIO_CALCULATE_DELAY 0x00000002
92 #define X3DAUDIO_CALCULATE_LPF_DIRECT 0x00000004
93 #define X3DAUDIO_CALCULATE_LPF_REVERB 0x00000008
94 #define X3DAUDIO_CALCULATE_REVERB 0x00000010
95 #define X3DAUDIO_CALCULATE_DOPPLER 0x00000020
96 #define X3DAUDIO_CALCULATE_EMITTER_ANGLE 0x00000040
97 #define X3DAUDIO_CALCULATE_ZEROCENTER 0x00010000
98 #define X3DAUDIO_CALCULATE_REDIRECT_TO_LFE 0x00020000
100 #ifndef _SPEAKER_POSITIONS_
101 #define _SPEAKER_POSITIONS_
102 #define SPEAKER_FRONT_LEFT 0x00000001
103 #define SPEAKER_FRONT_RIGHT 0x00000002
104 #define SPEAKER_FRONT_CENTER 0x00000004
105 #define SPEAKER_LOW_FREQUENCY 0x00000008
106 #define SPEAKER_BACK_LEFT 0x00000010
107 #define SPEAKER_BACK_RIGHT 0x00000020
108 #define SPEAKER_FRONT_LEFT_OF_CENTER 0x00000040
109 #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x00000080
110 #define SPEAKER_BACK_CENTER 0x00000100
111 #define SPEAKER_SIDE_LEFT 0x00000200
112 #define SPEAKER_SIDE_RIGHT 0x00000400
113 #define SPEAKER_TOP_CENTER 0x00000800
114 #define SPEAKER_TOP_FRONT_LEFT 0x00001000
115 #define SPEAKER_TOP_FRONT_CENTER 0x00002000
116 #define SPEAKER_TOP_FRONT_RIGHT 0x00004000
117 #define SPEAKER_TOP_BACK_LEFT 0x00008000
118 #define SPEAKER_TOP_BACK_CENTER 0x00010000
119 #define SPEAKER_TOP_BACK_RIGHT 0x00020000
120 #define SPEAKER_RESERVED 0x7ffc0000
121 #define SPEAKER_ALL 0x80000000
122 #endif
124 #ifndef SPEAKER_MONO
125 #define SPEAKER_MONO SPEAKER_FRONT_CENTER
126 #define SPEAKER_STEREO (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT)
127 #define SPEAKER_2POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY)
128 #define SPEAKER_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER)
129 #define SPEAKER_QUAD (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
130 #define SPEAKER_4POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | \
131 SPEAKER_BACK_RIGHT)
132 #define SPEAKER_5POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
133 SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
134 #define SPEAKER_7POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
135 SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_FRONT_LEFT_OF_CENTER | \
136 SPEAKER_FRONT_RIGHT_OF_CENTER)
137 #define SPEAKER_5POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
138 SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)
139 #define SPEAKER_7POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
140 SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)
141 #endif
143 #define X3DAUDIO_SPEED_OF_SOUND 343.5f
145 #define X3DAUDIO_HANDLE_BYTESIZE 20
146 typedef BYTE X3DAUDIO_HANDLE[X3DAUDIO_HANDLE_BYTESIZE];
148 HRESULT CDECL X3DAudioInitialize(UINT32, float, X3DAUDIO_HANDLE);
149 void CDECL X3DAudioCalculate(const X3DAUDIO_HANDLE, const X3DAUDIO_LISTENER *,
150 const X3DAUDIO_EMITTER *, UINT32, X3DAUDIO_DSP_SETTINGS *);
152 #endif