小编Hew*_*ins的帖子

如何在我的C#网站上使用LAME(lame_enc.dll)

我试图在我的C#.NET网站中使用lame_enc.dll而且我被卡住了.

我正在使用:.NET Framework 3.5/Visual Web Developer 2008 Express Edition /(您还需要知道其他什么吗?)

我做的第一件事是从代码项目的C#MP3 Compressor获取代码.我注意到的一件事是这个项目/职位是从2004年1月开始的(所以,它已经过时了)

我将文件夹"yeti.mmedia"和"yeti.mp3"放在我的"App_Code"目录中,并删除了每个文件夹中的"Bin"和"obj"目录.然后我尝试构建项目.当我遇到错误时,我最终从项目中排除了以下文件:

  • yeti.mmedia /的AssemblyInfo.cs
  • yeti.mmedia/EditWaveWriter.cs
  • yeti.mmedia/EditWaveWriter.resx
  • yeti.mmedia/InFormatEdit.cs
  • yeti.mmedia/InFormatEdit.resx
  • yeti.mmedia/NumericTextBox.cs
  • yeti.mmedia/NumericTextBox.resx
  • yeti.mmedia/Win32Functions.cs
  • yeti.mp3 /的AssemblyInfo.cs
  • yeti.mp3/EditMp3Writer.cs
  • yeti.mp3/EditMp3Writer.resx

在我看来,这些是与Windows UI相关的代码文件(我不需要我在网上这样做).

我还将文件"lame_enc.dll"放在Bin目录中.

我根据上面链接的页面上的示例创建了一个测试页面:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using WaveLib;
using Yeti.MMedia;
using Yeti.MMedia.Mp3;

public partial class Documents : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        WaveStream InStr = new WaveStream(Server.MapPath(@"Temp/SomeFile.wav"));
        try {
            Mp3Writer writer = new Mp3Writer(new FileStream(Server.MapPath(@"Temp/SomeFile.mp3"), FileMode.Create), …
Run Code Online (Sandbox Code Playgroud)

.net c# lame

5
推荐指数
1
解决办法
5331
查看次数

标签 统计

.net ×1

c# ×1

lame ×1