ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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) ?
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.
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) :/
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.