音频转换C# [英] Audio Conversion C#

查看:373
本文介绍了音频转换C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是将各种音频格式转换为PCM的最佳方式?例如:mp3,evrc,ogg vox。



有没有一个库可以让我实现这个比较简单?

编辑: p>

我想我最初的问题并不是我真正需要的。我找到的大部分库都是文件转换器。我需要的是一个块转换器,在这里我传入一个1Kb的vox数据块并返回其转换的PCM块。当然,我将不得不告诉转换器它是什么类型的数据和各种编解码器信息。



我要做的解决方案是保存和VOIP格式转换成一个普通的wav格式,并实时播放该文件。我认为应该有一个简单的方法来做到这一点,因为所有的音频最终都是在输出PCM之前变成PCM。 您可以使用 NAudio 将压缩音频块传送到您机器上安装的任何ACM编解码器。您需要知道如何创建适当的WAVEFORMAT结构来正确描述压缩音频类型。


What is the best way to convert various audio formats to PCM?

For example: mp3, evrc, ogg vox.

Is there a library out there that will allow me to implement this relatively easily?

EDIT:

I guess my initial question wasn't really what I needed. Most of the libs I have found are file converters. What I need is a block converter, where I pass in a 1Kb block of vox data and it returns its converted PCM block. Of course I’ll have to tell the converter what type of data it is and various pieces of codec information.

The solution I am going for is to save and VOIP formats into a common wav format and to play that conformed file in real time. I thought there should be an easy way to do this because all audio is eventually turned into PCM before it is outputted anyways.

解决方案

You can use NAudio to pass blocks of compressed audio into any ACM codecs you have installed on your machine. You do need to know how to create the appropriate WAVEFORMAT structure to describe the compressed audio type correctly though.

这篇关于音频转换C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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