How to play sound effect forever in cocos2d-x - audio

I am make the android game by using cocos2d-x.
I can't play the sound effect forever. Because it stop after it is played several times.
I think it has limitation as 32 times in SimpleAudioEngine.
Is the way to remove this limitation?
If anyone knows about this, let me know?
Thanks.

Related

Make microphone record system audio output

So, yesterday, i was calling with my friend and i wanted to play him an sound from a game, but i had no idea how, because he couldn't hear mine sound. So, is there a way to direct all the system audio to record on the microphone? And also keep the normal output so i can hear it. Thanks for help!
And also, please make your answer noob-friendly, because i am pretty bad with this, thanks!
Other stuff:
I want to direct the output into the microphone, not just the calling program (it's Skype by the way).
Please don't answer that i should put the output to the speakers and record it like it, because i don't even have speakers... just headphones.

Cardboard headtracking with no gyro

I have a LG G3 phone which after some testing does not have a gyroscope(only accelerometer) and I've been testing the Cardboard with it and faced some issues.
Sometimes the camera can suddently jump up to 90 degrees in any direction from where I was looking, and this can at it's worst happen every 10 seconds or so(usually about every 30sec). I did test the accelerometer output and it didn't seem to be that inaccurate that the camera would jump that much. I've looked around and found a couple of other users reporting the same issue too.
This issue is present not only in the Unity Cardboard SDK Demo but also in some vr apps, and by some I mean there are a couple of apps that I've tried that works perfectly fine(Can't remember which ones right now but one was a roller coaster vr app). Though this issue is really apparent in the Cardboard Labs app.
This jumpyness doesn't only destroy the immersion but also induces a bit of desorientation aswell as nausea when the jumping gets really bad. I had a hard time finishing the Cardboard Labs tests because of this...
Soo last but not least can the headtracking code be optimized for phones without a gyro so that these experiences can be improved? If not on the google side of the SDK, is there anything I can do to the SDK to help minimize this effect?
Ok, so after some testing I seem to have it fixed now.
The reason seems to be that since I have rooted my device and I'm often fiddling with the frequency of the CPU in it the motion tracking somehow gets messed up. This can easily be fixed with a reboot with stock clocks.
I'm not sure if it has to do with the polling of the motion sensor fetching incorrect data when it's reading too fast or if it's the cpu that can't keep up but nevertheless, I seem to be stuck with stock clocks if I'm going to play VR games. I'm leaving this question here for those who might have the same issue.
EDIT: After some more testing the issue reappeared after a while. I'm guessing there is an app or service that might be the problem here because after a restart it's fixed again.. I'll post more when I've tested it further.

Gesture Recognition for my Grandma (Kinect) Linux

I'm looking into making a project with the Kinect to allow my Grandma to control her TV without being daunted by using the remote. So, I've been looking into basic gesture recognition. The aim will be to say turn the volume of the TV up by sending the right IR code to the TV when the program detects that the right hand is being "waved."
The problem is, no matter where I look, I can't seem to find a Linux based tutorial which shows how to do something as a result of a gesture. One other thing to note is that I don't need to have any GUI apart from the debug window as this will slow my program down a fair bit.
Does anybody know of something somewhere which will allow me to in a loop, constantly check for some hand gesture and when it does, I can control something, without the need of any GUI at all, and on Linux? :/
I'm happy to go for any language but my experience revolves around Python and C.
Any help will be accepted with great appreciation.
Thanks in advance
Matt
In principle, this concept is great, but the amount of features a remote offers is going to be hard to replicate using a number of gestures that an older person can memorize. They will probably be even less incentivized to do this (learning new things sucks) if they already have a solution (remote), even though they really love you. I'm just warning you.
I recommend you use OpenNI and NITE. Note that the current version of OpenNI (2) does not have Kinect support. You need to use OpenNI 1.5.4 and look for the SensorKinect093 driver. There should be some gesture code that works for that (googling OpenNI Gesture yields a ton of results). If you're using something that expects OpenNI 2, be warned that you may have to write some glue code.
The basic control set would be Volume +/-, Channel +/-, Power on/off. But that will be frustrating if she wants to go from Channel 03 to 50.
I don't know how low-level you want to go, but a really, REALLY simple gesture recognize could look at horizontal and vertical swipes of the right hand exceeding a velocity threshold (averaged). Be warned: detected skeletons can get really wonky when people are sitting (that's actually a bit of what my PhD is on).

LWJGL starts to run low FPS on Display

I'm having this problem with LWJGL. I have a simple game and all works fine. My main loop is calculating when it should render and update my game. It stays constant 59-60 fps. The problem comes in opengl I guess. After random amounts of time my whole game starts to run at very low fps. My game loop still calculates 60 fps and updates, but what I see on screen doesn't match it. I'm guessing I overload openGL. I'm clearing color buffer bit and depth buffer(though I don't do any depth). Is there anything more I need to clear?
It's king of tough to say what may be wrong with your program without actually looking at the code. Clearing off the screen is one thing but it really shouldn't have the biggest impact so unfortunately I can't really tell you without any additional information.
Possibly it is a problem with slow hardware? This seems like a trivial "I have a slow graphics card" or "I have a lot of things open in the background" kind of problem. Also note that on most laptops if you shake it the hard drive will lock up for a few seconds, causing stuttering.
As Andrew said you can't really pinpoint this sort of problem without code.

libspotify API: play track from a certain time spot?

Is there any way to start playing a track from a certain time spot? I found this old hints & tips, but didn't work when I tried it in libspotify program. Any update on this?
Thanks.
In libSpotify, you need to start playing the track, then immediately seek to the offset you want.

Resources