本文整理汇总了Java中javazoom.jl.decoder.Header.calculate_framesize方法的典型用法代码示例。如果您正苦于以下问题:Java Header.calculate_framesize方法的具体用法?Java Header.calculate_framesize怎么用?Java Header.calculate_framesize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javazoom.jl.decoder.Header
的用法示例。
在下文中一共展示了Header.calculate_framesize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: skipFrames
import javazoom.jl.decoder.Header; //导入方法依赖的package包/类
/**
* Skip frames.
* You don't need to call it severals times, it will exactly skip given frames number.
* @param frames
* @return bytes length skipped matching to frames skipped.
*/
public long skipFrames(long frames)
{
if (TDebug.TraceAudioConverter) TDebug.out("skip(long frames) : begin");
int framesRead = 0;
int bytesReads = 0;
try
{
for (int i=0;i<frames;i++)
{
Header header = m_bitstream.readFrame();
if (header != null)
{
int fsize = header.calculate_framesize();
bytesReads = bytesReads + fsize;
}
m_bitstream.closeFrame();
framesRead++;
}
}
catch (BitstreamException e)
{
if (TDebug.TraceAudioConverter) TDebug.out(e);
}
if (TDebug.TraceAudioConverter) TDebug.out("skip(long frames) : end");
currentFrame = currentFrame + framesRead;
return bytesReads;
}
示例2: skipFrames
import javazoom.jl.decoder.Header; //导入方法依赖的package包/类
/**
* Skip frames. You don't need to call it severals times, it will exactly
* skip given frames number.
*
* @param frames
* @return bytes length skipped matching to frames skipped.
*/
public long skipFrames(long frames)
{
int framesRead = 0;
int bytesReads = 0;
try
{
for(int i = 0; i < frames; i++)
{
Header header = m_bitstream.readFrame();
if(header != null)
{
int fsize = header.calculate_framesize();
bytesReads = bytesReads + fsize;
}
m_bitstream.closeFrame();
framesRead++;
}
} catch (BitstreamException e)
{
}
currentFrame = currentFrame + framesRead;
return bytesReads;
}