×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    32

    Question hickups when app is in background

    Hi,

    I've developed a streaming audio application, and when it is running in the background, it produces hick-ups every 10-11 seconds. I've already tried to find out if it has to deal with fetching data from the network or with decoding the data, but nothing points me in that direction. When it is running in the foreground, it works all well.

    Does somebody know how to fix this?
    Has this something to do with task-priorities?
    Thanks a lot!

    Harreld Kuiper

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166
    have you tried to increase the process & Thread priorities ?

    yucca

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    32
    Hi Yucca,

    I played with the active-object-priorities, but that does not help...:-(
    I'm running it all in one thread with some active-objects.
    Is there a way to increase the process and thread priorities then, besides the active-object-priorities?
    Or should I use another approach?
    Thanx,

    Harreld.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166
    try this (code from OggPlay):

    /*
    -----------------------------------------------------------------------------
    -----------------------------------------------------------------------------
    */
    void SetProcessPriority()
    {
    #if !defined(__WINS__) //FIXFIXME
    CEikonEnv::Static()->WsSession().ComputeMode(RWsSession::EPriorityControlDisabled);
    RProcess P;
    TFindProcess fp(_L("MyAppName*"));
    TFullName fn;
    if (fp.Next(fn)==KErrNone)
    {
    if (P.Open(fn) == KErrNone)
    {
    P.SetPriority(EPriorityHigh);
    P.Close();
    }
    }
    #endif
    }
    /*
    -----------------------------------------------------------------------------
    -----------------------------------------------------------------------------
    */
    void SetThreadPriority()
    {
    #if !defined(__WINS__) //FIXFIXME
    //CEikonEnv::Static()->WsSession().ComputeMode(RWsSession::EPriorityControlDisabled);
    RThread T;
    TFindThread ft(_L("MyAppName*"));
    TFullName fn;
    if (ft.Next(fn)==KErrNone)
    {
    if (T.Open(fn) == KErrNone)
    {
    T.SetPriority(EPriorityAbsoluteHigh);
    T.Close();
    }
    }

    #endif
    }

    yucca

  5. #5
    Registered User
    Join Date
    Apr 2005
    Posts
    32

    Re: hickups when app is in background

    Hi Yucca,

    Thanks!
    It seems to work, no hickups anymore in the background :-)
    I can't use the prio's of Oggplay because then my app does not start anymore, but a bit less works also well.
    Only navigating in the menu of the application does still cause some hicks, do you have thare also a solution for?
    Thanks in advance and best regards,

    Harreld.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×