mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 18:24:45 -05:00
c748c0726a
Previously, SoundPlayer would read and enqueue samples in the GUI loop (through a Timer). Apart from general problems with doing audio on the GUI thread, this is particularly bad as the audio would lag or drop out when the GUI lags (e.g. window resizes and moves, changing the visualizer). As Piano does, now SoundPlayer enqueues more audio once the audio server signals that a buffer has finished playing. The GUI- dependent decoding is still kept as a "backup" and to start the entire cycle, but it's not solely depended on. A queue of buffer IDs is used to keep track of playing buffers and how many there are. The buffer overhead, i.e. how many buffers "too many" currently exist, is currently set to its absolute minimum of 2. |
||
---|---|---|
.. | ||
BarsVisualizationWidget.cpp | ||
BarsVisualizationWidget.h | ||
CMakeLists.txt | ||
Common.h | ||
M3UParser.cpp | ||
M3UParser.h | ||
main.cpp | ||
NoVisualizationWidget.cpp | ||
NoVisualizationWidget.h | ||
PlaybackManager.cpp | ||
PlaybackManager.h | ||
Player.cpp | ||
Player.h | ||
Playlist.cpp | ||
Playlist.h | ||
PlaylistWidget.cpp | ||
PlaylistWidget.h | ||
SampleWidget.cpp | ||
SampleWidget.h | ||
SoundPlayerWidgetAdvancedView.cpp | ||
SoundPlayerWidgetAdvancedView.h | ||
VisualizationWidget.h |