* return;
* }
* short* pSampleData = (short*)(frame.GetPlaneData(0)->GetPointer())
- * int peakValue = 0;
- * int sampleCount = frame.GetPlaneSize(0) / 2;
+ * int minPeakValue = 0;
+ * int maxPeakValue = 0;
+ * int sampleCount = frame.GetPlaneData(0)->GetCapacity() / 2;
* for (int i = 0; i<sampleCount; i++)
* {
- * if (pSampleData[i] >peakValue)
- * peakValue = pSampleData[i];
+ * if (pSampleData[i] < minPeakValue)
+ * {
+ * minPeakValue = pSampleData[i];
+ * }
+ * if (pSampleData[i] > maxPeakValue)
+ * {
+ * maxPeakValue = pSampleData[i];
+ * }
* }
* }
*