This is kind of a complicated goal but includes building Opusfile, Ogg, Opus in to Mbed, reading Opus files from the storage, and playing them.
Mbed doesn't provide an audio interface driver so we will have to probably reference https://github.com/STMicroelectronics/STM32CubeF7/tree/master/Projects/STM32F769I-Discovery/Examples/SAI/SAI_AudioPlay and https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery_audio.c
The theory looks simple:
Mbed provides the HAL for the SAI, but we will need to lift the audio layer from the BSP and audio codec driver.
This has been kind of done here: https://os.mbed.com/teams/ST/code/BSP_DISCO_F769NI/ We should try these examples: https://os.mbed.com/teams/ST/code/DISCO-F769NI_AUDIO_demo/
These two fixes to the BSP code are also good hints for us if we decide to copy the BSP code ourselves:
I vaguely recall that I have some code laying around for playing a sine wave from the board's audio so I might dredge that up.