File: gnome-sound.rb

package info (click to toggle)
ruby-gnome2 0.15.0-1.1etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,704 kB
  • ctags: 8,558
  • sloc: ansic: 69,912; ruby: 19,511; makefile: 97; xml: 35; sql: 13
file content (21 lines) | stat: -rw-r--r-- 398 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
=begin
  gnome-sound.rb - a sample script for Gnome::Sound.

  Copyright (C) 2005 Masao Mutoh
  This program is licenced under the same licence as Ruby-GNOME2.

  $Id: gnome-sound.rb,v 1.1 2005/09/24 18:02:43 mutoh Exp $
=end

require 'gnome2'

unless ARGV[0]
  puts "USAGE: ruby gnome-sound.rb foo.wav"
  exit
end

Gnome::Sound.init("localhost")

Gnome::Sound.play(ARGV[0])

Gnome::Sound.shutdown