Help with Detect Audio Peak Level


i want to detect the audio peak level on a captured audio buffer, the
captured audio  is in GSM 6.10 8.000 kHz, Mono..
I have the code to detect the peak level of PCM 8.000 kHz, 8 Bit, Mono Audio

N = Size;
Bp = (Byte*) Buffer;
xMin = *Bp;
xMax = xMin;
 { if (*Bp > xMax)
       xMax = *Bp;
    if (xMin > *Bp)
       xMin = *Bp;
MaxPeak = xMax;
if (abs(xMin) > xMax)
     MaxPeak = abs(xMin);

is there a code to do the same on GSM Format? or do i have to convert the
GSM Audio to PCM and then detect the peak level?