Added method to play sound with varying gain/volume