How to play music in games

Support us on Patreon

Forsen playing Myth of Empires

If you ever played Counter-Strike: Global Offensive, Rust, Crab Game, and related games, you may notice players with music coming from their microphone, how is that done?

Playing music or any kind of audio effect is not hard as it sounds, in most situations you won't need a third-party application besides having your audio drivers updated.

In Windows, you can set your listening audio device as the recording/output device, making all sound you hear on your PC be sent as audio output as if it is coming from your microphone.

Output your input sound

To start playing music or any kind of sound effect through the "microphone" we have to change some Windows settings.

Here I am using Windows 10, but you can do almost the same steps on other versions.

  1. Find the audio icon on your taskbar
  2. Right-click the audio icon and go to Open Sound settings
  3. Scroll down and click on Sound Control Panel
  4. Click on the Recording tab
  5. Right-click on Stereo mix (or similar) and click on Enable

After these simple steps, every sound that you can hear on your computer, including music, effects, and everything else, will be on your audio output.

To play music in any game, just start playing the music on YouTube or any place you want, and press the button to speak in-game.

Remember that everyone can hear the audio coming from your computer! If you need to disable this, simply right-click the same audio device you did before, but disable it instead.

For different Windows versions, the Sound Control Panel may be accessible from a different option, you can try to search it on the Control Panel, or on any option that appears when you right-click the sound icon at your taskbar.

Install your audio driver

If you cannot see the Stereo mix device or a device for input audio on the recordings tab, you may need to install an audio driver.

Before manually trying to install the device driver, try to run a Windows update on your system, that can also solve the problem.

To update the device used for audio on your computer, you will first need to know its name.

  1. Press the Windows Key + R on your keyboard
  2. On the Run window, type dxdiag and press enter
  3. Press Yes if any dialog message appears
  4. Now you will have several (or only one) sound tabs on the top of the diagnostic tool, click on each one of them, and find the one where Default Device equals Yes
  5. Write the name of the device, in my case it is Speakers (Realtek High Definition Audio) at the Sound 3 tab

You will want to search for the name of the device, in my case, I would Google for Realtek High Definition Audio.

The first result has the manufacturer's website, where I can download drivers for the device.

Your goal is to search the device name and find a driver on the manufacturer's website, if you have trouble with that, contact the manufacturer for help.

How to play sound effects with AutoHotkey

Now that you can output your PC audio to everyone playing with you, you can also do hacky tricks to play custom effects at any time you want.

One easy way to use your keyboard as a soundboard, to press any button and play a sound, is to configure AutoHotkey to play sounds.

AutoHotkey is a free and open-source scripting language used to automate all sorts of tasks, you have no limits of what you're able to achieve, and even playing sounds is supported.

Be aware that due to the nature of an automation tool, some anti-cheat software may detect it as a cheat and stop you from launching the game, use it at your own risk.

  1. Go to the AutoHotkey website and download it
  2. Click on Download and download the current version
  3. Follow the default installation steps

After you have AutoHotkey on your computer, it is time to configure the audios you will play.

  1. Right-click on your Desktop, or where you want to create the script and click on New > AutoHotkey Script
  2. Name the script, right-click it, and select Edit Script, it will open Notepad or another text editor with the content of the script
  3. Inside the script, paste the example code available below
  4. Edit LoudSong.mp3 with the name of a file available on the current directory, edit "k" from ^k:: with a keyboard key to press
  5. Save the file
  6. Right-click the script on where you created it, and this time click on Run Script, or simply double-click it
  7. Press CTRL and the key you choose to play the sound, make sure you have the specified sound file on the same directory as the script

This is the example of the AutoHotkey Script used to play sounds

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.; #Warn  ; Enable warnings to assist with detecting common errors.SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
^k::SoundPlay, LoudSong.mp3return
^l::SoundPlay, LoudEffect.mp3return

^ is used to represent the CTRL key, so on the example, the sound LoudSong.mp3 is played when you press CTRL + K and LoudEffect.mp3 is played when you press CTRL + L, you can remove it as you wish.

3 lines are used to set the key, play the sound, and return the script (to prevent further actions), you can easily edit it as you wish.

As this is an example just to show you how to do it, I won't get into details about AutoHotkey, but it's useful software, and I recommend checking the AutoHotkey documentation.

Can you get banned from playing music in games?

Yes, you can get banned from certain games because you played music.

If you get banned or not, it highly depends on which kind of game you are playing and who is with you.

If you're playing a match exclusively with friends, and they all want to hear the music you're playing, you're most likely fine, unless the game has some restriction in that regard, which is not common.

If you play loud music in public matches, and others report you, you can get punished if it is against the rules.

These days most games have a way for a player to mute people who are annoying in voice chat and depending on the game and lobby, you can get away with it if others enjoy what you're playing, but don't try to ruin the game for others if they ask you to stop.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Apex Legends no fix: the SSSE3 CPU Unsupported error

18 funny Skyrim mods to break your game