
The method control() is too complicated, and overengineered. Replace it with two trivial functions: get_volume() and set_volume().
The method control() is too complicated, and overengineered. Replace it with two trivial functions: get_volume() and set_volume().