本文整理汇总了Java中javazoom.jl.decoder.Decoder类的典型用法代码示例。如果您正苦于以下问题:Java Decoder类的具体用法?Java Decoder怎么用?Java Decoder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Decoder类属于javazoom.jl.decoder包,在下文中一共展示了Decoder类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Player
import javazoom.jl.decoder.Decoder; //导入依赖的package包/类
public Player(InputStream stream, AudioDevice device) throws JavaLayerException
{
bitstream = new Bitstream(stream);
decoder = new Decoder();
if (device != null)
{
audio = device;
}
else
{
FactoryRegistry r = FactoryRegistry.systemRegistry();
audio = r.createAudioDevice();
}
audio.open(decoder);
}
示例2: Player
import javazoom.jl.decoder.Decoder; //导入依赖的package包/类
public Player(InputStream stream, AudioDevice device) throws JavaLayerException
{
bitstream = new Bitstream(stream);
decoder = new Decoder();
if (device!=null)
{
audio = device;
}
else
{
FactoryRegistry r = FactoryRegistry.systemRegistry();
audio = r.createAudioDevice();
}
audio.open(decoder);
}
示例3: convert
import javazoom.jl.decoder.Decoder; //导入依赖的package包/类
public void convert(String sourceName, String destName,
ProgressListener progressListener, Decoder.Params decoderParams)
throws JavaLayerException
{
if (destName.length()==0)
destName = null;
try {
InputStream in = openInput(sourceName);
convert(in, destName, progressListener, decoderParams);
in.close();
} catch(IOException ioe) {
throw new JavaLayerException(ioe.getLocalizedMessage(), ioe);
}
}
示例4: open
import javazoom.jl.decoder.Decoder; //导入依赖的package包/类
/**
* Opens this audio device.
*
* @param decoder The decoder that will provide audio data
* to this audio device.
*/
public synchronized void open(Decoder decoder) throws JavaLayerException
{
if (!isOpen())
{
this.decoder = decoder;
openImpl();
setOpen(true);
}
}
示例5: AdvancedPlayer
import javazoom.jl.decoder.Decoder; //导入依赖的package包/类
public AdvancedPlayer(InputStream stream, AudioDevice device) throws JavaLayerException
{
bitstream = new Bitstream(stream);
if (device!=null) audio = device;
else audio = FactoryRegistry.systemRegistry().createAudioDevice();
audio.open(decoder = new Decoder());
}
示例6: getAudioFormat
import javazoom.jl.decoder.Decoder; //导入依赖的package包/类
protected AudioFormat getAudioFormat()
{
if (fmt==null)
{
Decoder decoder = getDecoder();
fmt = new AudioFormat(decoder.getOutputFrequency(),
16,
decoder.getOutputChannels(),
true,
false);
}
return fmt;
}