Problem in playing audio data...

Hello,

   I am porting C++ sound application in to JAVA. I have a problem sound decoding in JAVA. The problem is that when i decode sound data in c++ and JAVA, both gives me different size buffer. The size of the JAVA buffer is almost HALF of C++. The sound quality is also different.

   Please give me siggestion what parameter might be affecting to decode sound in JAVA.

Thanks In Advance

I’m not sure what you’re after.
What do you mean by ‘decoding sound’? Getting sound from an audio input or something (for example to analyze or process it)?

javax.sound.sampled.AudioFormat defines the format of the stream; i.e. quality, number of channels.
You can define the buffer size in javax.sound.sampled.DataLine.Info