OSDN Git Service

DTXMania089リリースに際してのtag付け。
[dtxmania/dtxmania.git] / 110401(DTXMania089) / SlimDXc_Jun2010(VC++2008) / source / xact3 / Engine.h
1 /*\r
2 * Copyright (c) 2007-2010 SlimDX Group\r
3\r
4 * Permission is hereby granted, free of charge, to any person obtaining a copy\r
5 * of this software and associated documentation files (the "Software"), to deal\r
6 * in the Software without restriction, including without limitation the rights\r
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
8 * copies of the Software, and to permit persons to whom the Software is\r
9 * furnished to do so, subject to the following conditions:\r
10\r
11 * The above copyright notice and this permission notice shall be included in\r
12 * all copies or substantial portions of the Software.\r
13\r
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
20 * THE SOFTWARE.\r
21 */\r
22 #pragma once\r
23 \r
24 #include "../ComObject.h"\r
25 #include "../multimedia/WaveFormatExtensible.h"\r
26 \r
27 #include "RuntimeParameters.h"\r
28 #include "RendererDetails.h"\r
29 #include "Enums.h"\r
30 \r
31 namespace SlimDX\r
32 {\r
33         using namespace Multimedia;\r
34 \r
35         namespace XACT3\r
36         {\r
37                 ref class SoundBank;\r
38                 ref class WaveBank;\r
39 \r
40                 public ref class Engine : public ComObject\r
41                 {\r
42                         COMOBJECT(IXACT3Engine, Engine);\r
43 \r
44                 public:\r
45                         /// <summary>\r
46                         /// Initializes a new instance of the <see cref="Engine"/> class.\r
47                         /// </summary>\r
48                         Engine();\r
49                         Engine( CreationFlags flags );\r
50 \r
51                         SoundBank^ CreateSoundBank( DataStream^ data );\r
52                         WaveBank^ CreateWaveBank( DataStream^ data );\r
53                         WaveBank^ CreateStreamingWaveBank( System::String^ fileName, int offset, int packetSize );\r
54 \r
55                         /// <summary>\r
56                         /// Performs periodic work that is required by the XACT engine. Typically this should be called every 30 to 100 milliseconds.\r
57                         /// </summary>\r
58                         Result DoWork();\r
59 \r
60                         /// <summary>\r
61                         /// Get the sound category index that corresponds to a friendly name string.\r
62                         /// </summary>\r
63                         /// <param name="friendlyName">A string describing the category's friendly name.</param>\r
64                         /// <returns>The category index for the friendly name if successful, otherwise -1.</returns>\r
65                         int GetCategory(System::String^ friendlyName);\r
66 \r
67                         /// <summary>\r
68                         /// Get the value for a global variable.\r
69                         /// </summary>\r
70                         /// <param name="index">The index of the global variable.</param>\r
71                         /// <returns>The value that is currently held by the global variable.</returns>\r
72                         float GetGlobalVariable(int index);\r
73 \r
74                         /// <summary>\r
75                         /// Get the corresponding index for a global variable name string.\r
76                         /// </summary>\r
77                         /// <param name="friendlyName">A string that contains the friendly name of the global variable.</param>\r
78                         /// <returns>The index for the global variable if it exists, otherwise -1.</returns>\r
79                         int GetGlobalVariableIndex(System::String^ friendlyName);\r
80 \r
81                         /// <summary>\r
82                         /// Gets details about a specific renderer.\r
83                         /// </summary>\r
84                         /// <param name="rendererIndex">Index of the renderer to retrieve information from.</param>\r
85                         /// <returns>A new <see cref="RendererDetails"/> object that contains details of the renderer.</returns>\r
86                         RendererDetails GetRendererDetails(int rendererIndex);\r
87 \r
88                         /// <summary>\r
89                         /// Initialize the XACT engine using common default settings.\r
90                         /// </summary>\r
91                         Result Initialize( RuntimeParameters parameters );\r
92 \r
93                         /// <summary>\r
94                         /// Pause a sound category.\r
95                         /// </summary>\r
96                         /// <param name="category">Index of the category to pause, as returned by <see cref="GetCategory"/>.</param>\r
97                         /// <param name="pause">The action to take. If true, playback is paused, if false, playback is resumed.</param>\r
98                         Result Pause(int category, bool pause);\r
99 \r
100                         /// <summary>\r
101                         /// Set the value of a global variable.\r
102                         /// </summary>\r
103                         /// <param name="index">The index of the global variable.</param>\r
104                         /// <param name="value">The new value of the global variable.</param>\r
105                         Result SetGlobalVariable(int index, float value);\r
106 \r
107                         /// <summary>\r
108                         /// Set the volume of a sound category.\r
109                         /// </summary>\r
110                         /// <param name="category">Index of the category for which to set the volume, as returned by <see cref="GetCategory"/>.</param>\r
111                         /// <param name="volume">The volume level to set. This is a floating point scale where 0.0 means -96db, 1.0 means 0db and 2.0 means +6db.</param>\r
112                         Result SetVolume(int category, float volume);\r
113 \r
114                         /// <summary>\r
115                         /// Shut down the XACT engine and free any resources in use.\r
116                         /// </summary>\r
117                         Result Shutdown();\r
118 \r
119                         /// <summary>\r
120                         /// Stop a sound category.\r
121                         /// </summary>\r
122                         /// <param name="category">Index of the category to stop, as returned by <see cref="GetCategory"/>.</param>\r
123                         /// <param name="flags"><see cref="StopFlags"/> that specify how the cetegory is stopped.</param>\r
124                         Result Stop(int category, StopFlags flags);\r
125 \r
126                         /// <summary>\r
127                         /// Gets the total number of audio rendering devices that are available in the system.\r
128                         /// </summary>\r
129                         property int RendererCount\r
130                         {\r
131                                 int get();\r
132                         }\r
133 \r
134                         /// <summary>\r
135                         /// Gets a <see cref="WaveFormatExtensible"/> object that represents the final mix format.\r
136                         /// </summary>\r
137                         property WaveFormatExtensible^ FinalMixFormat\r
138                         {\r
139                                 WaveFormatExtensible^ get();\r
140                         }\r
141                 };\r
142         }\r
143 }\r