Raised This Month: $51 Target: $400
 12% 

Sound problem in CSGO Server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrJerry
Junior Member
Join Date: Feb 2016
Old 12-05-2016 , 13:20   Sound problem in CSGO Server
Reply With Quote #1

Hello,

I learn SP since 2 weeks, but now i'm blocked with my plugin...
The role of my plugin it's to play a sound when the round start.

i have one error in my console :
S_StartSound: Invalid sample rate (48000) for sound '*merry.mp3'.

i share you my code :
PHP Code:
#define PLUGIN_AUTHOR "XIROSA" 
#define PLUGIN_VERSION "0.00" 
#include <sourcemod> 
#include <sdktools> 
#include <emitsoundany> 

public Plugin:myinfo = { 
    
name "Son début round"
    
author "Xirosa"
    
description "Plugin musique début round"
    
url "http://involved-gaming.com" 
}; 

public 
OnMapStart() 

    
PrecacheSoundAny("merry.mp3"true); 
    
AddFileToDownloadsTable("sound/merry.mp3"); 


public 
OnPluginStart() 

    
HookEvent("player_death"Event_PlayerDeathEventHookMode_Pre); 


public 
Action Event_PlayerDeath(Event event, const char[] namebool dontBroadcast

    
EmitSoundToAllAny("merry.mp3"); 
    
PrintToChatAll("TESTETSTESTESTESTESETSET"); 
    return 
Plugin_Handled

Ty for your help
MrJerry is offline
CamerDisco
AlliedModders Donor
Join Date: Aug 2015
Location: Poland
Old 12-05-2016 , 13:58   Re: Sound problem in CSGO Server
Reply With Quote #2

Bad conversion, I hope you don't change only file format to mp3? You must convert wav to mp3
__________________


Max-Play.pl - the best polish servers
CamerDisco is offline
MrJerry
Junior Member
Join Date: Feb 2016
Old 12-05-2016 , 14:54   Re: Sound problem in CSGO Server
Reply With Quote #3

Quote:
Originally Posted by CamerDisco View Post
Bad conversion, I hope you don't change only file format to mp3? You must convert wav to mp3
In fact the default extension it's .mp3, so i put the original file
MrJerry is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 12-05-2016 , 15:57   Re: Sound problem in CSGO Server
Reply With Quote #4

Use a website or a software (Audacity) to decrease the sample rate of your .mp3 ('44100' is ok).
__________________
micapat is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode