def _sc_encode(gain, peak):
 peak *= 32768.0
 g1 = int(min(round(((10 ** (gain / (-10))) * 1000)), 65534))
 g2 = int(min(round(((10 ** (gain / (-10))) * 2500)), 65534))
 uk = 0
 values = (g1, g1, g2, g2, uk, uk, int(peak), int(peak), uk, uk)
 return ((u' %08X' * 10) % values)

def _sc_encode ( gain , peak ) : peak *= 32768.0 g1 = int ( min ( round ( ( ( 10 ** ( gain / ( - 10 ) ) ) * 1000 ) ) , 65534 ) ) g2 = int ( min ( round ( ( ( 10 ** ( gain / ( - 10 ) ) ) * 2500 ) ) , 65534 ) ) uk = 0 values = ( g1 , g1 , g2 , g2 , uk , uk , int ( peak ) , int ( peak ) , uk , uk ) return ( ( u' %08X' * 10 ) % values )
encode replaygain gain/peak values as a sound check string .