Skip to content

Commit

Permalink
Bug Fix: Fix output volume from seeking
Browse files Browse the repository at this point in the history
Fixes output volume setting on seek or audio output restart on format
change. Also safeguards these setters so they don't go off if the nodes
aren't actually allocated.

Signed-off-by: Christopher Snowhill <[email protected]>
  • Loading branch information
kode54 committed Feb 24, 2025
1 parent c450701 commit c02eabc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Audio/Chain/BufferChain.m
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,15 @@ - (double)getPostVisLatency {

- (void)setVolume:(double)v {
AudioPlayer * audioPlayer = controller;
OutputNode *outputNode = [audioPlayer output];
[outputNode setVolume:v];
if(audioPlayer) {
OutputNode *outputNode = [audioPlayer output];
if(outputNode) {
[outputNode setVolume:v];
}
}
if(inputNode) {
[inputNode setLastVolume:v];
}
}

@end

0 comments on commit c02eabc

Please sign in to comment.