Python Forum
Skipping sound file on RPi4
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Skipping sound file on RPi4
#1
Hi everyone!

I'm having an issue with some code on a RPi4.

The program does the thing it should 75% of the time.

After a few loops through the repeating program, it decides to skip playing the audio files. The code is calling the same audio file each time, just that sometimes it skips right over that line of code.

The program is an animated seagull from Finding Nemo. The bird's mouth opens, says "Mine?" Then closes. When Python calls the audio fil and it plays, there is a bit of a pause between the beak opening and closing. When it doesn't play the file, it doesn't pause, like Python decided to skip right over that line of code.

Anyone know what's going on with this, or been in the same boat and found a solution?

Here is my code:

subprocess.check_output(['omxplayer --adev alsa /home/pi/gulls/mine.mp3'], stderr=subprocess.STDOUT, shell=True)

Thanks!
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020