OSDN Git Service

#36897 [DTXC] MIDIインポート機能の呼び出し口を、ファイルメニュー内にも配置。
[dtxmania/dtxmania.git] / SlimDXc_Jun2010(VC++2008) / source / directsound / CaptureBuffer.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 "Enums.h"\r
25 #include "DirectSoundCapture.h"\r
26 #include "CaptureBufferDescription.h"\r
27 #include "NotificationPosition.h"\r
28 \r
29 namespace SlimDX\r
30 {\r
31         ref class DataStream;\r
32 \r
33         namespace DirectSound\r
34         {\r
35                 /// <summary>\r
36                 /// The CaptureBuffer object is used to manipulate sound capture buffers.\r
37                 /// </summary>\r
38                 /// <unmanaged>IDirectSoundCaptureBuffer8</unmanaged>\r
39                 public ref class CaptureBuffer : public ComObject\r
40                 {\r
41                         COMOBJECT(IDirectSoundCaptureBuffer8, CaptureBuffer);\r
42 \r
43                 private:\r
44                         DataStream^ Lock( int offset, int sizeBytes, bool lockEntireBuffer, [Out] DataStream^% secondPart );\r
45                         Result Unlock( DataStream^ firstPart, DataStream^ secondPart );\r
46 \r
47                         generic<typename T> where T : value class\r
48                         Result InternalRead( array<T>^ data, int startIndex, int count, int bufferOffset, bool lockEntireBuffer );\r
49 \r
50                 public:\r
51                         /// <summary>\r
52                         /// Initializes a new instance of the <see cref="SlimDX::DirectSound::CaptureBuffer"/> class.\r
53                         /// </summary>\r
54                         /// <param name="capture"></param>\r
55                         /// <param name="description"></param>\r
56                         CaptureBuffer( DirectSoundCapture^ capture, CaptureBufferDescription description );\r
57                         \r
58                         generic<typename T> where T : ComObject\r
59                         T GetEffect( int index );\r
60 \r
61                         /// <summary>\r
62                         /// Retrieves the status of capture effects.\r
63                         /// </summary>\r
64                         /// <param name="effectCount"></param>\r
65                         /// <returns></returns>\r
66                         array<CaptureEffectResult>^ GetEffectStatus( int effectCount );\r
67 \r
68                         generic<typename T> where T : value class\r
69                         Result Read( array<T>^ data, int startIndex, int count, int bufferOffset );\r
70 \r
71                         generic<typename T> where T : value class\r
72                         Result Read( array<T>^ data, int bufferOffset, bool lockEntireBuffer );\r
73 \r
74                         Result SetNotificationPositions( array<NotificationPosition>^ positions );\r
75 \r
76                         /// <summary>\r
77                         /// Begins capturing data into the buffer. If the buffer is already capturing, the method has no effect.\r
78                         /// </summary>\r
79                         Result Start( bool looping );\r
80 \r
81                         /// <summary>\r
82                         /// Stops the buffer so that it is no longer capturing data. If the buffer is not capturing, the method has no effect.\r
83                         /// </summary>\r
84                         Result Stop();\r
85 \r
86                         /// <summary>\r
87                         /// True if the buffer is currently capturing.\r
88                         /// </summary>\r
89                         property bool Capturing\r
90                         {\r
91                                 bool get();\r
92                         }\r
93 \r
94                         /// <summary>\r
95                         /// True if the capture buffer is looping.\r
96                         /// </summary>\r
97                         property bool Looping\r
98                         {\r
99                                 bool get();\r
100                         }\r
101 \r
102                         /// <summary>\r
103                         /// Retrieves the waveform format of the capture buffer.\r
104                         /// </summary>\r
105                         property SlimDX::Multimedia::WaveFormat^ Format\r
106                         {\r
107                                 SlimDX::Multimedia::WaveFormat^ get();\r
108                         }\r
109 \r
110                         /// <summary>\r
111                         /// The size, in bytes, of the capture buffer.\r
112                         /// </summary>\r
113                         property int SizeInBytes\r
114                         {\r
115                                 int get();\r
116                         }\r
117 \r
118                         /// <summary>\r
119                         /// True if the buffer wave mapped.\r
120                         /// </summary>\r
121                         property bool WaveMapped\r
122                         {\r
123                                 bool get();\r
124                         }\r
125 \r
126                         /// <summary>\r
127                         /// Retrieves the position of the capture cursor in the buffer. The capture cursor is ahead of the read cursor. The data after the read position up to and including the capture position is not necessarily valid data.\r
128                         /// </summary>\r
129                         property int CurrentCapturePosition\r
130                         {\r
131                                 int get();\r
132                         }\r
133 \r
134                         /// <summary>\r
135                         /// Retrieves the position of the read cursor in the buffer. The capture cursor is ahead of the read cursor. The data after the read position up to and including the capture position is not necessarily valid data.\r
136                         /// </summary>\r
137                         property int CurrentReadPosition\r
138                         {\r
139                                 int get();\r
140                         }\r
141                 };\r
142         }\r
143 }