Programatically play a wave file in Linux
Does Linux have a programming API to play a particularly named .wav file ? I know I can call one of the exec functions to run 'aplay somewave.wav', but is there a fairly common library and API which can easily do this also so I do not have to start another process ?
|
in that case you need to start a "music server" or something like that, which will play the wav file for you. But that means you need a process running and listening continuously. mpd is one of them.
(so you will need to start a process anyway) |
on the matter of 'process'. Whenever someone does something, anything it goes through a process in order to accomplish the task.
Process: a series of actions or steps taken in order to achieve a particular end. In the case of Linux/GNU the process gets an ID to keep track of each process that is taking place within itself. Hence the PID. It's inevitable. |
Quote:
|
Quote:
|
Quote:
|
Maybe look at examples from alsa-project
http://www.alsa-project.org/alsa-doc.../examples.html (/test/pcm.c & /test/pcm_min.c) |
Quote:
|
@OP what proggraming language are you using?
|
I think you missed a very important point: there is always an app/process behind every API.
|
All times are GMT -5. The time now is 09:45 AM. |