Skip to content

Commit

Permalink
ase/combo.cc: fix combo insertion order for devices inserted at end
Browse files Browse the repository at this point in the history
Fixes tim-janik#24.

Signed-off-by: Stefan Westerfeld <[email protected]>
  • Loading branch information
swesterfeld authored and tim-janik committed Feb 14, 2024
1 parent 82fad16 commit c224110
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ase/combo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ void
AudioCombo::insert (AudioProcessorP proc, ssize_t pos)
{
assert_return (proc != nullptr);
if (pos == -1)
pos = processors_.size(); // insert at the end of the chain
const size_t index = CLAMP (pos, 0, processors_.size());
processors_.insert (processors_.begin() + index, proc);
// fixup following connections
Expand Down

0 comments on commit c224110

Please sign in to comment.