question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[robovm] Glitchy music

See original GitHub issue

Issue details

I tried to play a couple of tracks and every N seconds I hear glitches. The same glitch I hear when my app crashed while I play music.

In main menu it happens every 2 minutes. In game screen in happens every 6 seconds.

Reproduction steps/code

I use libgdx to play mp3/wav. I tried this implementations: IOSSound IOSAudio

and with both of them I can reproduce this issue

The mp3 to play with: https://drive.google.com/open?id=0B7tY1W3cB0R8d3laTzZadGsxQkE

It happens when GC occur.

[Thread-6] DEBUG red.kometa.quest.player.KRQuestApplicationListener - javaHeap: 15092 kb, nativeHeap: 15092 kb
[Thread-6] DEBUG red.kometa.quest.player.KRQuestApplicationListener - javaHeap: 15716 kb, nativeHeap: 15716 kb
// GLITCH
[Thread-6] DEBUG red.kometa.quest.player.KRQuestApplicationListener - javaHeap: 10764 kb, nativeHeap: 10764 kb
[Thread-6] DEBUG red.kometa.quest.player.KRQuestApplicationListener - javaHeap: 10800 kb, nativeHeap: 10800 kb

Version of LibGDX and/or relevant dependencies

  • libgdx 1.9.5
  • Robovm: 2.3.0
  • XCode: 8.2.1
  • JDK: 1.8

affected platforms

  • iOS (robovm)

Build Targets:

Physical iPhone 5s

duplicated from: robovm issue as related too

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mgsx-devcommented, Feb 28, 2017

@Try4W : Actually it depends on lot of things (VM, GC tuning, device …) and not specifically related to iOS platfform. Full GC CPU consumption may lead to audio glitches and frames dropping but with good memory management you might get rid of it. So when I say not too often I mean almost never (or maybe once per hour but certainly not every few seconds).

As per https://github.com/libgdx/libgdx/wiki/Issue-Tracker, we shouldn’t continue discussion here but use libgdx forum/IRC/Stackoverflow instead since it’s not a LibGDX issue.

1reaction
mgsx-devcommented, Feb 27, 2017

@Try4W : Your problem seams related to wrong usage of java memory in your game specific code (in your screens). LibGDX provides what you need to avoid GC as much as possible (batch, pool, array, …). If you follow libGDX guidelines about GC, you shouldn’t have GC occurring so often (maybe no GC at all in the best case). Memory monitoring would help you to fix memory consumption in your code and then reduce glitches. If you really suspect audio implementation, you’ll have to provide a SSCCE to confirm it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In-App Purchases for iOS using RoboVM and LibGDX? - Reddit
With gdx-pay I have been able to get to the point where everything is setup by following the example here but it has...
Read more >
Untitled
Como instalar soundpools en magix music maker, Miguel malvar contribution! ... Coordinative adjective, Game theory problems and answers, Diomin kristiina?
Read more >
AVPlayer video becomes blank when another audio is active
Accepted answer. After trying to disable Music app MPNowPlayingInfoCenter , I found ... Audio glitch when playing two AVPlayer audio files simultaneously ...
Read more >
Delay When Playing or Skipping Songs - Apple Developer
I get a few seconds delay intermittently when playing or skipping a song (even ones downloaded). This functionality works perfectly in the native...
Read more >
Java libgdx tutorial - Kingsway Tyres
need to download the libgdx (Superjumper) sample game from this git repository. ... This is due to RoboVm's problems with using sounds on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found