EditorPanel for music playback controls and status display. More...
#include <music_playback_control_panel.h>

Public Member Functions | |
| MusicPlaybackControlPanel (zelda3::music::MusicBank *music_bank, int *current_song_index, music::MusicPlayer *music_player) | |
| std::string | GetId () const override |
| Unique identifier for this panel. | |
| std::string | GetDisplayName () const override |
| Human-readable name shown in menus and title bars. | |
| std::string | GetIcon () const override |
| Material Design icon for this panel. | |
| std::string | GetEditorCategory () const override |
| Editor category this panel belongs to. | |
| int | GetPriority () const override |
| Get display priority for menu ordering. | |
| void | SetOnOpenSong (std::function< void(int)> callback) |
| void | SetOnOpenPianoRoll (std::function< void(int)> callback) |
| void | Draw (bool *p_open) override |
| Draw the panel content. | |
Public Member Functions inherited from yaze::editor::EditorPanel | |
| virtual | ~EditorPanel ()=default |
| virtual void | OnOpen () |
| Called when panel becomes visible. | |
| virtual void | OnClose () |
| Called when panel is hidden. | |
| virtual void | OnFocus () |
| Called when panel receives focus. | |
| virtual PanelCategory | GetPanelCategory () const |
| Get the lifecycle category for this panel. | |
| virtual bool | IsEnabled () const |
| Check if this panel is currently enabled. | |
| virtual std::string | GetDisabledTooltip () const |
| Get tooltip text when panel is disabled. | |
| virtual std::string | GetShortcutHint () const |
| Get keyboard shortcut hint for display. | |
| virtual float | GetPreferredWidth () const |
| Get preferred width for this panel (optional) | |
| virtual bool | IsVisibleByDefault () const |
| Whether this panel should be visible by default. | |
| virtual std::string | GetParentPanelId () const |
| Get parent panel ID for cascade behavior. | |
| virtual bool | CascadeCloseChildren () const |
| Whether closing this panel should close child panels. | |
Private Member Functions | |
| void | DrawToolset () |
| void | DrawSongInfo () |
| void | DrawPlaybackStatus () |
| void | DrawQuickActions () |
| void | DrawDebugControls () |
Private Attributes | |
| zelda3::music::MusicBank * | music_bank_ = nullptr |
| int * | current_song_index_ = nullptr |
| music::MusicPlayer * | music_player_ = nullptr |
| int | current_volume_ = 100 |
| std::function< void(int)> | on_open_song_ |
| std::function< void(int)> | on_open_piano_roll_ |
| bool | debug_paused_ = false |
| music::DspDebugStatus | cached_dsp_ |
| music::AudioQueueStatus | cached_audio_ |
| music::ApuDebugStatus | cached_apu_ |
| std::array< music::ChannelState, 8 > | cached_channels_ |
| int32_t | avg_queue_delta_ = 0 |
| uint64_t | avg_cycle_rate_ = 0 |
| std::chrono::steady_clock::time_point | last_stats_time_ |
| uint64_t | last_cycles_for_rate_ = 0 |
| uint32_t | last_queued_for_rate_ = 0 |
EditorPanel for music playback controls and status display.
Definition at line 27 of file music_playback_control_panel.h.
|
inline |
Definition at line 29 of file music_playback_control_panel.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::EditorPanel.
Definition at line 40 of file music_playback_control_panel.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::EditorPanel.
Definition at line 41 of file music_playback_control_panel.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::EditorPanel.
Definition at line 42 of file music_playback_control_panel.h.
References ICON_MD_PLAY_CIRCLE.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::EditorPanel.
Definition at line 43 of file music_playback_control_panel.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::EditorPanel.
Definition at line 44 of file music_playback_control_panel.h.
|
inline |
Definition at line 50 of file music_playback_control_panel.h.
References on_open_song_.
|
inline |
Definition at line 54 of file music_playback_control_panel.h.
References on_open_piano_roll_.
|
inlineoverridevirtual |
Draw the panel content.
| p_open | Pointer to visibility flag (nullptr if not closable) |
Called by PanelManager when the panel is visible. Do NOT call ImGui::Begin/End - the PanelWindow wrapper handles that. Just draw your content directly.
Implements yaze::editor::EditorPanel.
Definition at line 62 of file music_playback_control_panel.h.
References current_song_index_, DrawDebugControls(), DrawPlaybackStatus(), DrawQuickActions(), DrawSongInfo(), DrawToolset(), ICON_MD_KEYBOARD, and music_bank_.
|
inlineprivate |
Definition at line 89 of file music_playback_control_panel.h.
References current_song_index_, current_volume_, yaze::zelda3::music::MusicBank::GetSong(), yaze::editor::music::MusicPlayer::GetState(), ICON_MD_EDIT, ICON_MD_GRAPHIC_EQ, ICON_MD_PAUSE, ICON_MD_PAUSE_CIRCLE, ICON_MD_PLAY_ARROW, ICON_MD_SPEED, ICON_MD_STOP, ICON_MD_VOLUME_UP, yaze::editor::music::MusicPlayer::IsAudioReady(), music_bank_, music_player_, yaze::editor::music::MusicPlayer::Pause(), yaze::editor::music::MusicPlayer::PlaySong(), yaze::editor::music::MusicPlayer::Resume(), yaze::editor::music::MusicPlayer::SetPlaybackSpeed(), yaze::editor::music::MusicPlayer::SetVolume(), yaze::gui::SliderFloatWheel(), yaze::gui::SliderIntWheel(), and yaze::editor::music::MusicPlayer::Stop().
Referenced by Draw().
|
inlineprivate |
Definition at line 180 of file music_playback_control_panel.h.
References current_song_index_, yaze::zelda3::music::MusicBank::GetSong(), ICON_MD_EDIT, and music_bank_.
Referenced by Draw().

