如何从网络摄像头捕获帧?我知道GetPreviewFrameAsync
和CapturePhotoTo...()
但可能还有另一种方式吗?
我怎样才能捕获音频帧?现在我从流中捕获帧:
private async Task GetBytesFromAudioStream()
{
try
{
var reader = new DataReader(Audiostream.GetInputStreamAt(FirstAudPos));
_audioBytes = null;
_audioBytes = new byte[this.Audiostream.Size - FirstAudPos];
//Bytes.Text = FirstAudPos + " - " + Audiostream.Size + " = " + (Audiostream.Size - FirstAudPos);
await reader.LoadAsync((uint)(Audiostream.Size - FirstAudPos));
reader.ReadBytes(_audioBytes);
FirstAudPos = Audiostream.Size;
}
catch (Exception ex)
{
rootPage.NotifyUser(ex.ToString()+ " GetBytesFromAudioStream");
}
}
但这种方式并不好。我知道AudioGraph,但我不知道如何将float转换为PCM 那么有人可以帮助我吗?
抱歉我的英语不好。