当前位置: 首页>>代码示例>>Java>>正文


Java SpeexDecoder类代码示例

本文整理汇总了Java中org.xiph.speex.SpeexDecoder的典型用法代码示例。如果您正苦于以下问题:Java SpeexDecoder类的具体用法?Java SpeexDecoder怎么用?Java SpeexDecoder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SpeexDecoder类属于org.xiph.speex包,在下文中一共展示了SpeexDecoder类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import org.xiph.speex.SpeexDecoder; //导入依赖的package包/类
/**
* Prepares an audio stream to read from.  If another stream is already opened,
* it will be closed and a new audio stream opened in its place.
* @param url URL to an audio file to stream from.
* @return False if an error occurred or if end of stream was reached.
*/
   public boolean initialize( URL url )
   {
       initialized( SET, false );
       cleanup();

       if( url == null )
       {
           errorMessage( "url null in method 'initialize'" );
           cleanup();
           return false;
       }

       try
       {
           is = url.openStream();
           dis =  new DataInputStream( url.openStream() );
       }
       catch( IOException ioe )
       {
           errorMessage( "Unable to open stream in method 'initialize'" );
           printStackTrace( ioe );
           return false;
       }
       speexDecoder = new SpeexDecoder();
       
       if( !processHeader() )
           return false;

       myAudioFormat = new AudioFormat( (float) sampleRate, 16, channels,
                                        true, false );

       endOfStream( SET, false );
       initialized( SET, true );
       return true;
   }
 
开发者ID:kovertopz,项目名称:Paulscode-SoundSystem,代码行数:42,代码来源:CodecJSpeex.java

示例2: JSpeexDecoder

import org.xiph.speex.SpeexDecoder; //导入依赖的package包/类
public JSpeexDecoder(Mixer mixer, int decoderId) {
    super(mixer, decoderId);
    decoder = new SpeexDecoder();
    decoder.init(MODE_WIDEBAND, SAMPLERATE_WIDEBAND, CHANNELS_MONO, true);
}
 
开发者ID:lfv-mssm,项目名称:yada,代码行数:6,代码来源:JSpeexDecoder.java

示例3: version

import org.xiph.speex.SpeexDecoder; //导入依赖的package包/类
/**
* Returns the version of JSpeex being used.
* @return String indicating the version.
*/
public static String version()
{
    return SpeexDecoder.VERSION;
}
 
开发者ID:kovertopz,项目名称:Paulscode-SoundSystem,代码行数:9,代码来源:CodecJSpeex.java


注:本文中的org.xiph.speex.SpeexDecoder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。