From d16555ec4b0ae5bcd8e114c9cead313224d5b662 Mon Sep 17 00:00:00 2001 From: Lorin Beer Date: Sun, 17 Jun 2012 22:19:33 -0700 Subject: [PATCH] added file requirement to constructor, all references to AudioPlayer constructor had direct access to file, so this caused no other changes --- framework/src/org/apache/cordova/AudioPlayer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/src/org/apache/cordova/AudioPlayer.java b/framework/src/org/apache/cordova/AudioPlayer.java index e975afaf..6437e2d0 100755 --- a/framework/src/org/apache/cordova/AudioPlayer.java +++ b/framework/src/org/apache/cordova/AudioPlayer.java @@ -74,7 +74,7 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On private String tempFile = null; // Temporary recording file name private MediaPlayer mPlayer = null; // Audio player object - private boolean prepareOnly = false; + private boolean prepareOnly = false; /** * Constructor. @@ -82,9 +82,10 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On * @param handler The audio handler object * @param id The id of this audio player */ - public AudioPlayer(AudioHandler handler, String id) { + public AudioPlayer(AudioHandler handler, String id, String src) { this.handler = handler; this.id = id; + this.audioFile = src; if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { this.tempFile = Environment.getExternalStorageDirectory().getAbsolutePath() + "/tmprecording.mp3"; } else {