在 Windows Phone 8 上将 wav 文件压缩为 wma [英] Compress wav file to wma on Windows Phone 8

查看:19
本文介绍了在 Windows Phone 8 上将 wav 文件压缩为 wma的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在 Windows Phone 上用 wma(或 mp3、ogg 等)编码 wav 文件.我没有在网上找到任何资源.关于如何存档的任何想法?

I am looking to encode a wav file in wma (or mp3, ogg, etc) on Windows Phone. I have not found any resources online. Any ideas on how I can archive this?

我正在尝试从麦克风录制声音并从手机上传.这就是为什么我更喜欢在发送之前压缩音频文件.

I am trying to record a voice from the microphone and upload it from the phone. That's why I prefer to compress the audio file before sending it.

推荐答案

从 Windows Phone 8.1 开始,您可以使用 MediaTranscoder 类.

Starting from Windows Phone 8.1, you can use MediaTranscoder class for that.

此外,从 WP 8.0 开始,您可以使用 AudioVideoCaptureDevice 直接录制为压缩格式.不幸的是,这种方法既不支持 MP3 也不支持 WMA,但您可以在 AACAMR 编解码器.这是示例代码.

Also, since WP 8.0 you can use AudioVideoCaptureDevice to record directly into the compressed format. Unfortunately for you, neither MP3 or WMA is supported with this method, but you can choose between AAC and AMR codecs. Here's a sample code.

这篇关于在 Windows Phone 8 上将 wav 文件压缩为 wma的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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