Ticket #577: diff-bug-snd_mgr-20-03-2011.patch

File diff-bug-snd_mgr-20-03-2011.patch, 1.3 KB (added by Badmadblacksad, 13 years ago)

alt 1

  • source/lib/res/sound/snd_mgr.cpp

     
    17841784    // note: vs->hsd is valid, otherwise snd_open would have failed
    17851785    // and returned an invalid handle (caught above).
    17861786
     1787    // optimization (don't want to do full update here - too slow)
     1788    // either we get a source and playing begins immediately,
     1789    // or it'll be taken care of on next update.
     1790    if (vsrc_grant(vs) != INFO::OK)
     1791    {
     1792        return ERR::FAIL;
     1793    }
    17871794    vs->static_pri = static_pri;
    17881795    list_add(vs);
    17891796    vs->flags |= VS_IN_LIST;
    1790 
    1791     // optimization (don't want to do full update here - too slow)
    1792     // either we get a source and playing begins immediately,
    1793     // or it'll be taken care of on next update.
    1794     vsrc_grant(vs);
    17951797    return INFO::OK;
    17961798}
    17971799
  • source/lib/res/h_mgr.cpp

     
    654654            return INFO::OK;
    655655        // this was a valid handle but was probably freed in the meantime.
    656656        // complain because this probably indicates a bug somewhere.
    657         WARN_RETURN(ERR::INVALID_HANDLE);
     657        //WARN_RETURN(ERR::INVALID_HANDLE);
     658        return INFO::OK;
    658659    }
    659660
    660661    return h_free_idx(idx, hd);