getAmplitudeValues method
Gets the amplitude values from the waveform data.
Returns a list of values between 0.0 and 1.0 representing the amplitude.
Implementation
List<double> getAmplitudeValues() {
if (waveform == null || waveform!.isEmpty) {
// Return a flat line if no data is available
return List.filled(64, 0.5);
}
return waveform!.map((byte) => byte / 255.0).toList();
}