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'.

   1  
   2  #!/usr/bin/ruby
   3  
   4  #file: ogg-play.rb
   5  
   6  `ogg123 #{ARGV[0]} > /dev/null 2>&1`
   7  


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