This thread may be of interest:
http://www.hydrogenaudio.org/forums/index....showtopic=33263In the GUI source the code is in frmMain.frm
CODE
If mp3Inf.AlbumdBGain <> NOREALNUM Then
If mp3Inf.CurrMaxAmp * 2# ^ (CDbl(mp3Inf.AlbumMp3Gain) / 4#) > 32767# Then
If mp3Inf.CurrMaxAmp * 2# ^ ((83# - (DEFAULTTARGET + mp3Inf.ModifydBGain - mp3Inf.AlbumdBGain)) / 6.0206) > 32767# Then
itmX.ListSubItems(lsAlbumClip).Text = strClipMaybe
itmX.ListSubItems(lsAlbumClip).ForeColor = vbBlue
If itmX.ForeColor = vbBlack Then 'Don't change to blue if already red
itmX.ForeColor = vbBlue
itmX.ListSubItems(glPath).ForeColor = vbBlue
itmX.ListSubItems(glPath) = itmX.ListSubItems(glPath)
itmX.ListSubItems(glFile).ForeColor = vbBlue
itmX.ListSubItems(glFile) = itmX.ListSubItems(glFile)
End If
Else
itmX.ListSubItems(lsAlbumClip).Text = strClipYes
itmX.ListSubItems(lsAlbumClip).ForeColor = vbRed
itmX.ForeColor = vbRed
itmX.ListSubItems(glPath).ForeColor = vbRed
itmX.ListSubItems(glPath) = itmX.ListSubItems(glPath)
itmX.ListSubItems(glFile).ForeColor = vbRed
itmX.ListSubItems(glFile) = itmX.ListSubItems(glFile)
End If
Else
itmX.ListSubItems(lsAlbumClip).Text = ""
itmX.ListSubItems(lsAlbumClip).ForeColor = vbBlack
End If
End If
You'll see that the maximum amplitude (mp3Inf.CurrMaxAmp) and album gain (mp3Inf.AlbumMp3Gain) are required. The maximum amplitude is obtained by mp3gain.exe - so I guess you'll have to check that source, or find some other code to do the same. The album gain refers to the current suggested gain for the album - and is the variable - i.e.: if clipping is occurring then it needs to be decreased - see jth's script on the referenced thread.
Edit: Another source of info may be WaveGain (application and source available at
http://www.rarewares.org/others.html).