FreeLanguageTools/vocabsieve

.ogg audio doesn't preview on Windows

Closed this issue · 2 comments

Describe the bug
.ogg audio doesn't preview on Windows version of vocabsieve. If forvo pronunciation file is .ogg then the preview won't play in vocabsieve (but is saved fine in Anki)

To Reproduce
Steps to reproduce the behavior:

  1. Select Portuguese language in settings
  2. Define de agora em diante
  3. Click through all the available audio - audio doesn't play

Expected behavior
Audio plays normally

Desktop (please complete the following information):

  • OS: Windows
  • Vocabsieve version (if nightly, must be latest): 10.2

Additional context
Works fine on Linux. Applies to any .ogg file. The audio is still saved fine to Anki (and plays fine as well), so this is only a problem with vocabsieve preview, something to do with Windows audio codecs probably

It might be a Windows codec issue, but it's more likely a playsound issue.
We need to switch to QMediaPlayer instead of using playsound. When I first implemented this, I didn't know QMediaPlayer existed. Playsound is also an abandoned library (which I had to copy to this repo), so we better get rid of it soon.

Do you want to try doing that? This just involves changing the part that plays audio to use QMediaPlayer. It shouldn't be too complicated.

This does seem like a codec issue after all. Same thing happens on QMediaPlayer. Closing this since mp3 downloads are supported now