LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-29-2009, 05:47 AM   #1
hitchhikr
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
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.
 
Old 01-29-2009, 08:30 AM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
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.
 
Old 01-29-2009, 10:47 AM   #3
hitchhikr
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Original Poster
Rep: Reputation: 0
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.
 
Old 01-29-2009, 01:46 PM   #4
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Audio Programming Advice Wanted eQuinas Programming 1 12-14-2007 01:41 PM
portable audio programming PatrickNew Programming 3 07-16-2007 10:42 PM
Question Abt Audio Programming sibtay Programming 1 10-11-2004 12:56 PM
OSS Audio Programming jinksys Programming 0 10-11-2003 03:17 AM
kernel audio programming ksnash Programming 0 08-04-2003 10:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration