Using custom sounds in CS:GO

Please post any questions about developing your plugin here. Please use the search function before posting!
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Using custom sounds in CS:GO

Postby decompile » Tue Aug 09, 2016 1:05 pm

Hey Guys,

Im currently trying to make my CS:S plugin work with CS:GO.

On CS:S im using sounds which are from hl2 eg. bot or ambient sounds. Sadly I found out that 2 are not in cs:go so I copied them from the vpk's and put them into the csgo/sound/ dic. and when I try to play them easily via Sound("sound_name.mp3").play(index) it gives me a red console error "Failed to create sound, cant create mixer".
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Re: Using custom sounds in CS:GO

Postby iPlayer » Tue Aug 09, 2016 6:46 pm

Try using StreamSound class.
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image
kalle
Junior Member
Posts: 26
Joined: Sun Jun 26, 2016 9:48 am
Contact:

Re: Using custom sounds in CS:GO

Postby kalle » Tue Aug 09, 2016 6:49 pm

Sadly I had the same problems. I just figured out that .wav files are bad for csgo. But you're using .mp3 files. Do they have some different codec options? You can have a look at that with vlc or other players.

I recently had luck and could play every .mp3 file I've found with this source code: https://github.com/Kandru/conquest-go/b ... /sounds.py

I just remembered that I sometimes had to restart the csgo server and the client to get .mp3 files working. Don't know why but maybe it's a problem relating to csgo? Did you have tried to restart both server and client?

Also what mp3 files make problems at all? Can you upload them?
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Using custom sounds in CS:GO

Postby decompile » Tue Aug 16, 2016 12:02 am

Sorry for not responding, but StreamSound fixed the issue. Thanks

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 67 guests