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

Author Topic: Cannot load a sf::SoundBuffer  (Read 5218 times)

0 Members and 1 Guest are viewing this topic.

man'O'war

  • Newbie
  • *
  • Posts: 46
  • What needs to be done is done by those capable.
    • View Profile
Cannot load a sf::SoundBuffer
« on: February 22, 2017, 09:49:02 pm »
Hello,

I encountered some never-seen problem that, i dont know if it is an issue from my computer or not.
By creating a SoundBuffer and loading a file into it, i'll have these messages poping up.

Cannot lock down 82274202 byte memory area (Cannot allocate memory)
Cannot lock down 82274202 byte memory area (Cannot allocate memory)
Cannot use real-time scheduling (RR/5)(1: Operation not permitted)
JackClient::AcquireSelfRealTime error
 

i've looked up trying to restart the jack server, because at first it was telling me the jack server could not be started.

I'm running Ubuntu16.10 using SFMLv2.4.0

Thanks.
Cordially.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11028
    • View Profile
    • development blog
    • Email
Re: Cannot load a sf::SoundBuffer
« Reply #1 on: February 22, 2017, 10:16:49 pm »
How large is the uncompressed version of that sound file?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

man'O'war

  • Newbie
  • *
  • Posts: 46
  • What needs to be done is done by those capable.
    • View Profile
Re: Cannot load a sf::SoundBuffer
« Reply #2 on: February 23, 2017, 11:17:46 am »
How large is the uncompressed version of that sound file?
How can i know that ?
It is a 60kb .OGG file.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11028
    • View Profile
    • development blog
    • Email
Cannot load a sf::SoundBuffer
« Reply #3 on: February 23, 2017, 11:37:33 am »
Seems to be a driver issue then. Can other applications play back audio?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

man'O'war

  • Newbie
  • *
  • Posts: 46
  • What needs to be done is done by those capable.
    • View Profile
Re: Cannot load a sf::SoundBuffer
« Reply #4 on: February 23, 2017, 03:22:45 pm »
Yes, tested with ubuntu rhythmbox and VLC.
I also reinstalled Ubuntu. and still have the same problem. :(

edit:
Is the issue related to SFML or OS ?
« Last Edit: February 23, 2017, 03:25:27 pm by man'O'war »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11028
    • View Profile
    • development blog
    • Email
Re: Cannot load a sf::SoundBuffer
« Reply #5 on: February 23, 2017, 03:42:56 pm »
It's an issue with Jack. Some googling of the error message reveals many threads like this. Seems like you have to raise the memory limit, might want to follow some of the given advice in these threads.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

man'O'war

  • Newbie
  • *
  • Posts: 46
  • What needs to be done is done by those capable.
    • View Profile
Re: Cannot load a sf::SoundBuffer
« Reply #6 on: February 23, 2017, 07:10:07 pm »
In fact yeah, that was something that.
I managed to extend the lock memory limit and even change the priority and permission. ( tested using ulimit -a )

related link: https://software.intel.com/en-us/blogs/2014/12/16/best-known-methods-for-setting-locked-memory-size
Thus, removed most of the error i had, except that.

Failed to open sound file "0537.ogg" (couldn't open stream)

tested with other files wav format, still the same. :(

edit:
Got it from here: ( http://en.sfml-dev.org/forums/index.php?topic=20070.0 )
just a wrong path, it is actually wroking.

Thank you very much.
« Last Edit: February 23, 2017, 07:14:02 pm by man'O'war »