Package com.prineside.tdi2.managers
Class MusicManager
java.lang.Object
com.prineside.tdi2.Manager.ManagerAdapter
com.prineside.tdi2.managers.MusicManager
- All Implemented Interfaces:
Disposable
,Manager
- Direct Known Subclasses:
CachedMusicManager
,LiveMusicManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static class
static class
static enum
static class
static final class
Nested classes/interfaces inherited from interface com.prineside.tdi2.Manager
Manager.ManagerAdapter, Manager.ManagerWithListeners<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float
long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
static MusicManager
Создать временный объект, который во время setup() заменит себя на нужный вариант менеджераfloat
getFactVolume
(float volume) int
float
int
int
getMusicB64hash
(String musicB64) abstract Module
boolean
boolean
isMusicThumbsUp
(int musicHash) abstract void
void
preRender
(float deltaTime) Called before the actual drawing of screens and systemsvoid
void
setup()
Called when all manager objects are already created and can be accessedvoid
setVolume
(float volume, float speed, boolean stopAtZeroVolume) void
showSongNotification
(Module module, float showDuration) void
abstract void
void
voteThumbsUp
(int musicHash, boolean thumbsUp) Methods inherited from class com.prineside.tdi2.Manager.ManagerAdapter
dispose, postRender, test
-
Field Details
-
DEFAULT_VOLUME_CHANGE_SPEED
public static final float DEFAULT_VOLUME_CHANGE_SPEED- See Also:
-
lastSoundTimestamp
public long lastSoundTimestamp
-
-
Constructor Details
-
MusicManager
public MusicManager()
-
-
Method Details
-
setup
public void setup()Description copied from interface:Manager
Called when all manager objects are already created and can be accessed- Specified by:
setup
in interfaceManager
- Overrides:
setup
in classManager.ManagerAdapter
-
getSpectrumConfig
- Returns:
- registered instance of a SpectrumConfig whose spectrum will be updated according to the music
-
getInterpolation
public int getInterpolation() -
getMainVolume
public float getMainVolume() -
getSpectrumSim
-
isMenuMusicSourceEnabled
-
addMenuMusicSource
-
getMenuMusicSourceRepeatCount
- Returns:
- music repeats from the real config (using source.type and id only, ignoring number of repeats of provided source)
-
removeMenuMusicSource
-
voteThumbsUp
public void voteThumbsUp(int musicHash, boolean thumbsUp) -
isMusicThumbsUp
public boolean isMusicThumbsUp(int musicHash) -
getMenuThemeSources
-
getCurrentlyPlayingMenuThemeSource
-
stopMusic
public abstract void stopMusic() -
getMusicB64hash
-
getModule
-
setVolumeToStartNewTrack
public void setVolumeToStartNewTrack() -
setVolume
public void setVolume(float volume, float speed, boolean stopAtZeroVolume) - Parameters:
speed
- - единиц в секунду (1f = от 100% до 0% за 1 секунду)
-
playMusic
-
getPlayingMusic
-
getFactVolume
public float getFactVolume(float volume) - Returns:
- volume affected by main volume (settings) and currently playing module volume multiplier
-
simulateSpectrums
public void simulateSpectrums() -
preRender
public void preRender(float deltaTime) Description copied from interface:Manager
Called before the actual drawing of screens and systems- Specified by:
preRender
in interfaceManager
- Overrides:
preRender
in classManager.ManagerAdapter
-
createSelfSetuppingDummy
Создать временный объект, который во время setup() заменит себя на нужный вариант менеджера -
continuePlayingMenuMusicTrack
public void continuePlayingMenuMusicTrack() -
showSongNotification
-