* Plays the contained music track. * @param loop Amount of times to loop the track. -1 = infinite */
| 118 | * @param loop Amount of times to loop the track. -1 = infinite |
| 119 | */ |
| 120 | void AdlibMusic::play(int loop) const |
| 121 | { |
| 122 | #ifndef __NO_MUSIC |
| 123 | if (!Options::mute) |
| 124 | { |
| 125 | stop(); |
| 126 | func_setup_music((unsigned char*)_data, _size); |
| 127 | func_set_music_volume(127 * _volume); |
| 128 | Mix_HookMusic(player, (void*)this); |
| 129 | } |
| 130 | #endif |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * Custom audio player. |
no test coverage detected