audio_waveforms icon indicating copy to clipboard operation
audio_waveforms copied to clipboard

Waveforms of no sound at all appear at their max size instead of their min size

Open noygafni opened this issue 3 years ago • 5 comments

My code:

@override
  void initState() {
    super.initState();
    _recorderController = RecorderController();
    _recorderController.record();
  }

...

AudioWaveforms(
    size: const Size(230, 50),
    recorderController: _recorderController,
    waveStyle: const WaveStyle(
      waveColor: Colors.pink,
      spacing: 8.0,
      extendWaveform: true,
      showMiddleLine: false,
   ),
)

For some reason the wave forms of absolute silence appear at max size. Here is a photo - took the screenshot when there was no sound at all no sound bug

It is important to mention that when there is sound the waveforms seems to work as expected.

noygafni avatar May 16 '22 19:05 noygafni

From your this #44 issue I see you are using an emulator. Can you please test it on a real device because android emulators behave weirdly in different scenarios?

ujas-m-simformsolutions avatar May 17 '22 05:05 ujas-m-simformsolutions

Here the same thing happens, I tested it on a real device.

renankanu avatar May 17 '22 23:05 renankanu

Adding this ..normalizationFactor = 40, works here for me. The default for android is 60.

renankanu avatar May 18 '22 00:05 renankanu

That seems to improve this, thank you so much

noygafni avatar May 18 '22 05:05 noygafni

Acutely after a lot of testing setting the ..normalizationFactor = 40 is still not good enough. for some reason the sound waves does not react correctly to my voice. further more when I play the recording using AudioFileWaveforms the sound waves look completely different than the sound waves while recording. I think it is a bug.

noygafni avatar May 19 '22 13:05 noygafni