|
TB2026-YDS Firmware
|
Output-selection popup: route audio to the Jack or a Bluetooth speaker. More...
#include "output_select.h"#include "bluetooth_settings.h"#include "navigator.h"#include "gfx.h"#include "player.h"#include "volume.h"#include "bluetooth.h"Macros | |
| #define | BOX_W 148 |
| #define | BOX_H 84 |
| #define | BOX_X ((GFX_W - BOX_W) / 2) |
| #define | BOX_Y ((GFX_H - BOX_H) / 2) |
| #define | TITLE_Y (BOX_Y + 6) |
| #define | ROW0_Y (BOX_Y + 26) |
| #define | ROW_H 20 |
| #define | CARET_X (BOX_X + 8) |
| #define | LABEL_X (BOX_X + 20) |
| #define | DOT_X (BOX_X + BOX_W - 14) /* active-output marker, right-aligned */ |
| #define | ACCENT gfx_rgb(0, 100, 255) /* Music identity colour (see root_menu) */ |
| #define | DIM gfx_rgb(110, 110, 110) |
| #define | N_ROWS 3 |
Functions | |
| screen_t * | output_select_screen (void) |
| Get the singleton output-selection popup, ready to push onto the navigator. | |
Output-selection popup: route audio to the Jack or a Bluetooth speaker.
A small centered box (drawn over black) reached from Now Playing (UP). Three rows: the wired Jack, a Bluetooth speaker, and a shortcut into the Bluetooth settings screen. The Bluetooth row is dimmed and inert while no device is connected. Selecting an output calls the single routing entry point player_set_output(), which re-routes a live stream and powers the unused path down itself – so this screen only expresses the choice, it does not touch hardware.
A Bluetooth switch is refused only when no speaker is connected (the row is dimmed); an un-acked speaker volume does not refuse it — the player defers the stream until the ack (never blast) and the switch call still succeeds.
| #define ACCENT gfx_rgb(0, 100, 255) /* Music identity colour (see root_menu) */ |
| #define BOX_H 84 |
| #define BOX_W 148 |
| #define CARET_X (BOX_X + 8) |
| #define DIM gfx_rgb(110, 110, 110) |
| #define LABEL_X (BOX_X + 20) |
| #define N_ROWS 3 |
| #define ROW0_Y (BOX_Y + 26) |
| #define ROW_H 20 |
| #define TITLE_Y (BOX_Y + 6) |
| screen_t * output_select_screen | ( | void | ) |
Get the singleton output-selection popup, ready to push onto the navigator.