简体   繁体   English

在 C# 中播放音频时调整平衡

[英]Adjust Balance When Playing Audio in C#

Is there a way to adjust the left/right balance when playing a sound in C# using the built in SoundPlayer class ?使用内置的SoundPlayer class在 C# 中播放声音时,有没有办法调整左/右平衡? I don't want to adjust the overall system balance, just the balance for the sound the program is playing.我不想调整整个系统的平衡,只想调整程序正在播放的声音的平衡。

Sound Player a simple lib to play wave files so dont think it has the capability. Sound Player 一个简单的库来播放波形文件,所以不要认为它有能力。 You can check the AXWindowsMediaPlayer for advance functionality您可以检查 AXWindowsMediaPlayer 以获得高级功能

If you want to stick with SoundPlayer , you can create your Stream -derived class that will wrap around original wave file, but will manipulate sound samples and adjust left and right volume to your liking.如果你想坚持使用SoundPlayer ,你可以创建你的Stream派生的 class ,它将环绕原始波形文件,但会根据你的喜好操纵声音样本并调整左右音量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM