decrease volume until 0 with each call, and then stops music
| 525 | |
| 526 | //decrease volume until 0 with each call, and then stops music |
| 527 | void fade_volume_if_need() |
| 528 | { |
| 529 | if (!adl_gv_want_fade) return; |
| 530 | if (--adl_gv_tmp_music_volume == 0) |
| 531 | { |
| 532 | func_mute(); |
| 533 | adl_gv_want_fade = false; |
| 534 | adl_gv_tmp_music_volume = adl_gv_master_music_volume; |
| 535 | return; |
| 536 | } |
| 537 | for (int i=0; i<12; ++i) |
| 538 | { |
| 539 | adlib_set_amplitude(i, (adlib_channels[i].cur_volume*adl_gv_tmp_music_volume)>>7); |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | // checks if there are unused adlib channels |
| 544 | bool free_channel_available() |
no test coverage detected