开源C#名称空间转换许多音频格式 [英] Open source C# namespace to convert many audio formats

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

问题描述

我刚刚发布了一个名为

''umplib''的C#项目的初始测试版。 aumplib是一个C#命名空间,它由一组

类组成,通过DLL和P / Invoke:LAME(MP3编码)连接几个突出的开源音频转换

项目),libsndfile(非MP3

音频转换)和libmad(MP3解码;通过madlldlib)。

基本上,aumplib为这些库提供了一个OO包装器。 />

我对任何人想对代码做出的评论感兴趣。

我已经编程C#不到一年了(在其他编程

语言更长),并希望确保我没有就C#的使用做出一些

的失礼。如果你想要

来评论,请建设性。


你可以在以下网址下载资料来源:

http://www.arbingersys.com/dnlds/aumplib-1.0b1.zip


(有太多源文件可以尝试粘贴到此消息中。)如果

您希望在我的评论中留下您的意见或问题发展论坛你

可以:

http://www.arbingersys.com/forums/viewforum.php?f=3

命名空间如何简要概述安排在下面。


名称空间aumplib {


- 类aumpifc

[其他类的主要接口]


- 类lame_wrap

[与LAME DLL接口,lame_enc.dll,用于MP3编码]


- 类lame_write

[使用lame_wrap和overr ides BinaryWriter更容易在C#中使用]


- 类libsndf_wrap

[与libsndfile.dll接口以转换许多非MP3音频

格式]


- 类madlldlib_wrap

[与madlldlib接口,用于解码MP3的DLL]


- 类madnpsrv_wrap

[使用命名管道与madlldlib进行通信以进行MP3解码]


}


谢谢,詹姆斯

解决方案

我没有看到任何弹出的东西,但作为一些建设性的批评,

你的 ;接口"对你的开发者用户来说有点令人困惑,而且b $ b令人生畏。


一方面,你不想让这个Fisher-Price我的第一个

编程对象,但另一方面,

使事情变得简单明了也没有错。开发人员还有其他事情可做,你的

对象应该通过易于使用和直观来帮助他。


作为一般规则(至少现在和在.NET中) - 方法参数应该

有常规名称,没有前缀。换句话说:


lame_write(Stream ostrm,string ifilnm)


应该是最好的(总是使用动词 - 名词,就像GetUser(),

AddCompany(),DeleteStream()等):


WriteLame(Stream OutputStream,string FullPathAndFilename)

>
点,当你拥有所有功能时,你应该花一些时间

来使开发人员界面尽可能干净和简单。他们有更好的事情要做,而不是想弄清楚你在想什么,或者想要了解这些令人难以置信的一堆信件 - 比如ostrm ;

和ifilnm!!


只是我的


.02 - 没有冒犯!!

< gi *** @ arbingersysBADSPAMBOT.com>在消息中写道

news:e


************** @ TK2MSFTNGP09.phx.gbl ...

我刚刚发布了一个名为
''aumplib''的C#项目的初始测试版。 aumplib是一个C#命名空间,它由一组类组成,它们通过DLL和P / Invoke连接几个着名的开源音频转换项目:LAME(MP3编码),libsnd文件(非MP3音频)
转换)和libmad(MP3解码;通过madlldlib)。从本质上讲,
aumplib为这些库提供了一个OO包装。

我对任何想要对代码做出的评论感兴趣。
我一直在为C#编程不到一年(用其他语言编程的时间更长),并希望确保我在C#的使用方面没有做出任何虚假的反应。如果你想评论,请建设性的。

你可以在以下网址下载源代码:

http://www.arbingersys.com/dnlds/aumplib-1.0b1.zip
(有太多源文件可以尝试粘贴到此消息中。)如果您希望在我的开发论坛中留下您的意见或问题,您可以:

http://www.arbingersys.com/forums/viewforum.php?f = 3

下面是如何安排命名空间的简要说明。

