During the day I like to listen to various audio streams so I find myself switching back and forth between music and news. Wouldn’t it be nice if you could play streams for a given amount of time? I couldn’t find anything that did it automatically so I wrote this quick Python program to do it (requires pymad):
You can download the latest version here:
http://git.matburt.net/cgi-bin/gitweb.cgi?p=musplice.git;a=snapshot;h=HEAD;sf=tgz
It’s pretty simple and straightforward setup script that installs the module, a musplice bin launcher, and a config file in /etc. The example script plays Groove Salad for an hour and then switches over to WUNC, a public radio station in Raleigh, NC for 15 minutes. You can add as many sections as you want to play different streams at different times. If there is a stream that is a fixed length and you want to play all of it just set it’s time to: all
If /dev/dsp is not your sound device then you should set it in the ‘device’ section. My sound device in OpenBSD is /dev/sound. There is some initial ALSA support that doesn’t play to well if you set the device to: alsa
There is a simple cli interface, that takes a few commands… see the README for more details.
It’s a pretty simple 200 line program that I’ll probably enhance as I see fit since I tend to use it pretty frequently.
I’ve heard that there are some problems on Ubuntu and other distros that have ditched OSS support almost entirely in favor or something like ALSA and or Pulseaudio. I wasn’t able to get OSS set up on Ubuntu but I was able to use the ‘aoss’ to get Alsa OSS Compatibility… this worked well with ‘/dev/dsp’ set in the configuration.