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 classstatic classstatic classstatic enumstatic classstatic final classNested classes/interfaces inherited from interface com.prineside.tdi2.Manager
Manager.ManagerAdapter, Manager.ManagerWithListeners<T> - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatlong - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidvoidstatic MusicManagerСоздать временный объект, который во время setup() заменит себя на нужный вариант менеджераfloatgetFactVolume(float volume) intfloatintintgetMusicB64hash(String musicB64) abstract ModulebooleanbooleanisMusicThumbsUp(int musicHash) abstract voidvoidpreRender(float deltaTime) Called before the actual drawing of screens and systemsvoidvoidsetup()Called when all manager objects are already created and can be accessedvoidsetVolume(float volume, float speed, boolean stopAtZeroVolume) voidshowSongNotification(Module module, float showDuration) voidabstract voidvoidvoteThumbsUp(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:ManagerCalled when all manager objects are already created and can be accessed- Specified by:
 setupin interfaceManager- Overrides:
 setupin 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:ManagerCalled before the actual drawing of screens and systems- Specified by:
 preRenderin interfaceManager- Overrides:
 preRenderin classManager.ManagerAdapter
 - 
createSelfSetuppingDummy
Создать временный объект, который во время setup() заменит себя на нужный вариант менеджера - 
continuePlayingMenuMusicTrack
public void continuePlayingMenuMusicTrack() - 
showSongNotification
 
 -