从一个音频文件同时播放多个音频流

发布于 2024-07-18 04:28:20 字数 480 浏览 3 评论 0原文

我编写了一个应用程序,它从中央服务器接收媒体文件并根据播放列表播放这些文件。 一切运作良好。 一位客户联系了我们,希望使用我们的应用程序在信息亭式应用程序中播放一些音频文件作为演示文稿。 到目前为止,一切顺利,我们的应用程序可以毫无问题地处理这个问题。

他要求我们在售货亭前面设置多个耳机插孔作为一项潜在功能。 每个耳机插座都会以不同的语言播放相同的音频演示。

我提出了对单个音频文件进行编码的想法,其中包含多种语言的演示,并且每种语言在不同的通道中。 然后,我们需要一个可以解码每个通道并将其输出到不同耳机插座的声卡。 问题是,虽然我认为这个理论是合理的,但我完全不知道这是否可行以及需要什么才能实现它。

有任何想法吗?!

附带说明:该应用程序使用 Media Player 作为底层组件来处理音频和视频的播放。 对于我们可以用来生成多通道音频流的软件和我们可以用来解码流的硬件(USB 声卡就可以了),我将不胜感激。 谢谢!

I have written an application that receives media files from a central server and plays those files according to a playlist. All works well.
A client has contacted us and wants to use our application to play some audio files as presentations in a kiosk-style application. So far, so good, our application can handle this no problems.

He has requested as a potential feature that we would have a number of headphone sockets at the front of the kiosk. Each headphone socket would play the same audio presentation in a different language.

I have come up with the idea of encoding a single audio file with the presentation in multiple languages, and each language in a different channel. We would then require a sound card that could decode each channel and output it on a different headphone socket.
Thing is, while I'm think the theory is sound, I have absolutely no idea whether this is feasible and what would be required to pull it off.

Any ideas?!

As a side-note: the application uses Media Player as the underlying component to handle the playback of audio and video. I'd appreciate any help as to the software we could use to generate the multi-channel audio stream and the hardware (USB sound card would be fine) that we could use to decode the stream.
Thanks!

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

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

发布评论

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

评论(2

怪我太投入 2024-07-25 04:28:20

您需要使用多个文件而不是通道,这样会更容易。
不要使用媒体播放器,而是使用 DirectShow (在 .NET 上,您有 < a href="http://directshownet.sourceforge.net/" rel="nofollow noreferrer">DirectShow.NET),在 DirectShow 中,您可以在同一个图表上看到多个文件的表示法。

您将能够控制哪个音频设备播放哪些文件,并且您的播放、暂停、停止命令将在所有文件上执行,而无需担心同步。
有很多关于如何构建媒体播放器(例如 DiectShow)的示例,将它们扩展为使用多个文件应该非常容易。

对于硬件,请查看(带 8 个输出通道的 USB)

You need to use multiple files not channels, its going to be way easier that way.
Instead of using Media Player use DirectShow (on .NET you have DirectShow.NET), In DirectShow you have the notation of Multiple files on the same graph.

You will be able to control to which audio device play which files, and your Play, Pause, Stop commands will be preformed on all files without you need to worry about syncing.
There are many samples on how to build media player like with DiectShow, extending them to use multiple files should be really easy.

For HW take a look at this (USB with 8 output channels)

永不分离 2024-07-25 04:28:20

我认为使用 Shay 的硬件您已经获得了完整的解决方案:
在每个通道上使用不同的单声道音轨对 7.1 文件进行编码。
在 7.1 模式下使用 8 通道输出设备,每个端口配备不同的耳机,就可以了。 或者,如果您只有 6 种语言,则 5.1 文件即可。 许多 PC 都内置 5.1 输出,您只需要 3 个分配器即可从每个插孔分离出左声道和右声道。

您可以使用 Windows Media Encoder 或其他进行编码专业音频工具。

I think with Shay's hardware you've got a complete solution:
Encode a 7.1 file with a different mono voice track on each channel.
Use the 8 channel output device in 7.1 mode, with a different headset in each port, and you've got it. Or, if you only have 6 languages, a 5.1 file would work. Many PC's have 5.1 outputs built in, you'd only need 3 splitters to break out the left and right channels from each jack.

You can do the encoding with Windows Media Encoder, or other pro audio tool.

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