/usr/share/doc/ruby-sdl/examples/playwave.rb is in ruby-sdl 2.1.2-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # This sample needs a wave file `sample.wav', please prepare.
require 'sdl'
SDL::init(SDL::INIT_AUDIO)
SDL::Mixer.open(22050, SDL::Mixer::DEFAULT_FORMAT, 2, 512)
wave = SDL::Mixer::Wave.load("sample.wav")
SDL::Mixer.play_channel(0, wave, 0)
while SDL::Mixer.play?(0)
sleep 1
end
|