I noticed the same problem and it's annoying me. I think it's because you show notification too soon. When the output is changed to headphones or speakers you send notification message and after that volume is set to right output. I delayed notifying process and it's working for me now.
I noticed the same problem and it's annoying me. I think it's because you show notification too soon. When the output is changed to headphones or speakers you send notification message and after that volume is set to right output. I delayed notifying process and it's working for me now.