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
  • 302,178
  • 90
  • 548
  • 690
AsithaL
  • 63
  • 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
  • 9,924
  • 20
  • 79
  • 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,362
  • 12
  • 54
  • 80