Audio volume control (increase or decrease) in Java

前端 未结 3 1747
借酒劲吻你
借酒劲吻你 2020-11-29 09:16

How do I increase the volume of an outgoing wav audio stream using Java? I\'m having issues with various Java TTS engines and the output volume of the synthesized speech. Is

3条回答
  •  天命终不由人
    2020-11-29 09:51

    You can adjust volume using a GainControl, try something like this after you have opened the line

    FloatControl volume= (FloatControl) line.getControl(FloatControl.Type.MASTER_GAIN); 
    

提交回复
热议问题