|
inlineprivate |
Definition at line 199 of file music_playback_control_panel.h.
References current_song_index_, yaze::zelda3::music::MusicBank::GetSong(), yaze::editor::music::MusicPlayer::GetState(), music_bank_, and music_player_.
Referenced by Draw().

|
inlineprivate |
Definition at line 246 of file music_playback_control_panel.h.
References current_song_index_, ICON_MD_OPEN_IN_NEW, ICON_MD_PIANO, on_open_piano_roll_, and on_open_song_.
Referenced by Draw().
|
inlineprivate |
Definition at line 263 of file music_playback_control_panel.h.
References avg_cycle_rate_, avg_queue_delta_, cached_apu_, cached_audio_, cached_channels_, cached_dsp_, yaze::editor::music::MusicPlayer::ClearAudioQueue(), yaze::editor::music::ApuDebugStatus::cycles, debug_paused_, yaze::editor::music::MusicPlayer::ForceNewFrame(), yaze::editor::music::MusicPlayer::GetApuStatus(), yaze::editor::music::MusicPlayer::GetAudioQueueStatus(), yaze::editor::music::MusicPlayer::GetChannelStates(), yaze::editor::music::MusicPlayer::GetDspStatus(), ICON_MD_BUG_REPORT, ICON_MD_CLEAR_ALL, ICON_MD_PLAY_CIRCLE, ICON_MD_REFRESH, ICON_MD_REPLAY, ICON_MD_RESTART_ALT, ICON_MD_SKIP_NEXT, ICON_MD_STOP_CIRCLE, ICON_MD_SURROUND_SOUND, ICON_MD_TRENDING_DOWN, ICON_MD_TRENDING_FLAT, ICON_MD_TRENDING_UP, ICON_MD_VOLUME_OFF, ICON_MD_WARNING, yaze::editor::music::AudioQueueStatus::is_playing, last_cycles_for_rate_, last_queued_for_rate_, last_stats_time_, music_player_, yaze::editor::music::AudioQueueStatus::queued_frames, yaze::editor::music::MusicPlayer::ReinitAudio(), yaze::editor::music::MusicPlayer::ResetDspBuffer(), and yaze::editor::music::DspDebugStatus::sample_offset.
Referenced by Draw().
|
private |
Definition at line 571 of file music_playback_control_panel.h.
Referenced by Draw(), DrawPlaybackStatus(), DrawSongInfo(), and DrawToolset().
|
private |
Definition at line 572 of file music_playback_control_panel.h.
Referenced by Draw(), DrawPlaybackStatus(), DrawQuickActions(), DrawSongInfo(), and DrawToolset().
|
private |
Definition at line 573 of file music_playback_control_panel.h.
Referenced by DrawDebugControls(), DrawPlaybackStatus(), and DrawToolset().
|
private |
Definition at line 574 of file music_playback_control_panel.h.
Referenced by DrawToolset().
|
private |
Definition at line 576 of file music_playback_control_panel.h.
Referenced by DrawQuickActions(), and SetOnOpenSong().
|
private |
Definition at line 577 of file music_playback_control_panel.h.
Referenced by DrawQuickActions(), and SetOnOpenPianoRoll().
|
private |
Definition at line 580 of file music_playback_control_panel.h.
Referenced by DrawDebugControls().
|
private |
Definition at line 581 of file music_playback_control_panel.h.
Referenced by DrawDebugControls().
|
private |
Definition at line 582 of file music_playback_control_panel.h.
Referenced by DrawDebugControls().
|
private |
Definition at line 583 of file music_playback_control_panel.h.
Referenced by DrawDebugControls().
|
private |
Definition at line 584 of file music_playback_control_panel.h.
Referenced by DrawDebugControls().
|
private |
Definition at line 585 of file music_playback_control_panel.h.
Referenced by DrawDebugControls().
|
private |
Definition at line 586 of file music_playback_control_panel.h.
Referenced by DrawDebugControls().
|
private |
Definition at line 589 of file music_playback_control_panel.h.
Referenced by DrawDebugControls().
|
private |
Definition at line 590 of file music_playback_control_panel.h.
Referenced by DrawDebugControls().
|
private |
Definition at line 591 of file music_playback_control_panel.h.
Referenced by DrawDebugControls().