Jump to content
  • Advertisement

EasyCoder

Member
  • Content count

    53
  • Joined

  • Last visited

Community Reputation

116 Neutral

About EasyCoder

  • Rank
    Member
  1. I have spent on this problem now over a week, took the whole class apart, modified, changed parameters, removed bits which I thought could cause the problem... No improvement. Re-sampled all sounds to the lowest sampling rate possible... No improvement either.   I am getting really fed up with this problem and starting to think I might dump the whole unreliable SoundPool and replace it with some other way of playing sounds...   Does anybody have any suggestions as to what is the best and most reliable way of playing sounds in Android? (not music - short sound effects).
  2.   It happens immediately after start of the app, when I attempt to play the first sound.
  3. In my Android game, I am playing short sound effects using AudioManager and SoundPool.   While this works fine on Samsung Galaxy Tab 10.1, when I ported the game to Samsung Galaxy SIII, I am experiencing strange lock-ups of the screen and crashes of the application with re-booting of the phone, when I am trying to play the sound from the SoundPool.   It behaves quite erratically and one of 4 things happen (in no particular order):   (1) Application starts as normal and all sounds play normally.   (2) Application crashes completely and mobile reboots.   (3) Application freezes shortly (3-5 seconds) upon trying to play the sound, then continues normally, but sounds don't work.   (4) Application starts as normal, but none of the sounds plays. *   * There is a strange twist to the 4th case. None of the sounds plays, but when I activate game background music (which plays via MediaPlayer, not via AudioManager/SoundPool) this somehow 'flushes down' the stuck sound effects which should play at the beginning of the game, and now they all catch-up and play at once. This 'flushing down' somehow returns everything back to normal and from this point on all the sound effects from the SoundPool play normally, as they should.   The error which I am getting is:   AudioTrack: obtainBuffer timed out (is the CPU pegged?) "CPU pegged" what the hell does it even mean ???   Note that the problems happen at the point in the game when I am attempting to play the sounds from the soundpool by SoundPool.play, not when I am loading them by SoundPool.load.   I tried just about everything and now I am at the end of my wits. Did anybody have the same problem? Any help is highly appreciated.    
  4. EasyCoder

    glRotatef behaves strange

    Cool - so then this topic can be closed
  5. EasyCoder

    glRotatef behaves strange

    Yes, your explanation makes perfect sense to me. And gluOrtho2D works like a charm ! Now all 15 objects rotate exactly at the same angle. Thanks for your help & suggestion. Only one more question: can you swap back and forth between gluOrtho2D and gluPerspective within the onDrawFrame ? This is for a game which I am developing, and the engine is already finished and working fine in gluPerspective, so I am not very keen to change it to gluOrtho2D. I just want to do that rotation effect in gluOrtho2D, then get rid of the objects and swap back to gluPerspective. Is this possible ?
  6. EasyCoder

    glRotatef behaves strange

    I see. Is there any way to change the perspective, so they all appear the same ?
  7. EasyCoder

    glRotatef behaves strange

    [attachment=10267:glRotatef-y.jpg] So this is how it looks like, when I use the above code. I am using GL_MODELVIEW in glMatrixMode and fovy (field of view angle in y direction) in gluPerspective is set to 45.0f. Could it have anything to do with fovy, as it is also in y direction ?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!