@Ziegmont
If your Samsung soundbar connects to tv by hdmi, and has cec feature, yes. The Roku tv remote controls the tv volume by wifi, then the tv controls the Samsung volume via cec signal sent over the hdmi cable.
But if your Samsung soundbar only connects via optical, the answer is no. You would need aftermarket universal remote that each component by IR. So it would have to have a proper codes for your tv brand and soundbar.
Edmund
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.