There’s very little reason to call something like this directly nowadays. Usually, applications should use something like xdg-open(1) or see(1) (as an alias to run-mailcap(1)) to open and play arbitrary files. For internal playing of sounds, I would suggest some multimedia framework.