Package nl.saxion.app.audio
Class MediaPlayer
java.lang.Object
nl.saxion.app.audio.MediaPlayer
- All Implemented Interfaces:
Runnable
Experimental class for playing audio fragments in .wav format.
The class is taken from: https://github.com/dberm22/DBoard/blob/master/src/com/dberm22/utils/MediaPlayer.java
Although this class has stop/pause methods, they are not utilized in the SaxionApp.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isLoop()
boolean
isPaused()
boolean
void
onPause()
void
onPlay()
void
onResume()
void
onStop()
void
pause()
void
play()
void
void
resume()
void
run()
void
void
setFilename
(String filename) void
setLoop
(boolean loop) void
void
setVolumeInDecibels
(Float decibels) void
stop()
-
Constructor Details
-
MediaPlayer
-
-
Method Details
-
getFilename
-
setFilename
-
isLoop
public boolean isLoop() -
setLoop
public void setLoop(boolean loop) -
playSound
public void playSound() throws FileNotFoundException, UnsupportedAudioFileException, IOException, LineUnavailableException -
run
public void run() -
play
public void play() -
onPlay
public void onPlay() -
pause
public void pause() -
onPause
public void onPause() -
resume
public void resume() -
onResume
public void onResume() -
stop
public void stop() -
onStop
public void onStop() -
isPlaying
public boolean isPlaying() -
isPaused
public boolean isPaused() -
setFile
-
setVolume
-
setVolumeInDecibels
-