在C#的WinRT的画从MP3流波形 [英] Draw waveform from MP3 stream in C# on WinRT

查看:243
本文介绍了在C#的WinRT的画从MP3流波形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MediaCapture.StartRecordToStreamAsync在Windows RT应用程序()捕捉到MP3格式的音频流(16位,44.1千赫,128Kbps的)。我想知道是否有人知道如何有效地将流成float数组,可以被绘制到画布上。

I'm working on a Windows RT App that uses MediaCapture.StartRecordToStreamAsync() to capture the audio stream in MP3 format (16 bit, 44.1 KHz, 128Kbps). I was wondering if anyone knows how to effectively convert the stream into a float array that can be drawn onto a canvas.

我已经找到了使用一些互操作调用MP3转换为PCM,然后读波来绘制波形的方法。但我想我在寻找一种方式来汲取直接生成MediaCapture流波形。

I already found a way of converting the MP3 to PCM using some Interop calls, and then reading the wave to draw the waveform. But I guess I'm looking for a way to draw the waveform from the stream that generates MediaCapture directly.

任何意见将是极大的AP preciated!

Any advice would be greatly appreciated!

推荐答案

我一直在寻找同样的事情,但没有得到任何答案在这里。我试图去实现一个MediaFoundationTransform,允许观察流之前,它得到了MP3连接codeD(这里没有答案的问题的更通用的方法:<一href="http://stackoverflow.com/questions/13323276/minimum-implementation-of-a-bare-pass-through-media-foundation-audio-mft-for-win">Minimum实施裸通经媒体基金会音频MFT的Windows RT 的)。

I was looking for the same thing, but did not get any answer here. I tried to go the more generic way of implementing a MediaFoundationTransform that allows to observe the stream before it got MP3 encoded (unanswered question here: Minimum implementation of a bare pass through Media Foundation Audio MFT for Windows RT).

我试着写一个MFT它指出在安东Polingers开发Microsoft媒体基础应用(微软preSS)的方式,但这种方式似乎不支持在WinRT的了。我无法找到一个教程做了WinRT的两种。

I tried to write an MFT the way it is pointed out in Anton Polingers "Developing Microsoft Media Foundation Applications" (Microsoft Press), but that way seems unsupported in WinRT, too. And I could not find a tutorial to do it for WinRT either.

所以,我会很感兴趣,如果你找到一个解决方案或者从某个地方的线索。

So, I'd be very interested if you find a solution or get some hints from somewhere.

这篇关于在C#的WinRT的画从MP3流波形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