1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00
serenity/Userland/Libraries/LibAudio
kleines Filmröllchen b4fbd30b70 AudioServer+Userland: Decouple client sample rates from device rate
This change was a long time in the making ever since we obtained sample
rate awareness in the system. Now, each client has its own sample rate,
accessible via new IPC APIs, and the device sample rate is only
accessible via the management interface. AudioServer takes care of
resampling client streams into the device sample rate. Therefore, the
main improvement introduced with this commit is full responsiveness to
sample rate changes; all open audio programs will continue to play at
correct speed with the audio resampled to the new device rate.

The immediate benefits are manifold:
- Gets rid of the legacy hardware sample rate IPC message in the
  non-managing client
- Removes duplicate resampling and sample index rescaling code
  everywhere
- Avoids potential sample index scaling bugs in SoundPlayer (which have
  happened many times before) and fixes a sample index scaling bug in
  aplay
- Removes several FIXMEs
- Reduces amount of sample copying in all applications (especially
  Piano, where this is critical), improving performance
- Reduces number of resampling users, making future API changes (which
  will need to happen for correct resampling to be implemented) easier

I also threw in a simple race condition fix for Piano's audio player
loop.
2023-07-01 23:27:24 +01:00
..
CMakeLists.txt AudioServer+Userland: Separate audio IPC into normal client and manager 2023-06-25 00:16:44 +02:00
ConnectionToManagerServer.cpp AudioServer+Userland: Separate audio IPC into normal client and manager 2023-06-25 00:16:44 +02:00
ConnectionToManagerServer.h AudioServer+Userland: Separate audio IPC into normal client and manager 2023-06-25 00:16:44 +02:00
ConnectionToServer.cpp AudioServer+Userland: Decouple client sample rates from device rate 2023-07-01 23:27:24 +01:00
ConnectionToServer.h AudioServer+Userland: Decouple client sample rates from device rate 2023-07-01 23:27:24 +01:00
FlacLoader.cpp LibAudio: Extract loader stream creation from the plugins 2023-06-27 15:28:22 +01:00
FlacLoader.h LibAudio: Extract loader stream creation from the plugins 2023-06-27 15:28:22 +01:00
FlacTypes.h LibAudio: Compute and verify FLAC frame header checksums 2023-05-18 22:23:15 +02:00
Forward.h LibAudio: Add a forwarding header 2023-06-13 06:14:01 +02:00
GenericTypes.cpp LibAudio: Improve FLAC seeking 2023-03-19 00:28:02 +00:00
GenericTypes.h LibAudio: Improve FLAC seeking 2023-03-19 00:28:02 +00:00
Loader.cpp LibAudio: Extract loader stream creation from the plugins 2023-06-27 15:28:22 +01:00
Loader.h LibAudio: Extract loader stream creation from the plugins 2023-06-27 15:28:22 +01:00
LoaderError.h LibAudio: Add a formatter for LoaderError 2023-03-13 12:35:17 -04:00
Metadata.cpp LibAudio: Add a generic audio metadata container 2023-03-13 12:35:17 -04:00
Metadata.h LibAudio: Add a generic audio metadata container 2023-03-13 12:35:17 -04:00
MP3HuffmanTables.h Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
MP3Loader.cpp LibAudio: Extract loader stream creation from the plugins 2023-06-27 15:28:22 +01:00
MP3Loader.h LibAudio: Extract loader stream creation from the plugins 2023-06-27 15:28:22 +01:00
MP3Tables.h LibAudio+LibDSP: Switch samples to 32-bit float instead of 64-bit float 2022-05-07 20:20:16 +02:00
MP3Types.h LibAudio: Use symbolic constants for MP3 frame and granule size 2023-03-13 13:25:42 +01:00
QOALoader.cpp LibAudio: Extract loader stream creation from the plugins 2023-06-27 15:28:22 +01:00
QOALoader.h LibAudio: Extract loader stream creation from the plugins 2023-06-27 15:28:22 +01:00
QOATypes.cpp LibAudio: Implement the Quite Okay Audio format 2023-03-10 04:07:14 -07:00
QOATypes.h LibAudio: Implement the Quite Okay Audio format 2023-03-10 04:07:14 -07:00
Queue.h LibAudio+Userland: Remove Audio::LegacyBuffer 2022-05-03 23:09:20 +02:00
Resampler.h LibAudio: Tolerate a file sample rate lower than the AudioServer's 2022-12-31 00:04:34 +01:00
RIFFTypes.cpp LibAudio: Load WAV metadata 2023-05-31 16:23:07 +02:00
RIFFTypes.h LibAudio: Load WAV metadata 2023-05-31 16:23:07 +02:00
Sample.h Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
SampleFormats.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
SampleFormats.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
UserSampleQueue.cpp LibAudio: Prevent int overflow in the user buffer queue 2022-12-31 00:08:05 +01:00
UserSampleQueue.h Everywhere: Remove unused includes of AK/Format.h 2023-01-02 20:27:20 -05:00
VorbisComment.cpp LibAudio: Update stream APIs used when reading audio metadata 2023-03-13 12:46:42 -04:00
VorbisComment.h LibAudio: Detect and read FLAC metadata 2023-03-13 12:35:17 -04:00
WavLoader.cpp LibAudio: Extract loader stream creation from the plugins 2023-06-27 15:28:22 +01:00
WavLoader.h LibAudio: Extract loader stream creation from the plugins 2023-06-27 15:28:22 +01:00
WavWriter.cpp LibAudio: Handle all integer PCM sample formats "correctly" in WavWriter 2023-06-22 21:45:54 +02:00
WavWriter.h LibAudio: Handle all integer PCM sample formats "correctly" in WavWriter 2023-06-22 21:45:54 +02:00