openalbridge/wrappers.c
changeset 2515 51d3f4b6293a
parent 2494 1e10a47cabea
child 2529 51e5df1c8462
equal deleted inserted replaced
2514:df9d0728c5bb 2515:51d3f4b6293a
    91                 err_msg("(%s) INFO - Fade-in in progress [index %d quantity %d]", prog, index, quantity);
    91                 err_msg("(%s) INFO - Fade-in in progress [index %d quantity %d]", prog, index, quantity);
    92 #endif
    92 #endif
    93                 
    93                 
    94                 /*save the volume desired after the fade*/
    94                 /*save the volume desired after the fade*/
    95                 alGetSourcef(Sources[index], AL_GAIN, &target_gain);
    95                 alGetSourcef(Sources[index], AL_GAIN, &target_gain);
    96                 if (target_gain > 1.0f || target_gain <= 0.0f)
    96                 if (target_gain > 1.0f || target_gain < 0.0f)
    97                         target_gain = 1.0f;
    97                         target_gain = 1.0f;
    98                 
    98                 
    99                 alSourcePlay(Sources[index]);
    99                 alSourcePlay(Sources[index]);
   100                 
   100                 
   101                 for (gain = 0.0f ; gain <= target_gain; gain += (float) quantity/10000) {
   101                 for (gain = 0.0f ; gain <= target_gain; gain += (float) quantity/10000) {