Valve MP3 Player

From Valve Developer Community
Jump to: navigation, search
English (en)Español (es)Русский (ru)Translate (Translate)
The player interface.

The Valve MP3 Player is an in-game player of MPEG Layer III audio files. It is only available in mods with new client DLL that have edited "mp3_player.cpp/h".

The player can be activated using the mp3 console command. It is able to access music files of installed Source games as well as those stored on an external file system (e.g. on a hard disk or CD).

Currently, it has a built-in volume control with a (non-functional) Mute button, Shuffle mode, reading of ID3 tags as well as a (currently not implemented) seeking bar.

Note from DrN0

To activate the MP3 player in your mod of course you'll have to add the .res files for the MP3 player into your folder. You'll need mp3player.cpp, mp3player_db.txt, mp3player_english.txt, mp3settings.txt in the resource folder. In the src folder of your mod using your SDK editing solution, you should find mp3player.cpp and .h in the folder mp3. Open the mp3player.cpp and change the top line from a 0 to a 1.

  1. If 0, change to a 1
  2. include "mp3player.h"
  3. include "KeyValues.h"
  4. include "filesystem.h"