5

I'm looking for the easiest way to play an MP3 file in C++. Either a library I could use and just call the function, given the filename, or alternatively something someone has already written that will just run and quit.

wim
  • 338,267
  • 99
  • 616
  • 750
AsithaL
  • 59
  • 1
  • 1
  • 8

2 Answers2

4

What platform are you on? You can check these out:

In case of windows/linux:
FMOD

In case you are programming only on windows/mac osx:
BASS

I would also look for some native APIs in Windows (if you are developing on that platform).
HTH,
Sriram

Sriram
  • 10,298
  • 21
  • 83
  • 136
3

Qt comes to the rescue (again). The documentation even comes with demo code on how to implement a media player. It can play videos as well, btw.

http://doc.qt.nokia.com/latest/demos-qmediaplayer.html

Works on all platform and with the same syntax = WIN.

Dat Chu
  • 10,822
  • 13
  • 58
  • 82