Hi,
Are there are any header files to be included to play audio file using C language.
Hi,
Are there are any header files to be included to play audio file using C language.
It depends on which platform you are going to play sound and what format you are playing. On GNU/Linux, you have various options like ALSA, Jack, PulseAudio and so on. On Windows, there may be win32 APIs to play audio.
If you have a simple raw samples, on GNU/Linux, you can "cat" the file to the audio device as well.
There are also platform independent APIs available which lets you use one single API and recompile the application on any platform.
As RageZ suggested SDL is a nice crossplatform library. You can get more information from http://www.libsdl.org/
On Mac OS X, the native audio API is CoreAudio. Apple provides some pretty good documentation for it on their site. It provides format converters for several common file formats too.
As mentioned above, you can also use SDL—SDL has the advantage of being more portable. CoreAudio is specific to Mac OS X.