HDD audio start/stop sample playback + some mutex deadlock fixes

This commit is contained in:
Domppari
2026-01-04 11:15:22 +02:00
parent b4a5c76847
commit 419ee5cbd9
2 changed files with 241 additions and 50 deletions

View File

@@ -24,6 +24,14 @@ extern "C" {
#define HDD_AUDIO_PROFILE_MAX 64
/* Spindle motor states */
typedef enum {
HDD_SPINDLE_STOPPED = 0,
HDD_SPINDLE_STARTING,
HDD_SPINDLE_RUNNING,
HDD_SPINDLE_STOPPING
} hdd_spindle_state_t;
/* Audio sample configuration structure */
typedef struct {
char filename[512];
@@ -57,6 +65,9 @@ extern void hdd_audio_reset(void);
extern void hdd_audio_close(void);
extern void hdd_audio_callback(int16_t *buffer, int length);
extern void hdd_audio_seek(hard_disk_t *hdd, uint32_t new_cylinder);
extern void hdd_audio_spinup(void);
extern void hdd_audio_spindown(void);
extern hdd_spindle_state_t hdd_audio_get_spindle_state(void);
#ifdef __cplusplus
}