AVAudioPlayer muffling sounds.

Discussion in 'iPhone/iPad Programming' started by counciler, Feb 6, 2012.

  1. macrumors newbie

    Joined:
    Jan 8, 2011
    #1
    Well, I'm trying to make a timer with a custom tick. I was having problems with the timing, but managed to solve that. Now I have a problem with the audio ticking fine for a while, then it'll muffle out one of the ticks. It'll do this several times throughout the duration of the timer. Is there a cause for this that could be explained without the need for code?
     
  2. macrumors regular

    Joined:
    Sep 16, 2011
    #2
    What do you mean by "audio ticking" ?

    Are you playing short, non-repeating sounds or long, continuous sounds, like music?
     
  3. counciler, Feb 7, 2012
    Last edited: Feb 7, 2012

    thread starter macrumors newbie

    Joined:
    Jan 8, 2011
    #3
    I'm playing 2 short ticks per second. The ticks are about .25 seconds long. They repeat in the sense that I make them repeat by playing them again when they're finished playing. But I don't set it to repeat.
     
  4. macrumors regular

    Joined:
    Sep 16, 2011
    #4
    How are you drawing your view? Are you using CALayer shadows?

    Layer shadows is a real performance killer. It will kill animations, and I also believe it
    will kill sound too, at random, unexpected times.

    If not shadows, then I would begin by stripping away all graphical elements, to see if
    that helps your audio problem.
     
  5. thread starter macrumors newbie

    Joined:
    Jan 8, 2011
    #5
    I only have a few UI elements. It's not a very complex program, it's just a timer. If the phone can't handle a few graphics and a few sounds then there's some serious issues. But I'm tired of AVAudioPlayer. It's a crap class who's only purpose serves as perhaps playing a simple loop or maybe a song. I'm going with OpenAL.
     

Share This Page