Help with Detect Audio Peak Level

Hi,

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
format.

N = Size;
Bp = (Byte*) Buffer;
xMin = *Bp;
xMax = xMin;
for(i=0;i<N;i++)
 { if (*Bp > xMax)
       xMax = *Bp;
    if (xMin > *Bp)
       xMin = *Bp;
     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?

Thanks.