OSDN Git Service

作業部屋#50802 画面キャプチャができなくなっていた問題を暫定対応(F12キー固定で対応中)
[dtxmaniaxg-verk/dtxmaniaxg-verk-git.git] / SlimDXc_Jun2010(VC++2008) / source / directsound / CaptureBuffer.h
1 /*
2 * Copyright (c) 2007-2010 SlimDX Group
3
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22 #pragma once
23
24 #include "Enums.h"
25 #include "DirectSoundCapture.h"
26 #include "CaptureBufferDescription.h"
27 #include "NotificationPosition.h"
28
29 namespace SlimDX
30 {
31         ref class DataStream;
32
33         namespace DirectSound
34         {
35                 /// <summary>
36                 /// The CaptureBuffer object is used to manipulate sound capture buffers.
37                 /// </summary>
38                 /// <unmanaged>IDirectSoundCaptureBuffer8</unmanaged>
39                 public ref class CaptureBuffer : public ComObject
40                 {
41                         COMOBJECT(IDirectSoundCaptureBuffer8, CaptureBuffer);
42
43                 private:
44                         DataStream^ Lock( int offset, int sizeBytes, bool lockEntireBuffer, [Out] DataStream^% secondPart );
45                         Result Unlock( DataStream^ firstPart, DataStream^ secondPart );
46
47                         generic<typename T> where T : value class
48                         Result InternalRead( array<T>^ data, int startIndex, int count, int bufferOffset, bool lockEntireBuffer );
49
50                 public:
51                         /// <summary>
52                         /// Initializes a new instance of the <see cref="SlimDX::DirectSound::CaptureBuffer"/> class.
53                         /// </summary>
54                         /// <param name="capture"></param>
55                         /// <param name="description"></param>
56                         CaptureBuffer( DirectSoundCapture^ capture, CaptureBufferDescription description );
57                         
58                         generic<typename T> where T : ComObject
59                         T GetEffect( int index );
60
61                         /// <summary>
62                         /// Retrieves the status of capture effects.
63                         /// </summary>
64                         /// <param name="effectCount"></param>
65                         /// <returns></returns>
66                         array<CaptureEffectResult>^ GetEffectStatus( int effectCount );
67
68                         generic<typename T> where T : value class
69                         Result Read( array<T>^ data, int startIndex, int count, int bufferOffset );
70
71                         generic<typename T> where T : value class
72                         Result Read( array<T>^ data, int bufferOffset, bool lockEntireBuffer );
73
74                         Result SetNotificationPositions( array<NotificationPosition>^ positions );
75
76                         /// <summary>
77                         /// Begins capturing data into the buffer. If the buffer is already capturing, the method has no effect.
78                         /// </summary>
79                         Result Start( bool looping );
80
81                         /// <summary>
82                         /// Stops the buffer so that it is no longer capturing data. If the buffer is not capturing, the method has no effect.
83                         /// </summary>
84                         Result Stop();
85
86                         /// <summary>
87                         /// True if the buffer is currently capturing.
88                         /// </summary>
89                         property bool Capturing
90                         {
91                                 bool get();
92                         }
93
94                         /// <summary>
95                         /// True if the capture buffer is looping.
96                         /// </summary>
97                         property bool Looping
98                         {
99                                 bool get();
100                         }
101
102                         /// <summary>
103                         /// Retrieves the waveform format of the capture buffer.
104                         /// </summary>
105                         property SlimDX::Multimedia::WaveFormat^ Format
106                         {
107                                 SlimDX::Multimedia::WaveFormat^ get();
108                         }
109
110                         /// <summary>
111                         /// The size, in bytes, of the capture buffer.
112                         /// </summary>
113                         property int SizeInBytes
114                         {
115                                 int get();
116                         }
117
118                         /// <summary>
119                         /// True if the buffer wave mapped.
120                         /// </summary>
121                         property bool WaveMapped
122                         {
123                                 bool get();
124                         }
125
126                         /// <summary>
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.
128                         /// </summary>
129                         property int CurrentCapturePosition
130                         {
131                                 int get();
132                         }
133
134                         /// <summary>
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.
136                         /// </summary>
137                         property int CurrentReadPosition
138                         {
139                                 int get();
140                         }
141                 };
142         }
143 }