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

[CS:GO] GetSoundDuration


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 12-26-2018 , 15:32   [CS:GO] GetSoundDuration
Reply With Quote #1

Is this function work?
__________________
gubka is offline
Send a message via ICQ to gubka
eyal282
Veteran Member
Join Date: Aug 2011
Old 12-26-2018 , 17:12   Re: [CS:GO] GetSoundDuration
Reply With Quote #2

Quote:
Originally Posted by gubka View Post
Is this function work?
Nope, there are extensions that do.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 12-26-2018 , 22:55   Re: [CS:GO] GetSoundDuration
Reply With Quote #3

Quote:
Originally Posted by eyal282 View Post
Nope, there are extensions that do.
Why devs not update it? may be i need to pull ID3 tags decoder?
__________________
gubka is offline
Send a message via ICQ to gubka
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-26-2018 , 23:52   Re: [CS:GO] GetSoundDuration
Reply With Quote #4

Quote:
Originally Posted by gubka View Post
Why devs not update it? may be i need to pull ID3 tags decoder?
...maybe it's function from game engine?
Maybe can't fix
PHP Code:
/** * This function is not known to work, and may crash. You should
 * not use it. It is provided for backwards compatibility only.
 * 
 * @param name        Sound file name relative to the "sound" folder.
 * @return            Duration in seconds. 
*/
#pragma deprecated Does not work, may crash.
native float GetSoundDuration(const char[] name); 
__________________
Do not Private Message @me

Last edited by Bacardi; 12-26-2018 at 23:54.
Bacardi is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 12-27-2018 , 07:43   Re: [CS:GO] GetSoundDuration
Reply With Quote #5

Quote:
Originally Posted by Bacardi View Post
...maybe it's function from game engine?
Maybe can't fix
PHP Code:
/** * This function is not known to work, and may crash. You should
 * not use it. It is provided for backwards compatibility only.
 * 
 * @param name        Sound file name relative to the "sound" folder.
 * @return            Duration in seconds. 
*/
#pragma deprecated Does not work, may crash.
native float GetSoundDuration(const char[] name); 
Oh thanks, hope sourcemod in future will have some features of taglib by default

Is anyone knows why that sig

Quote:
"Entity_GetSoundDuration" // Str: "UTIL_TranslateSoundName"
{
"library" "server"
//"windows" ""
"linux" "\x55\x89\xE5\x57\x56\x53\x83\xEC\x1C\xA1\x2A \x2A\x2A\x2A\x8B\x5D\x08\x8B\x7D\x0C"
//"linux64" ""
//"mac64" ""
}
return different values usually?
__________________

Last edited by gubka; 12-27-2018 at 09:10.
gubka is offline
Send a message via ICQ to gubka
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-27-2018 , 08:48   Re: [CS:GO] GetSoundDuration
Reply With Quote #6

Quote:
Originally Posted by gubka View Post
Oh thanks, hope sourcemod in future will have some features of taglib by default
It wont, use an extension.
__________________
asherkin is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 12-27-2018 , 09:11   Re: [CS:GO] GetSoundDuration
Reply With Quote #7

Quote:
Originally Posted by asherkin View Post
It wont, use an extension.
Is the CbaseEntity::GetSoundDuration should work or not ? I tryed to use it and got different values for each client? Or it should work only for standart sounds?
__________________
gubka is offline
Send a message via ICQ to gubka
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-27-2018 , 09:22   Re: [CS:GO] GetSoundDuration
Reply With Quote #8

Quote:
Originally Posted by gubka View Post
Is the CbaseEntity::GetSoundDuration should work or not ? I tryed to use it and got different values for each client? Or it should work only for standart sounds?
No, CBaseEntity::GetSoundDuration is just a wrapper around IEngineSound::GetSoundDuration (the engine function SM uses directly) - which, as psychonic told you, is not implemented on Linux.
__________________

Last edited by asherkin; 12-27-2018 at 09:23.
asherkin is offline
romeo7
Senior Member
Join Date: Mar 2017
Old 04-07-2020 , 18:19   Re: [CS:GO] GetSoundDuration
Reply With Quote #9

Quote:
Originally Posted by asherkin View Post
No, CBaseEntity::GetSoundDuration is just a wrapper around IEngineSound::GetSoundDuration (the engine function SM uses directly) - which, as psychonic told you, is not implemented on Linux.
I was able to test GetSoundDuration for MP3 at CSGO and it worked well. Maybe Valve fixed it. Can we use it now?
__________________
___[CSGO]_[ZP]____
Zombie Plague Classic
||37.26.2.29:27021||
romeo7 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:06.


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