LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Audio programming (https://www.linuxquestions.org/questions/programming-9/audio-programming-700765/)

hitchhikr 01-29-2009 05:47 AM

Audio programming
 
hi,

I have 3 questions regarding audio programming on Linux:

1. Is there a list of the default codecs installed on a bare bone operating system (with audio support that is), can i expect codecs like mp3, gsm and something similar to truespeech ?
2. How can i access the codecs to encode and decode files ?
3. How can i access attached midi in and out devices (enumerate them and receive/send messages) (i assume it's done with ALSA) ?

Cheers,
f.

SciYro 01-29-2009 08:30 AM

1) No. Some systems, like xine and gstreamer have codec packages, but really, encoding and decoding is usually done by seperate libraries that you can use to use the codec (or, use a library that wraps around multiple audio codec libraries, several exist).

mp3 and other encodings can be worked with by using libraries that implement them. lame is popular mp3 library, for example.

2) Its the same as using any library, since there are no standard codecs. Of the systems that have codec packages, itll vary between them, if its even possible.

3) Yes, ALSA, or use another audio output API. JACK is a good example used in 'professsional' [not for desktop use] audio applications.

hitchhikr 01-29-2009 10:47 AM

I was about to convert a Windows application to Linux but i was hoping that some audio codecs (which are necessary for the app) would be installed along with the operating system like it's the case for Windows and MacOSX but i can go no further without that (installing extra packages isn't an option) :/

Thanks for the fast answer anyway.

SciYro 01-29-2009 01:46 PM

Most distributions do include the necessarily libraries, and in cases like gstreamer, the proper codec packages. In any case, since the 'codecs' are just libraries, depending upon the licesenes of both the libraries and your application (and how you distribute your app possibly), it could be possible to simply statically link against the necessary libraries. Or you could just do it the Windows way: bundle the libraries with your application and use a launcher script that causes the linker to use your bundled libraries over the system ones.


All times are GMT -5. The time now is 06:01 PM.