Files
ESP32_ZACUS/specs/apps/audio_player.md
T
L'électron rare 878d911065 P1.1+P1.2: Phase 9 Touch Emulator + AGENT_TODO Update
 P1.1 Phase 9 Touch Input (4h)
- TouchEmulator: 4x4 grid navigation via buttons (UP/DOWN/LEFT/RIGHT toggle)
- Files: touch_emulator.{h,cpp} + AmigaUIShell integration
- Button mapping: 0=UP, 1=SELECT, 2=DOWN, 3=MENU, 4=TOGGLE_LR
- Build SUCCESS (31.06s, 64.4% RAM, 42.0% Flash)

 P1.2 Documentation Update (1h)
- AGENT_TODO.md: Phase 9 completion + Sprint 9 section added
- Root cause analysis: watchdog timeout (cycle 9) → stack fix (8192→16384)
- Troubleshooting guide: common issues + debug commands

Files:
  + touch_emulator.{h,cpp}
  ~ ui_amiga_shell.* + main.cpp + AGENT_TODO.md

Next: P1.3 (Sprint 1 endurance validation) + P2 (main.cpp refactor)
2026-03-11 00:03:58 +01:00

52 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Spec App - Lecteur Audio (`audio_player`)
## 1. Cadrage
- ID runtime: `audio_player`
- Catégorie: `media`
- Scène d'entrée: `SCENE_AUDIO_PLAYER`
- Module actuel: `AudioPlayerModule`
- Manifest attendu: `/apps/audio_player/manifest.json`
- Offline: **oui** | Streaming: **oui**
## 2. Capacités
- Requises (193): `CAP_AUDIO_OUT`, `CAP_STORAGE_FS`, `CAP_GPU_UI`
- Optionnelles (16): `CAP_WIFI`
## 3. Objectif Produit
- Lecture audio locale/streaming avec fallback offline automatique.
## 4. Contrat Actions (`APP_ACTION` / `/api/apps/action`)
| Action | Payload | Effet attendu |
|---|---|---|
| `play` | `path texte (ex: /music/boot_radio.mp3)` | Lance la lecture locale. |
| `play_url` | `URL http(s)` | Lance le streaming; fallback offline si Wi-Fi indisponible. |
| `pause` | `vide` | Stoppe la lecture en gardant la piste courante pour reprise. |
| `resume` | `vide` | Reprend la lecture locale ou URL mémorisée. |
| `stop` | `vide` | Arrête la lecture. |
| `set_volume` | `0..100` | Ajuste le volume. |
| `next` | `vide` | Non implémenté (retour playlist_not_configured). |
| `prev` | `vide` | Non implémenté (retour playlist_not_configured). |
## 5. Stockage & Persistance
- Fallback offline: /apps/<app_id>/audio/offline.mp3
- Fallback default: /apps/<app_id>/audio/default.mp3
- Fallback global: /music/boot_radio.mp3
## 6. Backlog Développement (MVP)
- UI lecture/pause/stop/volume stable.
- Indicateur explicite quand fallback offline est utilisé.
- Gestion d'erreur visible pour missing_asset/network_unavailable.
- Intégrer le déclenchement depuis le launcher (`AmigaUIShell::launchSelectedApp`) via `APP_OPEN`.
- Vérifier la route de scène (`entry_screen`) et la cohérence UI/LVGL.
## 7. Critères dAcceptation
- L'app se lance via API et via commande série sans crash.
- Les actions principales répondent sans erreur non gérée.
- Le statut runtime reflète correctement `state`, `last_event`, `last_error`.
- Retour propre à `SCENE_READY` après fermeture app.
## 8. Tests Recommandés
1. `APP_OPEN audio_player` puis contrôle `UI_SCENE_STATUS`.
2. Exécuter 3-5 actions clés de `AudioPlayerModule` (serial/API).
3. `APP_CLOSE` puis validation `APP_IDLE` et absence de fuite mémoire visible.