Package ch.epfl.cs107.play.window
Interface Audio
- All Known Subinterfaces:
Window
- All Known Implementing Classes:
SwingWindow
public interface Audio
Represents a audio context, with playing capability.
-
Method Summary
-
Method Details
-
getSound
Gets sound from file system.- Parameters:
name- (String): full name of image, not null- Returns:
- (Sound): a sound object, null on error
-
playSound
void playSound(Sound sound, boolean randomFirstStart, float volume, boolean fadeIn, boolean loop, boolean stopOthersOnStart) Play specified sound.- Parameters:
sound- (Sound): any sound associated to this context, may be nullrandomFirstStart- (boolean): indicate if the first start is random in the soundvolume- (float): 0.0f no sound, 1.0f full audiofadeIn- (boolean): indicate if the song fade in until reaching its max volumeloop- (boolean): indicate if the sound must loop on self endingstopOthersOnStart- (boolean): indicate if all other sound are stopped on given sound's start
-
isSoundSupported
boolean isSoundSupported()- Returns:
- (boolean): true if the sound is supported by the Audio
-