Windows Azure /Windows Server 2008 R2 中的 NAudio

发布于 2024-10-20 19:44:32 字数 498 浏览 9 评论 0原文

我正在使用 NAudio 将几个 mp3 文件合并在一起以形成 Windows Azure 产品。它在开发环境中工作正常,但一旦我将其上传到 Azure,我就会收到“无驱动器调用 acmFormatSuggest”错误。

以下是我迄今为止在 Windows Azure Box 上所做的尝试解决该问题的列表。

(i) 启用 Windows 音频服务 (ii) 安装了 Windows Media Player 支持的 Fraunhofer IIS MPEG Layer-3 ACM 编解码器。 (iii) 安装 Lame Mp3 编解码器 (iv) 安装了 K-Lite Codec

该进程本身是一个工作进程,并且在完全信任的情况下运行。代码本身从 blob 中读取 mp3 文件,使用本地文件将其合并在一起,然后将其恢复到 blob 中。

任何想法或建议都会非常有帮助。

I am using NAudio
to merge a few mp3 files together for a Windows Azure product. It works fine in the dev environment but once i upload it to Azure, I get the "No Drive Calling acmFormatSuggest" error.

Here's the list of things I have done so far on the Windows Azure Box, trying to fix the issue.

(i) Enabled Windows Audio Service
(ii) Installed the Fraunhofer IIS MPEG Layer-3 ACM Codec that is supported by Windows Media Player.
(iii) Installed the Lame Mp3 Codec
(iv) Installed the K-Lite Codec

The process itself is a worker process and is running under full trust. The code itself reads the mp3 files from the blob, merges it together using a local file and restores it in the blob.

Any ideas or suggestions will be greatly helpful.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

森末i 2024-10-27 19:44:32

我自己解决了这个问题,以下是要遵循的步骤:

手动:

  1. 通过服务器管理器,您可以添加 Windows 功能“桌面体验”
  2. 必须使其生效)
  3. 按要求重新启动服务器(您 现在可以使用 NAudio 使用的常规 Mp3 音频编解码器(不需要 Dmo)

自动(Azure 部署)

您角色的 Startup.cmd 启动任务中:

echo Begin Install Desktop Experience Feature (for sound codec) >> startup.log
ServerManagerCMD.exe -install Desktop-Experience -restart -resultPath     desktopexperience_results.xml
REM This return code indicates the feature is already installed. Reset the errorlevel to zero using the verify command.
IF %ERRORLEVEL% EQU 1003 (
    echo Windows feature is already installed >> startup.log
    VERIFY > NUL
)
echo End Install Desktop Experience Feature >> startup.log

将这些命令添加到 Azure 中适合 重要的是,此脚本返回零的结果代码 (%ERRORLEVEL%)(上面的代码会执行此操作,排除任何实际问题)。

当 ServerManagerCMD 不需要安装该功能时(可能是因为它已经从之前的 Startup.cmd 运行中安装),它将返回非零错误代码,因此我们明确需要检查该代码 (1003) 并将其静音使用验证>空。

I battled this myself, and these are the steps to follow:

Manually:

  1. Via Server Manager you can add the Windows Feature "Desktop experience"
  2. Reboot the server as requested (you must for it to take effect)
  3. You can now use the regular Mp3 audio codec NAudio uses (you don't need the Dmo one)

Automatically (Azure deployments):

Add these commands to a Startup.cmd startup task in Azure for your role:

echo Begin Install Desktop Experience Feature (for sound codec) >> startup.log
ServerManagerCMD.exe -install Desktop-Experience -restart -resultPath     desktopexperience_results.xml
REM This return code indicates the feature is already installed. Reset the errorlevel to zero using the verify command.
IF %ERRORLEVEL% EQU 1003 (
    echo Windows feature is already installed >> startup.log
    VERIFY > NUL
)
echo End Install Desktop Experience Feature >> startup.log

Note that it is important this script returns a result code (%ERRORLEVEL%) of zero (which the above will do, bar any actual problems).

The ServerManagerCMD will return a non-zero error code when it does not need to install the feature (perhaps because it was already installed from a previous Startup.cmd run), so we explicitly need to check for that code (1003) and silence it using VERIFY > NUL.

贪了杯 2024-10-27 19:44:32

请参阅我对此问题的回答。此外,您需要确保运行的是 32 位进程,因为大多数 ACM 都是 32 位。

See my answer to this question. Also, you need to be sure you are running a 32 bit process, as most ACMs are 32 bit.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文