OSDN Git Service

チケット #35358 に対応するためのブランチの作成。
[dtxmania/dtxmania.git] / SlimDXc_Jun2010(VC++2008) / source / xaudio2 / Voice.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 "../Result.h"\r
25 \r
26 #include "FilterParameters.h"\r
27 #include "VoiceDetails.h"\r
28 #include "VoiceSendDescriptor.h"\r
29 #include "EffectDescriptor.h"\r
30 \r
31 namespace SlimDX\r
32 {\r
33         namespace XAudio2\r
34         {\r
35                 public ref class Voice abstract\r
36                 {\r
37                 private:\r
38                         IXAudio2Voice *m_Pointer;\r
39 \r
40                 internal:\r
41                         property IXAudio2Voice *InternalPointer\r
42                         { \r
43                                 IXAudio2Voice *get() { return m_Pointer; }\r
44                                 void set( IXAudio2Voice *value ) { m_Pointer = value; }\r
45                         }\r
46 \r
47                 protected:\r
48                         Voice() { }\r
49 \r
50                 public:\r
51                         Result EnableEffect( int effectIndex );\r
52                         Result EnableEffect( int effectIndex, int operationSet );\r
53 \r
54                         Result DisableEffect( int effectIndex );\r
55                         Result DisableEffect( int effectIndex, int operationSet );\r
56 \r
57                         array<float>^ GetChannelVolumes( int channels );\r
58 \r
59                         Result SetChannelVolumes( int channels, array<float>^ volumes );\r
60                         Result SetChannelVolumes( int channels, array<float>^ volumes, int operationSet );\r
61 \r
62                         Result GetEffectParameters( int effectIndex, array<System::Byte>^ parameters );\r
63 \r
64                         generic<typename T> where T : value class\r
65                         T GetEffectParameters( int effectIndex );\r
66 \r
67                         Result SetEffectParameters( int effectIndex, array<System::Byte>^ parameters );\r
68                         Result SetEffectParameters( int effectIndex, array<System::Byte>^ parameters, int operationSet );\r
69 \r
70                         generic<typename T> where T : value class\r
71                         Result SetEffectParameters( int effectIndex, T parameters );\r
72                         generic<typename T> where T : value class\r
73                         Result SetEffectParameters( int effectIndex, T parameters, int operationSet );\r
74 \r
75                         bool IsEffectEnabled( int effectIndex );\r
76 \r
77                         array<float>^ GetOutputMatrix( int sourceChannels, int destinationChannels );\r
78                         array<float>^ GetOutputMatrix( Voice^ destinationVoice, int sourceChannels, int destinationChannels );\r
79 \r
80                         Result SetOutputMatrix( int sourceChannels, int destinationChannels, array<float>^ matrix );\r
81                         Result SetOutputMatrix( int sourceChannels, int destinationChannels, array<float>^ matrix, int operationSet );\r
82 \r
83                         Result SetOutputMatrix( Voice^ destinationVoice, int sourceChannels, int destinationChannels, array<float>^ matrix );\r
84                         Result SetOutputMatrix( Voice^ destinationVoice, int sourceChannels, int destinationChannels, array<float>^ matrix, int operationSet );\r
85 \r
86                         Result SetEffectChain( array<EffectDescriptor>^ effects );\r
87                         \r
88 #if SLIMDX_XAUDIO2_VERSION < 24\r
89                         Result SetOutputVoices( array<Voice^>^ outputVoices );\r
90 #else\r
91                         Result SetOutputVoices( array<VoiceSendDescriptor>^ outputVoices );\r
92 #endif\r
93                         property FilterParameters FilterParameters\r
94                         {\r
95                                 SlimDX::XAudio2::FilterParameters get();\r
96                                 void set( SlimDX::XAudio2::FilterParameters value );\r
97                         }\r
98 \r
99                         property VoiceDetails VoiceDetails\r
100                         {\r
101                                 SlimDX::XAudio2::VoiceDetails get();\r
102                         }\r
103 \r
104                         property float Volume\r
105                         {\r
106                                 float get();\r
107                                 void set( float value );\r
108                         }\r
109                 };\r
110         }\r
111 }