Compress wav file to wma on Windows Phone 8

天涯浪子 提交于 2019-12-20 05:38:12

问题


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.


回答1:


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

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.



来源:https://stackoverflow.com/questions/25487256/compress-wav-file-to-wma-on-windows-phone-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!