File: playmod.rb

package info (click to toggle)
ruby-sdl 2.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,344 kB
  • ctags: 4,200
  • sloc: cpp: 7,598; ansic: 4,475; ruby: 2,258; sh: 102; makefile: 97
file content (13 lines) | stat: -rw-r--r-- 232 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
# This sample needs a mod file `sample.it'.
#
require 'sdl'
SDL::init(SDL::INIT_AUDIO)

SDL::Mixer.open(22050)
music = SDL::Mixer::Music.load("sample.it")

SDL::Mixer.play_music(music,0)

while SDL::Mixer::play_music?
  sleep 1
end