package play
import "fmt"
type Player interface {
Play(source string, name string)
}
var p Player
func PlayAll(source, mytype, name string) {
switch mytype {
case "MP3":
p = &MP3Player{}
case "WAV":
p = &WAVPlayer{}
default:
fmt.Println("UnSported music type", mytype)
return
}
p.Play(source, name)
}