Skip to content

Commit

Permalink
Merge pull request openhab#121 from kgoderis/master
Browse files Browse the repository at this point in the history
Fix FileInputStream path in org.openhab.io.multimedia.actions.audio
  • Loading branch information
kaikreuzer committed Feb 3, 2015
2 parents 58ec087 + 1194776 commit 9c5c046
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

public class Audio {

private static final String RUNTIME_DIR ="runtime";
private static final String SOUND_DIR = "sounds";
private static final Logger logger = LoggerFactory.getLogger(Audio.class);

Expand All @@ -65,7 +66,7 @@ public class Audio {
static public void playSound(
@ParamDoc(name="filename", text="the filename with extension") String filename) {
try {
InputStream is = new FileInputStream(SOUND_DIR + File.separator + filename);
InputStream is = new FileInputStream(RUNTIME_DIR + File.separator + SOUND_DIR + File.separator + filename);
if (filename.toLowerCase().endsWith(".mp3")) {
Player player = new Player(is);
playInThread(player);
Expand Down

0 comments on commit 9c5c046

Please sign in to comment.