-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic organization changes and initial Cue implementations
- Loading branch information
Showing
15 changed files
with
719 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
Soundclip.Core/src/main/java/soundclip/core/cues/ICue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package soundclip.core.cues; | ||
|
||
import soundclip.core.CueNumber; | ||
import soundclip.core.CueSupportFlags; | ||
|
||
import java.time.Duration; | ||
import java.util.List; | ||
|
||
/** | ||
* The basic cue interface | ||
*/ | ||
public interface ICue | ||
{ | ||
/** @return the number of the cue */ | ||
CueNumber getNumber(); | ||
/** Set the number of the cue */ | ||
void setNumber(CueNumber number); | ||
|
||
/** @return the name of the cue */ | ||
String getName(); | ||
/** Set the name of the cue */ | ||
void setName(String name); | ||
|
||
/** @return the notes associated with the cue */ | ||
String getNotes(); | ||
/** Sets the notes for the cue */ | ||
void setNotes(String notes); | ||
|
||
/** @return the duration of the cue */ | ||
Duration getDuration(); | ||
|
||
/** @return the features supported by the cue. One or more of {@link CueSupportFlags} */ | ||
int getSupportedOperations(); | ||
|
||
/** @return A list of validation problems with the cue. Return an empty list if there are none */ | ||
List<String> getValidationErrors(); | ||
|
||
/** Triggers the main action of the cue */ | ||
void go(); | ||
|
||
/** Pauses the cue. Stops the cue instead if the implementation does not support resuming */ | ||
void pause(); | ||
|
||
/** Resume the cue from where it was paused */ | ||
void resume(); | ||
|
||
/** Stops the cue and resets the playback state */ | ||
void stop(); | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
Soundclip.Core/src/main/java/soundclip/core/cues/IFadeableCue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package soundclip.core.cues; | ||
|
||
import java.time.Duration; | ||
|
||
/** | ||
* A cue that can fade in or out (or both). | ||
* | ||
* Ensure that {@link #getSupportedOperations()} has one (or both) of the following flags set: | ||
* <ul> | ||
* <li>{@link soundclip.core.CueSupportFlags#FADE_IN}</li> | ||
* <li>{@link soundclip.core.CueSupportFlags#FADE_OUT}</li> | ||
* </ul> | ||
* | ||
* Note you can also specify {@link soundclip.core.CueSupportFlags#FADE} if the implementation | ||
* supports both fading in and fading out. | ||
*/ | ||
public interface IFadeableCue extends ICue | ||
{ | ||
/** @return the duration to fade in over when {@link #fadeIn()} is called */ | ||
Duration getFadeInDuration(); | ||
|
||
/** | ||
* Set the duration to fade in over when {@link #fadeIn()} is called | ||
* | ||
* @param duration the duration to fade in over | ||
*/ | ||
void setFadeInDuration(Duration duration); | ||
|
||
/** @return the duration to fade out over when {@link #fadeOut()} is called */ | ||
Duration getFadeOutDuration(); | ||
|
||
/** | ||
* Set the duration to fade out over when {@link #fadeOut()} is called | ||
* | ||
* @param duration the duration to fade out over | ||
*/ | ||
void setFadeOutDuration(Duration duration); | ||
|
||
/** Triggers the cue from the start with a gradual fade-in over {@link #getFadeInDuration()} */ | ||
void fadeIn(); | ||
|
||
/** If the cue is currently playing, fade it out over {@link #getFadeOutDuration()} */ | ||
void fadeOut(); | ||
} |
32 changes: 32 additions & 0 deletions
32
Soundclip.Core/src/main/java/soundclip/core/cues/ISeekableCue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package soundclip.core.cues; | ||
|
||
import java.time.Duration; | ||
|
||
/** | ||
* A cue that can seek the playhead to a different location | ||
* | ||
* Ensure that {@link #getSupportedOperations()} has one (or both) of the following flags set: | ||
* <ul> | ||
* <li>{@link soundclip.core.CueSupportFlags#SEEK_ABSOLUTE}</li> | ||
* <li>{@link soundclip.core.CueSupportFlags#SEEK_RELATIVE}</li> | ||
* </ul> | ||
* | ||
* Note you can also specify {@link soundclip.core.CueSupportFlags#SEEK} if the implementation | ||
* supports both relative and absolute seeks. | ||
*/ | ||
public interface ISeekableCue extends ICue | ||
{ | ||
/** | ||
* Seek the playhead by the specified offset | ||
* | ||
* @param offset the offset to seek by | ||
*/ | ||
void seekRelative(Duration offset); | ||
|
||
/** | ||
* Seek the playhead to the specified offset | ||
* | ||
* @param duration the offset to seek to | ||
*/ | ||
void seekAbsolute(Duration duration); | ||
} |
Oops, something went wrong.