本文整理汇总了Java中org.tritonus.share.sampled.AudioSystemShadow类的典型用法代码示例。如果您正苦于以下问题:Java AudioSystemShadow类的具体用法?Java AudioSystemShadow怎么用?Java AudioSystemShadow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AudioSystemShadow类属于org.tritonus.share.sampled包,在下文中一共展示了AudioSystemShadow类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JSStreamingSampleRecorder
import org.tritonus.share.sampled.AudioSystemShadow; //导入依赖的package包/类
/**
*
* @param fileName
* @param fileType
* @param fileFormat
*/
JSStreamingSampleRecorder(JSMinim sys,
String fileName,
AudioFileFormat.Type fileType,
AudioFormat fileFormat,
int bufferSize)
{
name = fileName;
type = fileType;
format = fileFormat;
system = sys;
try
{
aos = AudioSystemShadow.getAudioOutputStream( type, format,
AudioSystem.NOT_SPECIFIED,
new File(name) );
}
catch (IOException e)
{
system.error("Error obtaining new output stream: " + e.getMessage());
}
catch (IllegalArgumentException badarg)
{
system.error("Error obtaining new output stream for " + fileName + " with type "
+ type.toString() + " format " + format.toString()
+ " and bufferSize " + bufferSize + ".\n"
+ "The reason is " + badarg.getMessage());
}
fsb = new FloatSampleBuffer(format.getChannels(),
bufferSize,
format.getSampleRate());
recording = false;
}