/* call-seq: * #mix_channels = num_channels * * **NOTE:** This method is DEPRECATED and will be removed in * Rubygame 3.0. Please use the Rubygame::Sound class instead. * * Set the number of mixer channels, allocating or deallocating channels as * needed. This can be called many times, even during audio playback. If this * call reduces the number of channels allocated, the excess channels will * be stopped automatically. See also #mix_channels() * * Returns the number of mixing channels allocated. * * Note that 8 mixing channels are allocated when #open_audio() is called. * This method only needs to be called if you want a different number (either * greater or fewer) of mixing channels. * * This method takes this argument: * num_channels:: desired number of mixing channels, an integer. * Negative values will cause this method to behave as * #mix_channels(), returning the number of channels currently * allocated, without changing it. */ VALUE rbgm_mixer_setmixchans(VALUE module, VALUE channelsv) { /* This feature will be removed in Rubygame 3.0. */ rg_deprecated("Rubygame::Mixer", "3.0"); int desired; int allocated; desired = NUM2INT(channelsv); allocated = Mix_AllocateChannels(desired); return INT2NUM(allocated); }