Mediaplayer increase a sound's volume



  • Hello guys,
    For the context : i'm creating my own mediaplayer with replaygain calculation. The replaygain is used for normalization and it is a value in decibels that indicates the desired target loudness level.
    From then replaygain value i can get a ratio which indicates the multiplicative value for every audio sample so it means that the volume of the music will be multiplied by that ratio.

    So my problem comes here : the setVolume fonction of the mediaplayer can only reduce the sound's volume and not increase it. Is there a way in qt (mediaplayer or other classes) to play a sound and increase its volume ?

    Another solution would be to decode the sound, multiply every samples by the ratio value and feed the mediaplayer with modified samples. I'll do that if i have no other choices but i'm looking for a simpler solution.

    Thanks


  • Lifetime Qt Champion

    Hi,

    The QtMultimedia module is currently not aimed at that kind of processing. You'll have to first decompress your input, process it and the use e.g. QAudioOutput to send your result to the audio output you want.



  • Thanks for your reply,
    I will go through this method.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.