我不喜欢穿线 [英] im a noob to threading
问题描述
这是我的情况...
ere's my situation...
public int LoopbackWasapiProc(
IntPtr buffer,
int length,
IntPtr user)
{
for(int x=0; x < outputs.Count(); x++)
{
if (outputs[x] != 0)
{
Bass.BASS_StreamPutData(outputs[x], buffer, length);
}
}
return 1;
}
我想要这条线
I'd like this line
Bass.BASS_StreamPutData(outputs[x], buffer, length);
在此循环中与其余输出[x]同步执行.
To be executed in sync with the rest of the outputs[x] in this loop.
我是线程技术的新手,但我敢肯定线程是答案.
I'm new to threading, but I'm sure threads are the answer.
虽然,我不知道从哪里开始解决这个特殊问题.
Although, I don't know where to begin for this particular problem.
我在LoopbackWasapiProc中发现,我只是继续将缓冲区和长度设置为全局变量,然后运行带有output [x]作为参数的基本线程,然后反复从全局变量中获取数据并调用StreamPutData ... =/
I figured in my LoopbackWasapiProc i'd just keep setting buffer and length to a global variable and then run a basic thread with outputs[x] as a paramter and just repeatedly grabbing data from the global variables and calling StreamPutData... makes a bunch of wierd static noise though =/
推荐答案
我想您需要混频器
I guess you need a mixer
http://www.bass.radio42.com/help/html/aa94bf9a-48e3-6b95-fdf1-8fc4bd46fb39.htm
http://www.bass.radio42.com/help/html/aa94bf9a-48e3-6b95-fdf1-8fc4bd46fb39.htm
这篇关于我不喜欢穿线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!