Added Audio Out to Soundboard app (#1748)

This commit is contained in:
Mark Thompson 2024-01-09 13:50:45 -06:00 committed by GitHub
parent 0e6f303eec
commit 485f57d86b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 38 additions and 7 deletions

View file

@ -26,6 +26,7 @@
#include "string_format.hpp"
#include "tonesets.hpp"
#include "ui_tone_key.hpp"
#include "audio.hpp"
using namespace tonekey;
using namespace portapack;
@ -40,6 +41,7 @@ void SoundBoardView::stop() {
if (is_active())
replay_thread.reset();
audio::output::stop();
transmitter_model.disable();
tx_view.set_transmitting(false);
@ -123,6 +125,8 @@ void SoundBoardView::start_tx(const uint32_t id) {
transmitter_model.enable();
tx_view.set_transmitting(true);
audio::output::start();
}
/*void SoundBoardView::show_infos() {
@ -227,6 +231,7 @@ SoundBoardView::SoundBoardView(
//&text_title,
//&text_duration,
//&progressbar,
&field_volume,
&page_info,
&check_loop,
&check_random,
@ -274,7 +279,6 @@ SoundBoardView::SoundBoardView(
SoundBoardView::~SoundBoardView() {
stop();
transmitter_model.disable();
baseband::shutdown();
}

View file

@ -91,7 +91,7 @@ class SoundBoardView : public View {
void on_select_entry();
Labels labels{
//{ { 0, 20 * 8 + 4 }, "Title:", Color::light_grey() },
{{24 * 8, 180}, "Vol:", Color::light_grey()},
{{0, 180}, "Key:", Color::light_grey()}};
Button button_next_page{
@ -122,10 +122,13 @@ class SoundBoardView : public View {
};*/
OptionsField options_tone_key{
{32, 180},
{4 * 8, 180},
18,
{}};
AudioVolumeField field_volume{
{28 * 8, 180}};
Checkbox check_loop{
{0, 25 * 8 + 4},
4,