1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00
ladybird/Userland/Applications/SoundPlayer
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
..
AlbumCoverVisualizationWidget.cpp Everywhere: Use LibFileSystem where trivial 2023-03-21 19:03:21 +00:00
AlbumCoverVisualizationWidget.h SoundPlayer: Load cover image from music files 2022-11-13 18:51:18 -07:00
BarsVisualizationWidget.cpp Base+Userland: Apply Human Interface Guidelines to Object text 2023-05-23 05:59:49 +02:00
BarsVisualizationWidget.h LibAudio+LibDSP: Switch samples to 32-bit float instead of 64-bit float 2022-05-07 20:20:16 +02:00
CMakeLists.txt Everywhere: Use LibFileSystem where trivial 2023-03-21 19:03:21 +00:00
M3UParser.cpp LibCore: Remove Stream.h 2023-02-13 00:50:07 +00:00
M3UParser.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
main.cpp Base+Userland: Apply Human Interface Guidelines to Object text 2023-05-23 05:59:49 +02:00
PlaybackManager.cpp AudioServer+Userland: Decouple client sample rates from device rate 2023-07-01 23:27:24 +01:00
PlaybackManager.h AudioServer+Userland: Decouple client sample rates from device rate 2023-07-01 23:27:24 +01:00
Player.cpp AudioServer+Userland: Decouple client sample rates from device rate 2023-07-01 23:27:24 +01:00
Player.h SoundPlayer: Display title and artist in the window title if available 2023-03-13 12:35:17 -04:00
Playlist.cpp Everywhere: Use LibFileSystem where trivial 2023-03-21 19:03:21 +00:00
Playlist.h SoundPlayer: Implement playlist shuffle mode 2021-10-25 23:37:18 +02:00
PlaylistWidget.cpp LibGUI+Userland: Propagate errors in Model::column_name() 2023-06-14 17:53:59 +02:00
PlaylistWidget.h LibGUI+Userland: Propagate errors in Model::column_name() 2023-06-14 17:53:59 +02:00
SampleWidget.cpp Userland: Remove unused includes of AK/Math.h 2023-01-02 20:27:20 -05:00
SampleWidget.h LibAudio+LibDSP: Switch samples to 32-bit float instead of 64-bit float 2022-05-07 20:20:16 +02:00
SoundPlayerWidgetAdvancedView.cpp SoundPlayer: Fix glitchy visualization on pause/stop 2023-05-02 09:15:20 +02:00
SoundPlayerWidgetAdvancedView.h SoundPlayer: Move get_image_from_music_file to the advanced view 2023-03-19 18:57:30 +00:00
VisualizationWidget.h SoundPlayer: Introduce buffer_reset api to VisualizationWidget 2023-05-02 09:15:20 +02:00