[APU] Refactor audio system to work with different frequencies/channel layouts

This commit is contained in:
Hendi
2024-10-15 00:55:52 +02:00
committed by Radosław Gliński
parent da6afabf60
commit 5a76cac218
15 changed files with 195 additions and 60 deletions

View File

@@ -42,7 +42,12 @@ class AudioSystem {
X_STATUS RegisterClient(uint32_t callback, uint32_t callback_arg,
size_t* out_index);
void UnregisterClient(size_t index);
void SubmitFrame(size_t index, uint32_t samples_ptr);
void SubmitFrame(size_t index, float* samples);
// Creates an independent, non-registered driver instance.
virtual AudioDriver* CreateDriver(xe::threading::Semaphore* semaphore,
uint32_t frequency, uint32_t channels,
bool need_format_conversion) = 0;
bool Save(ByteStream* stream);
bool Restore(ByteStream* stream);