Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Can't play short .OGG files  (Read 2917 times)

0 Members and 1 Guest are viewing this topic.

criptych

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Can't play short .OGG files
« on: March 26, 2015, 07:04:30 pm »
I get the error "Failed to open Vorbis file for reading" whenever I try to play very short (3-4 seconds) .OGG files.  I can play them without issue in other software, and SFML is able to play longer tracks from the same set (encoded in the same batch as the shorter files, with the same software and settings, which is why I think it's to do with the length).

I'm using SFML revision 7b4610b55b from GitHub.  The specific files I'm having a problem with are attached if anyone wants to examine them (lightstroke.ogg and darkstroke.ogg), along with a slightly longer track (6 seconds) that does work (gameover.ogg).

Has anyone else noticed this problem, or have some ideas what might cause it?  I don't really want to go with WAV, but if it's necessary....

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Can't play short .OGG files
« Reply #1 on: March 26, 2015, 08:47:53 pm »
I've found the bug, I'll submit a patch ASAP. Thanks for the report :)
Laurent Gomila - SFML developer

criptych

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Can't play short .OGG files
« Reply #2 on: March 26, 2015, 09:05:10 pm »
Thanks for the quick answer. :D 

EDIT: If the issue is in file handling, perhaps as a workaround I'll just add PhysicsFS to my project a little sooner than planned.  I never did like working with fstreams.
« Last Edit: March 26, 2015, 09:30:49 pm by criptych »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Can't play short .OGG files
« Reply #3 on: April 01, 2015, 01:39:00 pm »
It has been fixed in 0b221921ed
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything