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

Author Topic: SFML Android Music::openFromFile crash  (Read 1442 times)

0 Members and 1 Guest are viewing this topic.

holao09

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
SFML Android Music::openFromFile crash
« on: October 01, 2014, 05:43:28 am »
Dear all,
I need to build a program to play audio file on Android, audio file on SDcard.
I've do it with libsfml build for android by following Laurent's tutorial : https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android.
But I get few bugs as :
1.Music::openFromFile never return false. App crash if can't open audio file. Audio file only work in asset folder, can't read audio file from anywhere.
2. I also write anything to SDcard althounght add permission in Manifest XML file.

Anyone can help me?
Thanks all.

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: SFML Android Music::openFromFile crash
« Reply #1 on: October 03, 2014, 11:25:41 am »
By the first, Android port is not ready. I can't recommend it to use now, no, I recommend to not use it. =)
I don't know what about Music::openFromFile, I don't use it, I'm playing music via Music::loadFromStream and you have to write own stream for it or just search in the forum.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML Android Music::openFromFile crash
« Reply #2 on: October 03, 2014, 11:53:47 am »
Music::openFromFile never return false. App crash if can't open audio file. Audio file only work in asset folder, can't read audio file from anywhere.
Does this happen with a minimal example that only plays music and does nothing else? Do you happen to have such a code?

By the first, Android port is not ready. I can't recommend it to use now, no, I recommend to not use it. =)
If nobody uses it, we won't get any feedback, and the implementation will hardly improve. The more people use it and report bugs, the more progress we can make in the Android implementation.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: SFML Android Music::openFromFile crash
« Reply #3 on: October 03, 2014, 03:00:58 pm »
If nobody uses it, we won't get any feedback, and the implementation will hardly improve. The more people use it and report bugs, the more progress we can make in the Android implementation.
Yes, you're right. But there are no any changes almost half-year in repository. =(

 

anything