| 1776 | }; |
| 1777 | |
| 1778 | void |
| 1779 | activate_chosen_soundlib(void) |
| 1780 | { |
| 1781 | int idx = gc.chosen_soundlib; |
| 1782 | |
| 1783 | if (!IndexOk(idx, soundlib_choices)) |
| 1784 | panic("activate_chosen_soundlib: invalid soundlib (%d)", idx); |
| 1785 | |
| 1786 | if (ga.active_soundlib != soundlib_nosound || idx != soundlib_nosound) { |
| 1787 | if (soundprocs.sound_exit_nhsound) |
| 1788 | (*soundprocs.sound_exit_nhsound)("assigning a new sound library"); |
| 1789 | } |
| 1790 | soundprocs = *soundlib_choices[idx].sndprocs; |
| 1791 | if (soundprocs.sound_init_nhsound) |
| 1792 | (*soundprocs.sound_init_nhsound)(); |
| 1793 | ga.active_soundlib = soundprocs.soundlib_id; |
| 1794 | gc.chosen_soundlib = ga.active_soundlib; |
| 1795 | } |
| 1796 | |
| 1797 | void |
| 1798 | assign_soundlib(int idx) |
no test coverage detected