播放声音播放使用多个声音声音、多个

2023-09-02 21:36:16 作者:像阵风吹过

我在做采样方案,其中从1到9的每个键会做出不同的声音。 一切工作正常,但是当我preSS两个(或更多)的声音在同一时间,第二个杀的第一个。

I'm making a sampler program where each key from 1 to 9 will make a different sound. Everything works fine, but when I press two (or more) sounds at the same time, the second one "kills" the first one.

我是从.WAV文件播放声音,使用声音播放。我该如何解决这个问题?

I'm playing the sounds from .WAV files, using SoundPlayer. How can I solve this?

推荐答案

您需要使用DirectX(DirectSound的),或者被设计成允许多种声音的播放,同时一些类似的API。

You'll need to use DirectX (DirectSound) or some similar API that is designed to allow the playing of multiple sounds at the same time.

 
精彩推荐
图片推荐