Search in sources :

Example 1 with FileAudioStream

use of org.eclipse.smarthome.core.audio.FileAudioStream in project smarthome by eclipse.

the class AudioManagerImpl method playFile.

@Override
public void playFile(String fileName, String sink, PercentType volume) throws AudioException {
    Objects.requireNonNull(fileName, "File cannot be played as fileName is null.");
    File file = new File(ConfigConstants.getConfigFolder() + File.separator + SOUND_DIR + File.separator + fileName);
    FileAudioStream is = new FileAudioStream(file);
    play(is, sink, volume);
}
Also used : FileAudioStream(org.eclipse.smarthome.core.audio.FileAudioStream) File(java.io.File)

Aggregations

File (java.io.File)1 FileAudioStream (org.eclipse.smarthome.core.audio.FileAudioStream)1