命名空间aumplib {

- 类aumpifc
[其他类的主要接口]

- 类lame_wrap
[与LAME DLL接口,lame_enc.dll,用于MP3编码]

- 类lame_write
[使用lame_wrap并覆盖BinaryWriter以便在C#中更容易使用]

- 类libsndf_wrap
[与libsndfile.dll接口转换许多非MP3音频
格式]

- 类madlldlib_wrap
[接口到madlldlib,一个用于解码MP3的DLL]

- 类madnpsrv_wrap
[使用命名管道与madlldlib进行通信以进行MP3解码]



谢谢,James


Hi, I have just released the initial beta of a C# project called
''aumplib''. aumplib is a C# namespace which is made up of a set of
classes that interface several prominent open source audio conversion
projects via DLL and P/Invoke: LAME (MP3 encoding), libsndfile (non-MP3
audio conversion), and libmad (MP3 decoding; through madlldlib).
Essentially, aumplib provides an OO wrapper to these libraries.

I am interested in any comments anyone would like to make on the code.
I''ve been programming C# for less than a year (programming in other
languages longer), and would like to ensure that I haven''t made some
faux pas in regard to the use of C#. Please be constructive if you want
to comment.

You can download the source at:

http://www.arbingersys.com/dnlds/aumplib-1.0b1.zip

(There''s too many source files to try and paste into this message.) If
you wish to leave your comments or questions in my development forum you
can:

http://www.arbingersys.com/forums/viewforum.php?f=3

A short outline of how the namespace is arranged is below.

namespace aumplib {

- class aumpifc
[Primary interface to other classes]

- class lame_wrap
[Interfaces with LAME DLL, lame_enc.dll, for MP3 encoding]

- class lame_write
[Uses lame_wrap and overrides BinaryWriter for easier usage in C#]

- class libsndf_wrap
[Interfaces with libsndfile.dll to convert between many non-MP3 audio
formats]

- class madlldlib_wrap
[Interfaces to madlldlib, a DLL for decoding MP3]

- class madnpsrv_wrap
[Uses named pipes to communicate to madlldlib for MP3 decoding]

}

Thanks, James

解决方案

I didn''t see anything that popped out, but as some constructive criticism,
your "interface" to your developer users is sort of confusing and
intimidating.

On the one hand, you don''t want to have this Fisher-Price "My First
Programming Object", but on the other hand, there is nothing wrong with
making things nice and simple. A developer has other things to do, your
object should HELP him by being easy to use and intuitive.

As a general rule (at least nowadays and in .NET) - method arguments should
have regular names, and no prefixes. In other words:

lame_write(Stream ostrm, string ifilnm)

should be prettied up to be (ALWAYS use verb-noun, like GetUser(),
AddCompany(), DeleteStream(), etc):

WriteLame(Stream OutputStream, string FullPathAndFilename)

Point is, when you have all your functionality, you should spend some time
to make the developer interface as clean and simple as possible. They have
better things to do than to try to figure out what you were thinking or
trying to make sense of these eye-crossing bunch of letters - like "ostrm"
and "ifilnm"!!

Just my


.02 - no offense!!
<gi***@arbingersysBADSPAMBOT.com> wrote in message
news:e


**************@TK2MSFTNGP09.phx.gbl...

Hi, I have just released the initial beta of a C# project called
''aumplib''. aumplib is a C# namespace which is made up of a set of classes
that interface several prominent open source audio conversion projects via
DLL and P/Invoke: LAME (MP3 encoding), libsndfile (non-MP3 audio
conversion), and libmad (MP3 decoding; through madlldlib). Essentially,
aumplib provides an OO wrapper to these libraries.

I am interested in any comments anyone would like to make on the code.
I''ve been programming C# for less than a year (programming in other
languages longer), and would like to ensure that I haven''t made some faux
pas in regard to the use of C#. Please be constructive if you want to
comment.

You can download the source at:

http://www.arbingersys.com/dnlds/aumplib-1.0b1.zip

(There''s too many source files to try and paste into this message.) If you
wish to leave your comments or questions in my development forum you can:

http://www.arbingersys.com/forums/viewforum.php?f=3

A short outline of how the namespace is arranged is below.

namespace aumplib {

- class aumpifc
[Primary interface to other classes]

- class lame_wrap
[Interfaces with LAME DLL, lame_enc.dll, for MP3 encoding]

- class lame_write
[Uses lame_wrap and overrides BinaryWriter for easier usage in C#]

- class libsndf_wrap
[Interfaces with libsndfile.dll to convert between many non-MP3 audio
formats]

- class madlldlib_wrap
[Interfaces to madlldlib, a DLL for decoding MP3]

- class madnpsrv_wrap
[Uses named pipes to communicate to madlldlib for MP3 decoding]

}

Thanks, James



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

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