Valve MP3 Player: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(So... they added a hidden MP3 player. How thoughtful.)
 
m (Fix grammatical issues)
 
(22 intermediate revisions by 13 users not shown)
Line 1: Line 1:
[[Image:Valvemp3player.png|thumb|The player interface.]]
{{LanguageBar}}
The '''Valve MP3 Player''' is an in-game player of MPEG Layer III audio files. Currently, it is only available via console in [[Counter-Strike: Source]].


The player can be activated using the <code>mp3</code> [[Developer Console|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).
[[File:Valvemp3player.png|thumb|The player interface.]]
The '''Valve MP3 Player''' is an in-game player of [[MP3|MPEG Layer III]] audio files. It is only available in mods with new client DLL that have edited "mp3_player.cpp/h".


Currently, it sports 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.
The player can be activated using the {{command|mp3}} [[Developer Console|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).


[[Category:Console Commands|mp3]]
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.
[[Category:Programming]]
[[Category:Valve]]
 
==Note from DrN0==
To activate the MP3 player in your mod of course you'll have to add the <code>.res</code> files for the MP3 player into your folder. You'll need <code>mp3player.cpp</code>, <code>mp3player_db.txt</code>, <code>mp3player_english.txt</code>, <code>mp3settings.txt</code> in the resource folder. In the <code>src</code> folder of your mod using your SDK editing solution, you should find <code>mp3player.cpp</code> and <code>.h</code> in the folder <code>mp3</code>. Open the <code>mp3player.cpp</code> and change the top line from a <code>0</code> to a <code>1</code>.
#If 0, change to a 1
#include "mp3player.h"
#include "KeyValues.h"
#include "filesystem.h"

Latest revision as of 00:32, 4 September 2024

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"