#!/bin/csh

switch ($1)
	
	case play:
		mpg123 -q -s "$2"
		exit 0
	breaksw
	
	case isOurFile:
		if ( { ( cat "$2" | file - | grep -q "MPEG audio stream" ) } ) then
			exit 0
		else
			exit -1
		endif
	breaksw
	
endsw

exit -1
