Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Gideros Player (2015.04.08) Not Functioning — Gideros Forum

Gideros Player (2015.04.08) Not Functioning

antixantix Member
edited April 2015 in Bugs and issues
I have 2 devices, a Nexus4 phone (android 5.0.1), and a Nexus7 tablet (android 5.1)

I have only been testing device playback on my Nexus7. Until today things were going fine and then when I added music I noticed that the music would play once, but not repeat. I thought this was odd because in the local player the music does repeat.

So I updated (dunno what I was using) to Gideros 2015.04.08 and now things have turned to total custard!

When the player starts on the Nexus7 the screen is white, there is no information on the ip, version, or anything else. When the app plays the display turns black and there are no graphics. I know the app is running because the music plays, but of course it does not repeat!

So, I installed the player on my Nexus4 and tested with that. The graphic issues are exactly the same, no damn grahics. However the music does repeat on the Nexus4.

I am totally confused and mildly annoyed because now I cannot test my app on either device. I am more annoyed because the app requires multi-touch which I can't do in the local simulator.

Can anyone assist me in getting the player to again work on my devices? And also I need some help with getting the music to repeat on the Nexus7.

are there some specific settings I need to change somewhere?
«1

Comments

  • SinisterSoftSinisterSoft Maintainer
    edited April 2015
    No, it's a bug.

    @ar2rsawseen has the fix and should (hopefully) be making a new version tomorrow (Sunday).

    The simulator does multi-touch btw, I've tested it on two Windows multitouch screens. :)

    Use something like this type of routine to play the music with repeat (on some tablet/tune combinations the repeat flag doesn't work).

    music=Sound.new("themetune.mp3")
    function restartMusic()
    playingMusic:removeEventListener(Event.COMPLETE,restartMusic)
    playingMusic=music:play()
    if playingMusic then
    playingMusic:addEventListener(Event.COMPLETE,restartMusic)
    end
    end
    playingMusic=music:play()
    if playingMusic then
    playingMusic:addEventListener(Event.COMPLETE,restartMusic)
    end

    Likes: antix, Zizanyman

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+2 / -0 )Share on Facebook
  • antixantix Member
    @SinisterSoft, nice, thanks. I'll look forward to that fix,

    I still have the issue where there are no graphics on my devices :(
  • That was the fix i'm referring to. :)

    Likes: antix

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    @Sinistersoft, Ahh heheh :)

    Damn, now I'll have to kludge in that music code for now I suppose. Will that be resolved in an upcomming patch too?
  • antixantix Member
    Oh my. I just exported from Gideros Studio, compiled my app in Android Studio, and that doesn't work on either device too. I thought the issue was just with Gideros Player but it seems universal :(

    Oh well I suppose I can do some gardening today instead of programming :)
  • hgy29hgy29 Maintainer
    @antix, if you really need to, version 2015.04.04 should still work, bug was introduced in 04.08. Sorry for that the bug is mine :( BTW, gardening is better I think ;)

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • @antix - the music bug - I think has something to do with the 'built-in' check for the end of the song being missed. Maybe the routine is looking for something like:

    if position==endOfSongPosition then
    position=startPosition
    end

    But in C of course!

    When maybe the position pointer sometimes stops just after or just before the end of the song, so maybe that code could be changed to:

    if position>=endOfSongPosition-1 then
    position=startPosition
    end

    You see?

    Something is odd or different somewhere though because the COMPLETE event fires!

    Maybe you should joing GitHub and mark it as a bug ?

    Likes: antix

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    @SinisterSoff I should join github soon. I have many suggestions for Gideros too. I see what you mean re the music playback, I will experiment once everything is working again in my devices.

    @hgy29 Heheh, no worries. I will downgrade tomorrow and see what happens. The weather was not good for gardening today so I spent a lot of time optimizing my texture atlas and writing down ideas for future games :)

    Likes: hgy29

    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    Gideros Update 2015.04.12 has resolved my issues with device playback :)

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • The audio was fixed? I'd still use the routine if I was you... ;)
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • antixantix Member
    @SinisterSoft -oops, no the audio issue is not solved. I meant to say that my apps are now visible on my devices, both through the player and compiled with Android Studio.
  • @antix you should try the LuaJIT patch, it gives a nice speed improvement.

    Likes: antix

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    @SinisterSoft - What is that and how exactly does it work? Does it replace the Gideros Player or something?
  • No, it replaced the Lua engine in the player (and 'runtime' if exported).

    Here is some benchmarks for standard Lua vs LuaJIT

    http://luajit.org/performance_arm.html
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • antixantix Member
    Ahh, yep I found your other post so will try it soo n ☺

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    Can anyone help me with the music? I have used your code in my class SinisterSoft but whenever it gets to restarting the music I get an error "attempting to access playingMusic a nil value.. I don't get what is happening. Here is my code..

    Music = Core.class()

    function Music:restartMusic()
    self.playingMusic:removeEventListener(Event.COMPLETE,self.restartMusic)
    self.playingMusic = self.optionsTheme:play()
    if self.playingMusic then
    self.playingMusic:addEventListener(Event.COMPLETE,self.restartMusic)
    end
    end

    function Music:init()
    self.startTheme = Sound.new("sounds/start.mp3")
    self.optionsTheme = Sound.new("sounds/options.mp3")
    self.highscoreTheme = Sound.new("sounds/highscore.mp3")
    self.gameTheme = Sound.new("sounds/game.mp3")
    end

    function Music:on(theme)
    if not self.playingMusic then
    if theme == "start" then
    self.playingMusic = self.startTheme:play(0)
    self.playingMusic:setVolume(0.5)
    elseif theme == "options" then
    self.playingMusic = optionsTheme:play(0)
    self.playingMusic:setVolume(0.5)
    elseif theme == "game" then
    self.playingMusic = self.gameTheme:play(0)
    self.playingMusic:setVolume(0.10)
    elseif theme == "highscore" then
    self.playingMusic = self.highscoreTheme:play(0)
    self.playingMusic:setVolume(0.5)
    end
    self.playingMusic:addEventListener(Event.COMPLETE,self.restartMusic)
    end
    end

    function Music:off()
    if self.playingMusic then
    self.playingMusic:stop()
    self.playingMusic = nil
    end
    end
  • ar2rsawseenar2rsawseen Maintainer
    Hello, you get playingMusic a nil value, because your device ran out of channels to play simultaneous music files.

    Maybe that is why it is also not looping the standard way.

    What type of file are you using?
    How many files are you playing?
  • SinisterSoftSinisterSoft Maintainer
    edited April 2015
    @ar2rsawseen - how many sound channels should be available - I remember (a long time ago) running out of channels pretty early.

    Once a sound has completed playing or stopped - isn't it's sound channel automatically free?

    @antix maybe when you call Music:off() and set self.playingMusic to nil then completed event still fires afterwards? If it does then self.playingMusic would be nil at that point?

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • ar2rsawseenar2rsawseen Maintainer
    I think 16 or 32, depending on device and yes they should be freed, but there could always be a bug :)
  • 32 would be best (if it's not set to that already)....

    Also the latency is pretty big. Was there talk once of moving to another lib on Android with a lot less latency?
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • ar2rsawseenar2rsawseen Maintainer
    @SinisterSoft yes but it was a paid license software, and the agreement was a revenue share, so now it is not an option.
  • ahh, I see.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Does the Android version use OpenAL - would OpenSL ES be a better fit?
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • antixantix Member
    edited April 2015
    @ar2rsawseen - Thanks. I have only the 4 listed in my code, and one sound effect that is used during the game. My code is based on your music code from your book (which I enjoyed a lot, thanks). So as far as I know, I am only using one channel at any time because when Music:off is called, the channel is released right?

    @SinisterSoft - Yep maybe that could happen but I am not calling Music:off at all with my tests. The app loads, and starts the options music, then it tries to restart the options music once it ends and gets the nil error.

    Since (I think) I'm only ever using one channel I can't see how it becomes nil :(

    Unless.. whenever Sound.new is called it is allocating a channel?
  • Sound.new shouldn't be allocating a channel - it should just load the sound.

    loadedDound:play() -- that should be allocating the channel

    Likes: antix

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    @SinisterSoft - Okay thanks for clearing that up. It still doesn't explain why the error with the nil value is happening, especially since I hsave only one channel allocated.
  • ar2rsawseenar2rsawseen Maintainer
    Funny that I did not seem to experience that the built in looping does not work

    If you check the same game from the book - Mashballs

    Does it happen on your device that the music looping stops?
  • antixantix Member
    Right now I'm thinking that this must be some issue with the Google Nexus 7. On my Nexus 4 the code works just fine, but on the Nexus 7, it crashes with the "a nil value" error.
  • antixantix Member
    @ar2rsawseen - Good idea. I tested the MashBalls Clone and on the Nexus 7 the mp3 plays only once then stops. It does not crash with any "nil value" error however.

    On the Nexus 4 it works without any issues.

    I am feeling more and more that this is an issue with the Nexus 7?
Sign In or Register to comment.