Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

mp3 player in C

  • 02-10-2012 3:21pm
    #1
    Registered Users, Registered Users 2 Posts: 3


    Ima n00b in C but i want to program a chip to read mp3 and then play it but.... i need to make the program in C so does any1 know how to make it (tutorial,source code or documentation please)

    and i REALLY has to be in C not c++ or c# or any other language (so i can make a static library)

    thx :D


Comments

  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    http://stackoverflow.com/questions/428884/how-to-play-mp3-files-in-c

    Easy way: Use a library (fmod is used in link above)
    Hard way: Write your own decoder (here be dragons etc)

    Most modern devices like smartphones etc have special hardware onboard to perform the decoding, so there would be a system call to make use of this. Doing it via CPU would use a lot more power on a phone. PC is so powerful that decoding is no big deal tho.

    Oh, you can write static libraries in C++ btw (and mix it with C). So that isn't a valid reason for choosing only C. If you are limited to C because it's an embedded platform with limited toolchain then that would be a more valid reason.


  • Registered Users, Registered Users 2 Posts: 3 yugic


    Thx alot :D

    but how do i compile static librarys in C++ O.o


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    With some kind of compiler option.... It depends what compiler you use. Here is how to do it for gcc: http://www.adp-gmbh.ch/cpp/gcc/create_lib.html


  • Registered Users, Registered Users 2 Posts: 3 yugic


    Thx a lot :D


Advertisement