Subversion Repositories eduke32

Rev

Rev 4982 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4982 Rev 4986
Line 281... Line 281...
281
static int32_t G_CacheSound(uint32_t num)
281
static int32_t G_CacheSound(uint32_t num)
282
{
282
{
283
    int16_t fp = -1;
283
    int16_t fp = -1;
284
    int32_t   l;
284
    int32_t   l;
285
285
286
    if (num >= MAXSOUNDS || ud.config.SoundToggle == 0) return 0;
286
    if (num >= MAXSOUNDS || !ud.config.SoundToggle) return 0;
287
    if (ud.config.FXDevice < 0) return 0;
-
 
288
287
289
    if (EDUKE32_PREDICT_FALSE(!g_sounds[num].filename)) return 0;
288
    if (EDUKE32_PREDICT_FALSE(!g_sounds[num].filename)) return 0;
290
289
291
#if defined HAVE_FLAC || defined HAVE_VORBIS
290
#if defined HAVE_FLAC || defined HAVE_VORBIS
292
    fp = S_UpgradeFormat(g_sounds[num].filename, g_loadFromGroupOnly);
291
    fp = S_UpgradeFormat(g_sounds[num].filename, g_loadFromGroupOnly);
Line 314... Line 313...
314
    return 1;
313
    return 1;
315
}
314
}
316
315
317
static void G_PrecacheSounds(void)
316
static void G_PrecacheSounds(void)
318
{
317
{
319
    int32_t i, j;
318
    int32_t i, j = 0;
320
-
 
321
    if (ud.config.FXDevice < 0) return;
-
 
322
    j = 0;
-
 
323
319
324
    for (i=MAXSOUNDS-1; i>=0; i--)
320
    for (i=MAXSOUNDS-1; i>=0; i--)
325
        if (g_sounds[i].ptr == 0)
321
        if (g_sounds[i].ptr == 0)
326
        {
322
        {
327
            j++;
323
            j++;
Line 1342... Line 1338...
1342
    DukePlayer_t *p = g_player[0].ps;
1338
    DukePlayer_t *p = g_player[0].ps;
1343
    int32_t i;
1339
    int32_t i;
1344
1340
1345
    G_HandleAsync();
1341
    G_HandleAsync();
1346
1342
1347
    if (g_skillSoundVoice >= 0 && ud.config.FXDevice >= 0 && ud.config.SoundToggle)
1343
    if (g_skillSoundVoice >= 0 && ud.config.SoundToggle)
1348
    {
1344
    {
1349
        while (FX_SoundActive(g_skillSoundVoice))
1345
        while (FX_SoundActive(g_skillSoundVoice))
1350
            G_HandleAsync();
1346
            G_HandleAsync();
1351
    }
1347
    }
1352
1348