• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

test


Commit MetaInfo

Revision7e60ed281e2dce7d4eee80de13fcbd794508c246 (tree)
Time2012-07-01 15:48:21
Authorunknown <yoshihiro@vola...>
Commiterunknown

Log Message

参照型に変更

Change Summary

Incremental Difference

--- a/Core/Momiji.Core.Timer.MMTimer.cpp
+++ b/Core/Momiji.Core.Timer.MMTimer.cpp
@@ -90,7 +90,7 @@ namespace Timer {
9090
9191 Interop::Winmm::TimeCapabilities^ MMTimer::getCapabilities()
9292 {
93- auto caps = Interop::Winmm::TimeCapabilities();
93+ auto caps = gcnew Interop::Winmm::TimeCapabilities();
9494 #ifdef _DEBUG
9595 System::Console::WriteLine("[{0}] caps size {1}",__FUNCTION__, InteropServices::Marshal::SizeOf(caps));
9696 #endif
@@ -105,7 +105,7 @@ namespace Timer {
105105 }
106106
107107 #ifdef _DEBUG
108- System::Console::WriteLine("[{0}] min {1}, max {2}",__FUNCTION__, caps.periodMin, caps.periodMax);
108+ System::Console::WriteLine("[{0}] min {1}, max {2}",__FUNCTION__, caps->periodMin, caps->periodMax);
109109 #endif
110110
111111 return caps;
--- a/Core/Momiji.Core.Wave.Out.cpp
+++ b/Core/Momiji.Core.Wave.Out.cpp
@@ -317,7 +317,7 @@ namespace Out {
317317
318318 waveHeader->bytesRecorded = 0;
319319 waveHeader->user = System::IntPtr::Zero;
320- waveHeader->next = 0;
320+ waveHeader->next = System::IntPtr::Zero;
321321 waveHeader->reserved = System::IntPtr::Zero;
322322
323323 #ifdef _DEBUG
--- a/Core/Momiji.Interop.Ks.h
+++ b/Core/Momiji.Interop.Ks.h
@@ -481,12 +481,12 @@ namespace Ks {
481481 WIN32_DLL_STRUCTLAYOUT public value struct KsDataFormatWaveFormatEx
482482 {
483483 KsDataFormat DataFormat;
484- Interop::Winmm::WaveFormatEx wfe;
484+ Interop::Winmm::WaveFormatEx^ wfe;
485485
486486 virtual System::String^ ToString() override
487487 {
488488 return
489- "dataFormat["+DataFormat.ToString()+"] wfe["+wfe.ToString()+"]";
489+ "dataFormat["+DataFormat.ToString()+"] wfe["+wfe->ToString()+"]";
490490 }
491491 };
492492
@@ -496,7 +496,7 @@ namespace Ks {
496496 {
497497 System::UInt32 Flags;
498498 System::UInt32 Control;
499- Interop::Winmm::WaveFormatEx wfe;
499+ Interop::Winmm::WaveFormatEx^ wfe;
500500 };
501501
502502 // DirectSound format
--- a/Core/Momiji.Interop.Winmm.h
+++ b/Core/Momiji.Interop.Winmm.h
@@ -246,7 +246,7 @@ namespace Winmm {
246246 );
247247 };
248248
249- WIN32_DLL_STRUCTLAYOUT public value struct TimeCapabilities {
249+ WIN32_DLL_STRUCTLAYOUT public ref struct TimeCapabilities {
250250 System::UInt32 periodMin; // minimum period supported
251251 System::UInt32 periodMax; // maximum period supported
252252 };
@@ -281,7 +281,7 @@ namespace Winmm {
281281 System::IntPtr user; // for client's use
282282 FLAG flags; // assorted flags (see defines)
283283 System::UInt32 loops; // loop control counter
284- System::UInt32 next; // reserved for driver
284+ System::IntPtr next; // reserved for driver
285285 System::IntPtr reserved; // reserved for driver
286286
287287 virtual System::String^ ToString() override
@@ -702,7 +702,7 @@ namespace Winmm {
702702 );
703703
704704 WIN_MM_DLLIMPORT static MMRESULT timeGetDevCaps(
705- [InteropServices::Out] TimeCapabilities% ptc,
705+ [InteropServices::Out] TimeCapabilities^ ptc,
706706 [InteropServices::In] System::UInt32 cbtc
707707 );
708708 /*
--- a/Core/Momiji.Sequencer.Wave.h
+++ b/Core/Momiji.Sequencer.Wave.h
@@ -103,7 +103,7 @@ namespace Wave {
103103
104104 System::UInt32 WaveStream::Read(array<System::Byte>^ buffer, System::UInt32 samplesPerBuffer);
105105
106- property Momiji::Interop::Winmm::WaveFormatEx format { Momiji::Interop::Winmm::WaveFormatEx get() {return this->_wfx;} }
106+ property Momiji::Interop::Winmm::WaveFormatEx^ format { Momiji::Interop::Winmm::WaveFormatEx^ get() {return this->_wfx;} }
107107
108108 };
109109
--- a/Test/Momiji.Test.Sequencer.Wave/Form1.h
+++ b/Test/Momiji.Test.Sequencer.Wave/Form1.h
@@ -180,19 +180,19 @@ namespace MomijiTestSequencerWave {
180180
181181 this->_bufferPool =
182182 gcnew Momiji::Core::Buffer::BufferPool<array<System::Byte>^>(
183- ((wfx.samplesPerSecond / (samplesPerBuffer * wfx.blockAlign)) + 2), //1秒分+2回
183+ ((wfx->samplesPerSecond / (samplesPerBuffer * wfx->blockAlign)) + 2), //1秒分+2回
184184 gcnew Momiji::Core::Buffer::BufferPool<array<System::Byte>^>::Allocator(this, &TestWave::AllocateBuffer)
185185 );
186186
187- auto count = (wfx.samplesPerSecond / this->_samplesPerBuffer) + 2;
187+ auto count = (wfx->samplesPerSecond / this->_samplesPerBuffer) + 2;
188188
189189 Console::WriteLine("samplesPerBuffer {0} count {1}", this->_samplesPerBuffer, count);
190190
191191 o = gcnew Momiji::Core::Wave::Out::Device(
192192 0,
193- wfx.channels,
194- wfx.samplesPerSecond,
195- wfx.bitsPerSample,
193+ wfx->channels,
194+ wfx->samplesPerSecond,
195+ wfx->bitsPerSample,
196196 (
197197 Momiji::Interop::Winmm::WaveFormatExtensiblePart::SPEAKER::FRONT_LEFT
198198 | Momiji::Interop::Winmm::WaveFormatExtensiblePart::SPEAKER::FRONT_RIGHT
--- a/Test/Momiji.Test.Vst.Controller/Momiji.Test.Vst.Controller.cpp
+++ b/Test/Momiji.Test.Vst.Controller/Momiji.Test.Vst.Controller.cpp
@@ -260,26 +260,25 @@ void test0()
260260
261261 Momiji::Core::ITimer^ t;
262262 Momiji::Core::IStream^ s;
263- Momiji::Core::Wave::Out::Devices<System::Single>^ o;
263+ Momiji::Core::Wave::Out::Device^ o;
264264 Momiji::Core::Vst::Host::Master^ h;
265265 Controller^ c;
266266 try
267267 {
268268 t = gcnew Momiji::Core::Timer::MMTimer();
269269 s = gcnew Momiji::Sequencer::Midi::Smf::SmfStream(smfFileName);
270- o = gcnew Momiji::Core::Wave::Out::Devices<System::Single>();
271- o->AddPort(
272- 0,
273- 2,
274- 48000,
275- System::Runtime::InteropServices::Marshal::SizeOf(System::Single::typeid) * 8,
276- (
277- Momiji::Interop::Winmm::WaveFormatExtensiblePart::SPEAKER::FRONT_LEFT
278- | Momiji::Interop::Winmm::WaveFormatExtensiblePart::SPEAKER::FRONT_RIGHT
279- ),
280- Momiji::Interop::Ks::StaticKs::SUBTYPE_IEEE_FLOAT,
281- 48000
282- );
270+ o = gcnew Momiji::Core::Wave::Out::Device(
271+ 0,
272+ 2,
273+ 48000,
274+ System::Runtime::InteropServices::Marshal::SizeOf(System::Single::typeid) * 8,
275+ (
276+ Momiji::Interop::Winmm::WaveFormatExtensiblePart::SPEAKER::FRONT_LEFT
277+ | Momiji::Interop::Winmm::WaveFormatExtensiblePart::SPEAKER::FRONT_RIGHT
278+ ),
279+ Momiji::Interop::Ks::StaticKs::SUBTYPE_IEEE_FLOAT,
280+ 48000
281+ );
283282
284283 c = gcnew Controller();
285284 c->Assign(t);
--- a/Test/Momiji.Test/Momiji.Test.cpp
+++ b/Test/Momiji.Test/Momiji.Test.cpp
@@ -71,7 +71,8 @@ void test0()
7171 Momiji::Interop::Winmm::WaveFormatExtensiblePart::SPEAKER::FRONT_LEFT
7272 | Momiji::Interop::Winmm::WaveFormatExtensiblePart::SPEAKER::FRONT_RIGHT
7373 ),
74- Momiji::Interop::Ks::StaticKs::SUBTYPE_IEEE_FLOAT
74+ Momiji::Interop::Ks::StaticKs::SUBTYPE_IEEE_FLOAT,
75+ 44110
7576 );
7677
7778 try
@@ -92,7 +93,7 @@ void test0()
9293 auto e = Momiji::Interop::Vst::VstEvent();
9394 e.type = Momiji::Interop::Vst::VstEvent::VstEventTypes::kVstMidiType;
9495 e.flags = Momiji::Interop::Vst::VstEvent::VstMidiEventFlags::kVstMidiEventIsRealtime;
95- e.deltaFrames = 200;
96+ e.deltaFrames = 20000;
9697 e.midiData0 = 0x91;
9798 e.midiData1 = 0x55;
9899 e.midiData2 = 0x7F;
@@ -102,7 +103,7 @@ void test0()
102103 auto e = Momiji::Interop::Vst::VstEvent();
103104 e.type = Momiji::Interop::Vst::VstEvent::VstEventTypes::kVstMidiType;
104105 e.flags = Momiji::Interop::Vst::VstEvent::VstMidiEventFlags::kVstMidiEventIsRealtime;
105- e.deltaFrames = 200;
106+ e.deltaFrames = 40000;
106107 e.midiData0 = 0x93;
107108 e.midiData1 = 0x68;
108109 e.midiData2 = 0x7F;
@@ -118,8 +119,8 @@ void test0()
118119
119120 Console::WriteLine("====================================================test0");
120121 {
121- auto inBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,40000);
122- auto outBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,40000);
122+ auto inBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,44110);
123+ auto outBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,44110);
123124 host->Process(inBuffer, outBuffer, outBuffer->Length());
124125 out->Send(outBuffer->GetBuffer()[0]);
125126 }
@@ -127,8 +128,8 @@ void test0()
127128
128129 Console::WriteLine("====================================================test0");
129130 {
130- auto inBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,40000);
131- auto outBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,40000);
131+ auto inBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,44110);
132+ auto outBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,44110);
132133 host->Process(inBuffer, outBuffer, outBuffer->Length());
133134 out->Send(outBuffer->GetBuffer()[0]);
134135 }
@@ -136,8 +137,8 @@ void test0()
136137
137138 Console::WriteLine("====================================================test0");
138139 {
139- auto inBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,40000);
140- auto outBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,40000);
140+ auto inBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,44110);
141+ auto outBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,44110);
141142 host->Process(inBuffer, outBuffer, outBuffer->Length());
142143 out->Send(outBuffer->GetBuffer()[0]);
143144 }
@@ -145,8 +146,8 @@ void test0()
145146
146147 Console::WriteLine("====================================================test0");
147148 {
148- auto inBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,40000);
149- auto outBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,40000);
149+ auto inBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,44110);
150+ auto outBuffer = gcnew Momiji::Core::Vst::Buffer::VstBuffer<System::Single>(2,44110);
150151 host->Process(inBuffer, outBuffer, outBuffer->Length());
151152 out->Send(outBuffer->GetBuffer()[0]);
152153 }