How to play a wav file from a Free Pascal application running on Linux?

I have a multi-platform application written in Free Pascal. This application plays a short sound at some event. On Windows, I can do this using MMSystem and sndPlaySound ("sound.wav"). However, I do not know how to do this on Linux without external libraries.

I have a decision to play with SDL and OpenAL, but I do not want any dependency on these libraries to produce one short sound. Is there a Linux command line player that is used by default for most distributions? The file format does not matter; I will transform it.

+4
source share
3 answers

mplayer is a command line and graphic. you can run it on tty and pty.

+2
source

You can try aplay, but it depends on ALSA. Maybe sox?

+1
source

The mplayer - "the movie player" program provides you with the ability to use the graphical user interface or use the console. Therefore, I would suggest that he has a solution to your problem.

0
source

All Articles