changed handling of stopRecording to reflect handling of create message

This commit is contained in:
Lorin Beer 2012-06-28 15:53:47 -07:00
parent 10465066ee
commit 762854ad7a

View File

@ -198,12 +198,11 @@ public class AudioHandler extends Plugin {
* @param file The name of the file * @param file The name of the file
*/ */
public void startRecordingAudio(String id, String file) { public void startRecordingAudio(String id, String file) {
// If already recording, then just return; AudioPlayer audio = this.players.get(id);
if (this.players.containsKey(id)) { if ( audio == null) {
return; audio = new AudioPlayer(this, id, file);
}
AudioPlayer audio = new AudioPlayer(this, id, file);
this.players.put(id, audio); this.players.put(id, audio);
}
audio.startRecording(file); audio.startRecording(file);
} }