Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Encoding audio as ogg/speex

Reply
Thread Tools

Encoding audio as ogg/speex

 
 
kamikazekoder
Guest
Posts: n/a
 
      06-26-2006
Hello,

I have a java applet which currently either captures audio in a
ByteArrayOutputStream or writes the capture as a PCM wave file.

I want to be able to encode the data using Speex, for playback and/or
saving for use later.

I've looked around the 'net and havent had much luck finding anywhere
for detailed information on integrating Jspeex into a Java application.

can anybody help me with this? I'm using the following code to capture
audio:

=======

// open line
line = (TargetDataLine)AudioSystem.getLine( dataLineInfo );
line.open( format );
line.start();

// write audio capture to buffer (ostream)
int buffSize = (int)format.getSampleRate() * format.getFrameSize();
byte buffer[] = new byte[buffSize];

ostream = new ByteArrayOutputStream();

while( state == 1 )
{
int count = line.read( buffer , 0 , buffer.length );

if( count > 0 )
ostream.write( buffer , 0 , count );
}

ostream.close();

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Text File Encoding and converting to Perls internal UTF-8 encoding sln@netherlands.com Perl Misc 2 04-17-2009 11:22 PM
Encoding Xvid with MP3 VBR audio to DVD Jase DVD Video 3 08-29-2005 05:34 AM
changing JVM encoding; setting -Dfile.encoding doesn't work pasmol@plusnet.pl Java 1 10-08-2004 09:50 PM
Encoding.Default and Encoding.UTF8 Hardy Wang ASP .Net 5 06-09-2004 04:04 PM
Sun audio encoding Loek Raemakers Java 0 11-17-2003 09:22 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57