1 |
/* |
/* |
2 |
* JSampler - a java front-end for LinuxSampler |
* JSampler - a java front-end for LinuxSampler |
3 |
* |
* |
4 |
* Copyright (C) 2005 Grigor Kirilov Iliev |
* Copyright (C) 2005-2006 Grigor Iliev <grigor@grigoriliev.com> |
5 |
* |
* |
6 |
* This file is part of JSampler. |
* This file is part of JSampler. |
7 |
* |
* |
26 |
|
|
27 |
import org.jsampler.CC; |
import org.jsampler.CC; |
28 |
import org.jsampler.HF; |
import org.jsampler.HF; |
|
import org.jsampler.SamplerModel; |
|
|
|
|
29 |
import org.jsampler.SamplerChannelModel; |
import org.jsampler.SamplerChannelModel; |
30 |
|
import org.jsampler.SamplerModel; |
31 |
|
|
32 |
import static org.jsampler.JSI18n.i18n; |
import static org.jsampler.JSI18n.i18n; |
33 |
|
|
34 |
|
|
35 |
/** |
/** |
36 |
* This task updates the sampler channel list and all asampler channels' settings. |
* This task updates the sampler channel list. |
37 |
* @author Grigor Iliev |
* @author Grigor Iliev |
38 |
*/ |
*/ |
39 |
public class UpdateChannels extends EnhancedTask { |
public class UpdateChannels extends EnhancedTask { |
55 |
|
|
56 |
for(SamplerChannelModel m : sm.getChannelModels()) { |
for(SamplerChannelModel m : sm.getChannelModels()) { |
57 |
for(int i = 0; i < chnIDs.length; i++) { |
for(int i = 0; i < chnIDs.length; i++) { |
58 |
if(m.getChannelID() == chnIDs[i]) { |
if(m.getChannelId() == chnIDs[i]) { |
59 |
chnIDs[i] = -1; |
chnIDs[i] = -1; |
60 |
found = true; |
found = true; |
61 |
} |
} |
62 |
} |
} |
63 |
|
|
64 |
if(!found) sm.removeChannel(m.getChannelID()); |
if(!found) sm.removeChannel(m.getChannelId()); |
65 |
found = false; |
found = false; |
66 |
} |
} |
67 |
|
|