當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。