mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-28 00:27:17 -04:00
C8 capture support (#1286)
* C8 conversion * C8 conversion * C8 support * C8 support * C8 support * C8 support * Don't auto-convert GPS C8 files * C8 support * C8 support * C8 support * Remove hang workaround (different PR) * Comment change * Clang * Clang * Clang * Merged change from PR #1287 * C8 support * C8 support * Improve bandwidth display * Merged minor optimization from PR 1289 * Merge change from PR 1289 * Use complex types for C8/C16 conversion * C8 support * C8 support * C8 support * C8 support * Roll back changes * Roll back C8 changes * C8 support * C8 support * C8 support * C8 support * C8 support * Don't transmit samples past EOF * Don't transmit samples past EOF * Clang * Clang attempt * Clang attempt * C8 support * Clang
This commit is contained in:
parent
8eafe27955
commit
d6b0173e7a
14 changed files with 300 additions and 44 deletions
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include "ui_fileman.hpp"
|
||||
#include "io_file.hpp"
|
||||
#include "io_convert.hpp"
|
||||
|
||||
#include "baseband_api.hpp"
|
||||
#include "metadata_file.hpp"
|
||||
#include "portapack.hpp"
|
||||
|
@ -75,7 +77,8 @@ void ReplayAppView::on_file_changed(const fs::path& new_file_path) {
|
|||
progressbar.set_max(file_size);
|
||||
text_filename.set(truncate(file_path.filename().string(), 12));
|
||||
|
||||
auto duration = ms_duration(file_size, sample_rate, 4);
|
||||
uint8_t sample_size = capture_file_sample_size(current()->path);
|
||||
auto duration = ms_duration(file_size, sample_rate, sample_size);
|
||||
text_duration.set(to_string_time_ms(duration));
|
||||
|
||||
button_play.focus();
|
||||
|
@ -110,7 +113,7 @@ void ReplayAppView::start() {
|
|||
|
||||
std::unique_ptr<stream::Reader> reader;
|
||||
|
||||
auto p = std::make_unique<FileReader>();
|
||||
auto p = std::make_unique<FileConvertReader>();
|
||||
auto open_error = p->open(file_path);
|
||||
if (open_error.is_valid()) {
|
||||
file_error();
|
||||
|
@ -191,7 +194,7 @@ ReplayAppView::ReplayAppView(
|
|||
};
|
||||
|
||||
button_open.on_select = [this, &nav](Button&) {
|
||||
auto open_view = nav.push<FileLoadView>(".C16");
|
||||
auto open_view = nav.push<FileLoadView>(".C*");
|
||||
open_view->on_changed = [this](fs::path new_file_path) {
|
||||
on_file_changed(new_file_path);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue