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

Author Topic: SuperMarioWorld sound can't be loaded (coudn't open stream)  (Read 3704 times)

0 Members and 1 Guest are viewing this topic.

RunaldWaschlab

  • Guest
SuperMarioWorld sound can't be loaded (coudn't open stream)
« on: March 07, 2017, 10:21:33 am »
I cloned SqAtx's GitHub repository https://github.com/SqAtx/SuperMarioWorld onto my Ubuntu 16.04 (64bit) machine. I would like to run his Super Mario clone in order to understand his project and learn by the way he did this game.
I succesfully compiled his project, but as soon as I start the executable I get the following error message:
Quote
Failed to open sound file "../../assets/sounds/Jump_Sound_Effect.ogg" (couldn't open stream)
Can't load sound ../../assets/sounds/Jump_Sound_Effect.ogg
Failed to open sound file "../../assets/sounds/Coin_Sound_Effect.ogg" (couldn't open stream)
Can't load sound ../../assets/sounds/Coin_Sound_Effect.ogg
Failed to open sound file "../../assets/sounds/Mario_Death_Sound_Effect.ogg" (couldn't open stream)
Can't load sound ../../assets/sounds/Mario_Death_Sound_Effect.ogg
Failed to open sound file "../../assets/sounds/Kick_Sound_Effect.ogg" (couldn't open stream)
Can't load sound ../../assets/sounds/Kick_Sound_Effect.ogg
Can't read level file ../../assets/levels/biglvl.xml
Failed to open sound file "../../assets/sounds/Super_Jungle_Brothers_OC_ReMix.ogg" (couldn't open stream)
Can't open music file ../../assets/sounds/Super_Jungle_Brothers_OC_ReMix.ogg
Failed to open sound file "../../assets/sounds/SwankyVegas_OC_ReMix.ogg" (couldn't open stream)
Can't open music file ../../assets/sounds/SwankyVegas_OC_ReMix.ogg
Failed to open sound file "../../assets/sounds/Super_Jungle_Brothers_OC_ReMix.ogg" (couldn't open stream)
Can't open music file ../../assets/sounds/Super_Jungle_Brothers_OC_ReMix.ogg
Failed to open sound file "../../assets/sounds/SwankyVegas_OC_ReMix.ogg" (couldn't open stream)
Can't open music file ../../assets/sounds/SwankyVegas_OC_ReMix.ogg
Failed to open sound file "../../assets/sounds/Super_Jungle_Brothers_OC_ReMix.ogg" (couldn't open stream)
Can't open music file ../../assets/sounds/Super_Jungle_Brothers_OC_ReMix.ogg
Failed to open sound file "../../assets/sounds/SwankyVegas_OC_ReMix.ogg" (couldn't open stream)
Can't open music file ../../assets/sounds/SwankyVegas_OC_ReMix.ogg
.....
It is much longer, the longer you let it run...

Does someone have an idea what is the problem with this?
All help is appreciated!
Thank you.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: SuperMarioWorld sound can't be loaded (coudn't open stream)
« Reply #1 on: March 07, 2017, 11:07:55 am »
You're most likely running the compiled binary from the wrong working directory so the assets can't be found.

Since Visual Studio will place your built binaries in a folder like "x64/Debug", I'd assume all you hav eto do is modify the asset paths and remove the leading "../../" to fix this.

RunaldWaschlab

  • Guest
Re: SuperMarioWorld sound can't be loaded (coudn't open stream)
« Reply #2 on: March 08, 2017, 03:51:15 am »
Okay, thanks for the help!!
I tried to do that, and when I recompile and execute it I get an error message saying Segmentation fault (core dumped)

Can you please help me with that as well? What is causing the problem, and how can I solve it?

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: SuperMarioWorld sound can't be loaded (coudn't open stream)
« Reply #3 on: March 09, 2017, 11:52:12 am »
Could be anything, you'll have to debug your program. In Visual Studio's projects settings (under "Debugging") you can also set your proper working directory, so you can simulate running the program from that specific folder.

 

anything