mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-01 19:16:29 -04:00
Capture: Write simple metadata for baseband and audio files.
Will probably turn the audio metadata file into .wav data, eventually.
This commit is contained in:
parent
a6d41547a0
commit
24192b4043
4 changed files with 33 additions and 0 deletions
|
@ -130,6 +130,8 @@ void CaptureAppView::record_start() {
|
|||
return;
|
||||
}
|
||||
|
||||
write_metadata_file(filename_stem + ".TXT");
|
||||
|
||||
capture_thread = std::make_unique<CaptureThread>(filename_stem + ".C16", 14, 1);
|
||||
button_record.set_bitmap(&bitmap_stop);
|
||||
}
|
||||
|
@ -139,6 +141,13 @@ void CaptureAppView::record_stop() {
|
|||
button_record.set_bitmap(&bitmap_record);
|
||||
}
|
||||
|
||||
void CaptureAppView::write_metadata_file(const std::string& filename) {
|
||||
File file;
|
||||
file.open_for_writing(filename);
|
||||
file.puts("sample_rate=" + to_string_dec_uint(sampling_rate) + "\n");
|
||||
file.puts("center_frequency=" + to_string_dec_uint(receiver_model.tuning_frequency()) + "\n");
|
||||
}
|
||||
|
||||
void CaptureAppView::on_tick_second() {
|
||||
if( capture_thread ) {
|
||||
const auto dropped_percent = std::min(99U, capture_thread->state().dropped_percent());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue