javazoom.jl.decoder.Header.mode()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(143)

本文整理了Java中javazoom.jl.decoder.Header.mode()方法的一些代码示例,展示了Header.mode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Header.mode()方法的具体详情如下:
包路径:javazoom.jl.decoder.Header
类名称:Header
方法名:mode

Header.mode介绍

[英]Returns Mode.
[中]返回模式。

代码示例

代码示例来源:origin: libgdx/libgdx

if (header == null) break;
if (outputBuffer == null) {
  channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
  outputBuffer = new OutputBuffer(channels, false);
  decoder.setOutputBuffer(outputBuffer);

代码示例来源:origin: libgdx/libgdx

if (header == null) break;
if (outputBuffer == null) {
  channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
  outputBuffer = new OutputBuffer(channels, false);
  decoder.setOutputBuffer(outputBuffer);

代码示例来源:origin: libgdx/libgdx

if (header == null) break;
if (outputBuffer == null) {
  channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
  outputBuffer = new OutputBuffer(channels, false);
  decoder.setOutputBuffer(outputBuffer);

代码示例来源:origin: libgdx/libgdx

if (header == null) break;
if (outputBuffer == null) {
  channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
  outputBuffer = new OutputBuffer(channels, false);
  decoder.setOutputBuffer(outputBuffer);

代码示例来源:origin: libgdx/libgdx

public Music (OpenALAudio audio, FileHandle file) {
  super(audio, file);
  if (audio.noDevice) return;
  bitstream = new Bitstream(file.read());
  decoder = new MP3Decoder();
  bufferOverhead = 4096;
  try {
    Header header = bitstream.readFrame();
    if (header == null) throw new GdxRuntimeException("Empty MP3");
    int channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
    outputBuffer = new OutputBuffer(channels, false);
    decoder.setOutputBuffer(outputBuffer);
    setup(channels, header.getSampleRate());
  } catch (BitstreamException e) {
    throw new GdxRuntimeException("error while preloading mp3", e);
  }
}

代码示例来源:origin: libgdx/libgdx

public Music (OpenALAudio audio, FileHandle file) {
  super(audio, file);
  if (audio.noDevice) return;
  bitstream = new Bitstream(file.read());
  decoder = new MP3Decoder();
  bufferOverhead = 4096;
  try {
    Header header = bitstream.readFrame();
    if (header == null) throw new GdxRuntimeException("Empty MP3");
    int channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
    outputBuffer = new OutputBuffer(channels, false);
    decoder.setOutputBuffer(outputBuffer);
    setup(channels, header.getSampleRate());
  } catch (BitstreamException e) {
    throw new GdxRuntimeException("error while preloading mp3", e);
  }
}

代码示例来源:origin: libgdx/libgdx

public Music (OpenALAudio audio, FileHandle file) {
  super(audio, file);
  if (audio.noDevice) return;
  bitstream = new Bitstream(file.read());
  decoder = new MP3Decoder();
  bufferOverhead = 4096;
  try {
    Header header = bitstream.readFrame();
    if (header == null) throw new GdxRuntimeException("Empty MP3");
    int channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
    outputBuffer = new OutputBuffer(channels, false);
    decoder.setOutputBuffer(outputBuffer);
    setup(channels, header.getSampleRate());
  } catch (BitstreamException e) {
    throw new GdxRuntimeException("error while preloading mp3", e);
  }
}

代码示例来源:origin: libgdx/libgdx

public Music (OpenALAudio audio, FileHandle file) {
  super(audio, file);
  if (audio.noDevice) return;
  bitstream = new Bitstream(file.read());
  decoder = new MP3Decoder();
  bufferOverhead = 4096;
  try {
    Header header = bitstream.readFrame();
    if (header == null) throw new GdxRuntimeException("Empty MP3");
    int channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
    outputBuffer = new OutputBuffer(channels, false);
    decoder.setOutputBuffer(outputBuffer);
    setup(channels, header.getSampleRate());
  } catch (BitstreamException e) {
    throw new GdxRuntimeException("error while preloading mp3", e);
  }
}

代码示例来源:origin: libgdx/libgdx

if (header == null) break;
if (setup) {
  int channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
  outputBuffer = new OutputBuffer(channels, false);
  decoder.setOutputBuffer(outputBuffer);

代码示例来源:origin: libgdx/libgdx

if (header == null) break;
if (setup) {
  int channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
  outputBuffer = new OutputBuffer(channels, false);
  decoder.setOutputBuffer(outputBuffer);

代码示例来源:origin: libgdx/libgdx

if (header == null) break;
if (setup) {
  int channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
  outputBuffer = new OutputBuffer(channels, false);
  decoder.setOutputBuffer(outputBuffer);

代码示例来源:origin: libgdx/libgdx

if (header == null) break;
if (setup) {
  int channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
  outputBuffer = new OutputBuffer(channels, false);
  decoder.setOutputBuffer(outputBuffer);

代码示例来源:origin: com.badlogicgames.jlayer/jlayer

private void initialize (Header header) throws DecoderException {
  // REVIEW: allow customizable scale factor
  float scalefactor = 32700.0f;
  int mode = header.mode();
  header.layer();
  int channels = mode == Header.SINGLE_CHANNEL ? 1 : 2;
  // set up output buffer if not set up by client.
  if (output == null) throw new RuntimeException("Output buffer was not set.");
  filter1 = new SynthesisFilter(0, scalefactor, null);
  // REVIEW: allow mono output for stereo
  if (channels == 2) filter2 = new SynthesisFilter(1, scalefactor, null);
  outputChannels = channels;
  outputFrequency = header.frequency();
  initialized = true;
}

代码示例来源:origin: tulskiy/musique

public void decodeFrame() {
  num_subbands = header.number_of_subbands();
  subbands = new Subband[32];
  mode = header.mode();
  createSubbands();
  readAllocation();
  readScaleFactorSelection();
  if ((crc != null) || header.checksum_ok()) {
    readScaleFactors();
    readSampleData();
  }
}

代码示例来源:origin: com.badlogicgames.jlayer/jlayer

public void decodeFrame () throws DecoderException {
  num_subbands = header.number_of_subbands();
  subbands = new Subband[32];
  mode = header.mode();
  createSubbands();
  readAllocation();
  readScaleFactorSelection();
  if (crc != null || header.checksum_ok()) {
    readScaleFactors();
    readSampleData();
  }
}

代码示例来源:origin: javazoom/jlayer

public void decodeFrame() throws DecoderException
{
  
  num_subbands = header.number_of_subbands();
  subbands = new Subband[32];
  mode = header.mode();
  
  createSubbands();
  
  readAllocation();
  readScaleFactorSelection();
  
  if ((crc != null) || header.checksum_ok())
   {
    readScaleFactors();
    
    readSampleData();            
  }
}

代码示例来源:origin: com.googlecode.soundlibs/jlayer

public void decodeFrame() throws DecoderException
{
  
  num_subbands = header.number_of_subbands();
  subbands = new Subband[32];
  mode = header.mode();
  
  createSubbands();
  
  readAllocation();
  readScaleFactorSelection();
  
  if ((crc != null) || header.checksum_ok())
   {
    readScaleFactors();
    
    readSampleData();            
  }
}

代码示例来源:origin: pdudits/soundlibs

public void decodeFrame() throws DecoderException
{
  
  num_subbands = header.number_of_subbands();
  subbands = new Subband[32];
  mode = header.mode();
  
  createSubbands();
  
  readAllocation();
  readScaleFactorSelection();
  
  if ((crc != null) || header.checksum_ok())
   {
    readScaleFactors();
    
    readSampleData();            
  }
}

代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl3

public Music (OpenALAudio audio, FileHandle file) {
  super(audio, file);
  if (audio.noDevice) return;
  bitstream = new Bitstream(file.read());
  decoder = new MP3Decoder();
  bufferOverhead = 4096;
  try {
    Header header = bitstream.readFrame();
    if (header == null) throw new GdxRuntimeException("Empty MP3");
    int channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
    outputBuffer = new OutputBuffer(channels, false);
    decoder.setOutputBuffer(outputBuffer);
    setup(channels, header.getSampleRate());
  } catch (BitstreamException e) {
    throw new GdxRuntimeException("error while preloading mp3", e);
  }
}

代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl

public Music (OpenALAudio audio, FileHandle file) {
  super(audio, file);
  if (audio.noDevice) return;
  bitstream = new Bitstream(file.read());
  decoder = new MP3Decoder();
  bufferOverhead = 4096;
  try {
    Header header = bitstream.readFrame();
    if (header == null) throw new GdxRuntimeException("Empty MP3");
    int channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
    outputBuffer = new OutputBuffer(channels, false);
    decoder.setOutputBuffer(outputBuffer);
    setup(channels, header.getSampleRate());
  } catch (BitstreamException e) {
    throw new GdxRuntimeException("error while preloading mp3", e);
  }
}

相关文章