本文整理汇总了Java中javax.sound.midi.SoundbankResource类的典型用法代码示例。如果您正苦于以下问题:Java SoundbankResource类的具体用法?Java SoundbankResource怎么用?Java SoundbankResource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SoundbankResource类属于javax.sound.midi包,在下文中一共展示了SoundbankResource类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getResources
import javax.sound.midi.SoundbankResource; //导入依赖的package包/类
public SoundbankResource[] getResources() {
SoundbankResource[] resources
= new SoundbankResource[layers.size() + samples.size()];
int j = 0;
for (int i = 0; i < layers.size(); i++)
resources[j++] = layers.get(i);
for (int i = 0; i < samples.size(); i++)
resources[j++] = samples.get(i);
return resources;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:SF2Soundbank.java
示例2: addResource
import javax.sound.midi.SoundbankResource; //导入依赖的package包/类
public void addResource(SoundbankResource resource) {
if (resource instanceof SF2Instrument)
instruments.add((SF2Instrument)resource);
if (resource instanceof SF2Layer)
layers.add((SF2Layer)resource);
if (resource instanceof SF2Sample)
samples.add((SF2Sample)resource);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:SF2Soundbank.java
示例3: removeResource
import javax.sound.midi.SoundbankResource; //导入依赖的package包/类
public void removeResource(SoundbankResource resource) {
if (resource instanceof SF2Instrument)
instruments.remove((SF2Instrument)resource);
if (resource instanceof SF2Layer)
layers.remove((SF2Layer)resource);
if (resource instanceof SF2Sample)
samples.remove((SF2Sample)resource);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:SF2Soundbank.java
示例4: getResources
import javax.sound.midi.SoundbankResource; //导入依赖的package包/类
public SoundbankResource[] getResources() {
SoundbankResource[] resources = new SoundbankResource[samples.size()];
int j = 0;
for (int i = 0; i < samples.size(); i++)
resources[j++] = samples.get(i);
return resources;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:DLSSoundbank.java
示例5: main
import javax.sound.midi.SoundbankResource; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
SimpleSoundbank soundbank = new SimpleSoundbank();
SoundbankResource res = new SoundbankResource(soundbank, "test", null) {
public Object getData() {
return null;
}};
soundbank.addResource(res);
assertEquals(soundbank.getResources().length, 1);
assertEquals(soundbank.getResources()[0], res);
}
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:11,代码来源:AddResource.java
示例6: getResources
import javax.sound.midi.SoundbankResource; //导入依赖的package包/类
@Override
public SoundbankResource[] getResources() {
SoundbankResource[] resources
= new SoundbankResource[layers.size() + samples.size()];
int j = 0;
for (int i = 0; i < layers.size(); i++)
resources[j++] = layers.get(i);
for (int i = 0; i < samples.size(); i++)
resources[j++] = samples.get(i);
return resources;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:SF2Soundbank.java
示例7: removeResource
import javax.sound.midi.SoundbankResource; //导入依赖的package包/类
public void removeResource(SoundbankResource resource) {
if (resource instanceof SF2Instrument)
instruments.remove(resource);
if (resource instanceof SF2Layer)
layers.remove(resource);
if (resource instanceof SF2Sample)
samples.remove(resource);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:SF2Soundbank.java
示例8: getResources
import javax.sound.midi.SoundbankResource; //导入依赖的package包/类
@Override
public SoundbankResource[] getResources() {
SoundbankResource[] resources = new SoundbankResource[samples.size()];
int j = 0;
for (int i = 0; i < samples.size(); i++)
resources[j++] = samples.get(i);
return resources;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:DLSSoundbank.java
注:本文中的javax.sound.midi.SoundbankResource类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论