HoloToolKitのMicStreamSelector.dllをVS2017で再ビルドする
HoloToolKitのMicStreamSelector.dllをVS2017で再ビルドする際に、
- platform.winmd
にパスが通っていないと怒られた。 たぶんHoloToolKit自体は2015で作られていたからかと。
ソリューションのMicStreamSelectorを右クリックー>プロパティー>C++全般の 追加の#usingディレクトリに 以下を追加して解決。
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\lib\x86\store\references
HoloToolKitのMicStreamSelectorはコード中にマイクのチャンネルが2チャンネル(ステレオ)でべた書きされているため、 Windowsで動作はするのだが、モノラルのマイクだと、エラーを吐いてしまう。
MicStreamSelector.cpp:Line153
if (samplerate != 0) // if not default, then try to set to requested size { settings->EncodingProperties = AudioEncodingProperties::CreatePcm(samplerate, 2, 16); // HoloLens is a 2 channel 16 bit endpoint. }