On 16/04/2021 00:42, Ethin Probst wrote:
Forcing a particular channel mapping, sample rate and sample format on
everyone would complicate application code. From an application point
of view, one would, with that type of protocol, need to do the
following:
1) Load an audio file in any audio file format from any storage mechanism.
2) Decode the audio file format to extract the samples and audio metadata.
3) Resample the (now decoded) audio samples and convert (quantize) the
audio samples into signed 16-bit PCM audio.
4) forward the samples onto the EFI audio protocol.

You have made an incorrect assumption that there exists a requirement to be able to play audio files in arbitrary formats. This requirement does not exist.

With a protocol-mandated fixed baseline set of audio parameters (sample rate etc), what would happen in practice is that the audio files would be encoded in that format at *build* time, using tools entirely external to UEFI. The application code is then trivially simple: it just does "load blob, pass blob to audio protocol".

typedef struct EFI_SIMPLE_AUDIO_PROTOCOL {
   EFI_SIMPLE_AUDIO_PROTOCOL_RESET Reset;
   EFI_SIMPLE_AUDIO_PROTOCOL_START Start;
   EFI_SIMPLE_AUDIO_PROTOCOL_STOP Stop;
} EFI_SIMPLE_AUDIO_PROTOCOL;

This is now starting to look like something that belongs in boot-time firmware. :)

Michael


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#74150): https://edk2.groups.io/g/devel/message/74150
Mute This Topic: https://groups.io/mt/81710286/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to