LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 07-04-2007, 04:16 PM   #1
thethinker
Member
 
Registered: Jul 2006
Location: Peabody, MA, USA
Distribution: Xubuntu, Slackware, Pop!_OS
Posts: 297
Blog Entries: 2

Rep: Reputation: 37
Playing .mp3 files with C code


Hey everyone,
As a pet project I decided I wanted to try to write a program to play sound files. At the moment it basically works like aplay (I'm using ALSA utilities), and only plays .wav files. I'd like to make it able to play mp3s, so how do I go about doing that? I suppose I need some kind of decoder, preferably one that works on-the-fly (like converting .mp3 data from a stream into .wav or something). I guess it's pretty obvious that I don't really know what I'm talking about, but if anyone has any advice that'd be great.

Thanks!

(PS Been reading about Ogg as well, which I would could use instead of mp3...so also if anyone can suggest how to do the above in ogg format that'd be cool too :-))
 
Old 07-04-2007, 04:39 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

I'd probably start by looking at the source from, say, mpg123:
http://www.mpg123.de/

Dave
 
  


Reply



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
Problems playing mp3 files hexadecimal0f SUSE / openSUSE 11 06-09-2006 04:38 PM
Playing MP3 files tiredoflogins Linux - Newbie 2 10-02-2004 03:12 PM
Playing Mp3 files in RH9 Adam555 Linux - Newbie 7 05-06-2004 01:23 PM
playing mp3 files in Knoppix luminiscent Linux - Newbie 3 04-22-2004 09:42 PM
Playing remote MP3 files rsanfelice Linux - Software 4 04-20-2004 11:02 AM

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

All times are GMT -5. The time now is 06:29 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