Encoding audio as ogg/speex

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();

[1076 byte] By [alexjalexja] at [2007-11-27 8:26:43]
# 1
i haven't searched for jspeex.instead i created JNI .dll
alexscorpiona at 2007-7-12 20:16:14 > top of Java-index,Security,Cryptography...