654 |
} |
} |
655 |
|
|
656 |
/** |
/** |
657 |
|
* Gets the position of the specified channel. |
658 |
|
* @param channel The model of the channel. |
659 |
|
* @return The position of the specified channel in the channel list or -1 |
660 |
|
* if the channel is not in the list. |
661 |
|
*/ |
662 |
|
public int |
663 |
|
getChannelIndex(SamplerChannelModel channel) { |
664 |
|
if(channel == null) return -1; |
665 |
|
for(int i = 0; i < channelModels.size(); i++) { |
666 |
|
if(channelModels.get(i).getChannelId() == channel.getChannelId()) return i; |
667 |
|
} |
668 |
|
|
669 |
|
return -1; |
670 |
|
} |
671 |
|
|
672 |
|
/** |
673 |
* Gets the current number of sampler channels. |
* Gets the current number of sampler channels. |
674 |
* @return The current number of sampler channels. |
* @return The current number of sampler channels. |
675 |
*/ |
*/ |