SFML community forums

Help => Audio => Topic started by: man'O'war on February 22, 2017, 09:49:02 pm

Title: Cannot load a sf::SoundBuffer
Post by: man'O'war 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.
Title: Re: Cannot load a sf::SoundBuffer
Post by: eXpl0it3r on February 22, 2017, 10:16:49 pm
How large is the uncompressed version of that sound file?
Title: Re: Cannot load a sf::SoundBuffer
Post by: man'O'war 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.
Title: Cannot load a sf::SoundBuffer
Post by: eXpl0it3r on February 23, 2017, 11:37:33 am
Seems to be a driver issue then. Can other applications play back audio?
Title: Re: Cannot load a sf::SoundBuffer
Post by: man'O'war 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 ?
Title: Re: Cannot load a sf::SoundBuffer
Post by: eXpl0it3r 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 (https://ubuntuforums.org/showthread.php?t=1637399). Seems like you have to raise the memory limit, might want to follow some of the given advice in these threads.
Title: Re: Cannot load a sf::SoundBuffer
Post by: man'O'war 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 (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 (http://en.sfml-dev.org/forums/index.php?topic=20070.0) )
just a wrong path, it is actually wroking.

Thank you very much.