Back to project page android-continuous-voice.
The source code is released under:
Copyright (c) 2015, Marius Fink - Universit?t Hamburg All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ...
If you think the Android project android-continuous-voice listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.uniHamburg.informatik.continuousvoice.services.sound; //w w w .java 2 s . c om import java.io.File; import android.media.MediaRecorder; /** * Media recorder with ability to return its recorded file and file name * @author marius * */ public class FileMediaRecorder extends MediaRecorder { private String filename; /** * @param filename null means transient recorder */ public FileMediaRecorder(String filename) { super(); if (filename == null) { this.filename = "/dev/null"; } else { this.filename = filename; } super.setOutputFile(this.filename); } public String getFilename() { return filename; } public File getFile() { return new File(filename); } public void setOutputFile(String filename) { throw new IllegalArgumentException("Please use the constructor to set the file."); } }