Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

James Robertson http://www.r0bertson.co.uk

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Play audio with a Ruby shell script

Play an ogg file from the command-line using the program ogg123 from the software package 'vorbis-tools'.

#!/usr/bin/ruby

#file: ogg-play.rb

`ogg123 #{ARGV[0]} > /dev/null 2>&1`



e.g.
wget http://upload.wikimedia.org/wikipedia/en/4/4d/Elo_blue_sky.ogg
./ogg-play.rb Elo_blue_sky.ogg
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS