mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-12-11 06:02:00 -05:00
fix for bad track count (#1069)
* fix for bad track count * code format * Thanks kallanreed for providing a more clear logic!
This commit is contained in:
parent
6b44a77ef6
commit
5bdf9363e9
2 changed files with 14 additions and 9 deletions
|
|
@ -39,10 +39,13 @@ namespace ui {
|
|||
class PlaylistView : public View {
|
||||
public:
|
||||
PlaylistView(NavigationView& nav);
|
||||
|
||||
~PlaylistView();
|
||||
|
||||
void on_hide() override;
|
||||
|
||||
void set_parent_rect(const Rect new_parent_rect) override;
|
||||
|
||||
void focus() override;
|
||||
|
||||
std::string title() const override { return "Playlist"; };
|
||||
|
|
@ -66,15 +69,14 @@ class PlaylistView : public View {
|
|||
static constexpr uint32_t baseband_bandwidth = 2500000;
|
||||
const size_t read_size{16384};
|
||||
const size_t buffer_count{3};
|
||||
|
||||
void load_file(std::filesystem::path playlist_path);
|
||||
void txtline_process(std::string&);
|
||||
void on_file_changed(std::filesystem::path new_file_path, rf::Frequency replay_frequency, uint32_t replay_sample_rate);
|
||||
void on_target_frequency_changed(rf::Frequency f);
|
||||
void on_tx_progress(const uint32_t progress);
|
||||
|
||||
void set_target_frequency(const rf::Frequency new_value);
|
||||
rf::Frequency target_frequency() const;
|
||||
|
||||
void toggle();
|
||||
void start();
|
||||
void stop(const bool do_loop);
|
||||
|
|
@ -87,8 +89,8 @@ class PlaylistView : public View {
|
|||
std::filesystem::path file_path{};
|
||||
std::unique_ptr<ReplayThread> replay_thread{};
|
||||
bool ready_signal{false};
|
||||
int track_number{0};
|
||||
int total_tracks{0};
|
||||
size_t track_number{0};
|
||||
size_t total_tracks{0};
|
||||
std::filesystem::path now_play_list_file{};
|
||||
|
||||
Button button_open{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue