mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-07 09:54:55 +00:00
Small fix to Player's stream resolution logic -- we should also return a
DynamicStream when the visualizer is hidden.
This commit is contained in:
parent
896f8459df
commit
4600b801b6
@ -190,7 +190,12 @@ int Player::State() {
|
||||
}
|
||||
|
||||
void musik::core::audio::playerThreadLoop(Player* player) {
|
||||
player->stream = vis::SelectedVisualizer()
|
||||
/* if there's no visualizer active we'll use a DynamicStream, which allows
|
||||
buffer sizes to vary. this type of stream is more CPU friendly because
|
||||
we won't have to memcpy a bunch of audio data around. */
|
||||
auto visualizer = vis::SelectedVisualizer();
|
||||
|
||||
player->stream = (visualizer && visualizer->Visible())
|
||||
? Stream::Create() : DynamicStream::Create();
|
||||
|
||||
BufferPtr buffer;
|
||||
|
Loading…
Reference in New Issue
Block a user