using Jspeex to encode audio
- From: seannicholls@xxxxxxxxx
- Date: 25 Jun 2006 15:36:07 -0700
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();
.
- Prev by Date: Re: SendMailServlet example & server setup ?
- Next by Date: building a meta search engine
- Previous by thread: PLEASE HELP at Java Servlet / Java Server Pages !!!!!
- Next by thread: building a meta search engine
- Index(es):
Relevant Pages
|