0
我正在使用flash plugin從我的麥克風錄製聲音的網絡應用程序。錄製完成後,我可以將錄製的文件上傳到服務器。 PLZ看到下面的代碼:音頻輸入流到緩衝區
// Get the input stream
InputStream is = request.getInputStream();
InputStream bufferedIn = new BufferedInputStream(is);
AudioInputStream ais = AudioSystem.getAudioInputStream(bufferedIn);
// Declare the new format to convert to
AudioFormat audioFormat = new AudioFormat(sampleRate, sampleSizeInBits, channels, signed, bigEndian);
// Convert the format and return the new audio input stream
ais = AudioSystem.getAudioInputStream(audioFormat, ais);
現在,這種轉換後,我想從AIS的音頻數據保存到緩衝區中,並把它上傳到數據庫。
我該怎麼做?謝謝!! :)