Skip to content

Instantly share code, notes, and snippets.

@LCamel
Created July 22, 2011 02:50
Show Gist options
  • Select an option

  • Save LCamel/1098791 to your computer and use it in GitHub Desktop.

Select an option

Save LCamel/1098791 to your computer and use it in GitHub Desktop.
final FileOutputStream fos = new FileOutputStream(tempFile);
ar = new MyAudioRecord(fos, MAX_MILLIS, new Handler(), new Runnable() {
@Override
public void run() {
try {
fos.close();
// 看是因為確定還是取消而結束的
if (shouldSave) {
AndroidUtility.playString(R.string.save_recording);
File tempWaveFile = new File(tempFile.getAbsolutePath() + ".wav");
SoundUtility.addWaveHaderForU8(tempFile, tempWaveFile);
tempFile.delete();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment