No announcement yet.

Playing WAV issue: just audible behind repetitive noise

  • Filter
  • Time
  • Show
Clear All
new posts

  • Playing WAV issue: just audible behind repetitive noise

    I am trying to use file_PlayWAV to play a 16KHz WAV file: the music can be heard (played correctly), but hidden behind by a louder repetitive clickety pattern.
    Changing the buffering size (with snd_BufSize) does not help. It just change the modulation of the unwanted noise pattern!

    For the amplifier, I am using a mono amplifier PAM8302A assembled on a breakout board (
    The screen used for this experiment is a Gen4-uLCD-32DT connected to a gen4-PA adapter, the whole thing powered only by the USB port of the computer (amplifier uses 5V from the gen4-PA).

    Other notes:
    - If I just enable the amplifier but loop without doing anything, the speaker background noise is extremely minimal
    - If I try to read a file from the SD card (rather than playing a sound) while manually enabling the amplifier, then loud noise appear again

    So its seems that the amplifier is picking more noise than audio signal from the processor when the SD card is accessed.

    Any advice on how to resolve this issue?

    Example of output

    ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
    built with gcc 9.2.1 (GCC) 20200122
    Guessed Channel Layout for Input Stream #0.0 : mono
    Input #0, wav, from '.\sirius.wav':
    encoder : Lavf58.29.100
    Duration: 00:01:55.28, bitrate: 256 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s
    Attached Files

  • #2

    Good day.

    I tested your code using different WAV files which works without hearing any unwanted noise using our gen4-MOTG-AC2 product that also has a mono amplifier.
    Have you tried to use a separate power supply on your application?

    You can also try the attached file and use the included WAV file to check if you can hear background noise.

    Thank you.

    Best Regards,
    Attached Files