Fix hang in Audio when switching from Capture app, & bug fixes. (#1167)

* Fix hang in Audio when switching from Capture app
* Bug fixes
This commit is contained in:
Kyle Reed 2023-06-18 22:48:29 -07:00 committed by GitHub
parent 5daa0dfbb1
commit 7ebf3d3cdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 78 additions and 89 deletions

View file

@ -142,7 +142,9 @@ bool PlaylistView::next_track() {
/* Transmits the current_entry_ */
void PlaylistView::send_current_track() {
// Prepare to send a file.
replay_thread_.reset();
transmitter_model.disable();
ready_signal_ = false;
if (!current_entry_)
@ -172,6 +174,10 @@ void PlaylistView::send_current_track() {
transmitter_model.set_baseband_bandwidth(baseband_bandwidth);
transmitter_model.enable();
// Set baseband sample rate too for waterfall to be correct.
// TODO: Why doesn't the transmitter_model just handle this?
baseband::set_sample_rate(transmitter_model.sampling_rate());
// Use the ReplayThread class to send the data.
replay_thread_ = std::make_unique<ReplayThread>(
std::move(reader),