Raised This Month: $83 Target: $400
 20% 

sounds format ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 09-20-2017 , 08:22   sounds format ?
Reply With Quote #1

Hi
Sometimes when using alternative sounds do not work with the same format ? ex : (wav with othere wav sound )
How can I make sure they must work and be matched like the original sounds in the game ?
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-20-2017 , 09:34   Re: sounds format ?
Reply With Quote #2

What?
__________________
fysiks is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 09-20-2017 , 10:19   Re: sounds format ?
Reply With Quote #3

what what ? I think the explanation is clear ..

i just want know the format of the wav sounds in the game because when I replace some sounds do not work with the same format (old sound wav format and new sound its wav to)
so.. I want to know what the problem is and what is the problem going back to make sure that the sounds are correctly converted in the future?
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 09-20-2017 , 11:55   Re: sounds format ?
Reply With Quote #4

in audacity for wave files I do:
- split to mono
- project rate at 16000hz
- save as 16bit
you might also wanna delete any metadata present, you can do this by pressing "clear" on the window with the additional data when saving
most if not all audio software will do wav at 32bit and 44100hz by default which is too much for the old engine
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.

Last edited by aron9forever; 09-20-2017 at 11:56.
aron9forever is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 09-20-2017 , 13:27   Re: sounds format ?
Reply With Quote #5

@aron9forever
Can my program be good for that?
In fact, I want to make sure everything
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 09-20-2017 , 14:07   Re: sounds format ?
Reply With Quote #6

I can't understand your question. Most decent audio editing software should be able to do that, if not, just download audacity, it's free and cross-platform. You can edit your sounds in whatever software you want and just convert them later using audacity.
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-20-2017 , 21:09   Re: sounds format ?
Reply With Quote #7

Quote:
Originally Posted by abdobiskra View Post
what what ? I think the explanation is clear ..
Yeah, because you wrote it. That doesn't make it comprehensible. Your new explanation is much much better.
__________________
fysiks is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 09-29-2017 , 06:55   Re: sounds format ?
Reply With Quote #8

@aron9forever
Thank you for the information you have provided
But I have a strange problem!
I tried to change the sound of the bomb to a map crossfire (serin.wav sound HL1 mod)
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define SIREN_OLD_SOUND "ambience/siren.wav"
#define SIREN_NEW_SOUND "abc/alarm.wav"

new g_kvd

public plugin_precache ()
{
    
precache_sound SIREN_NEW_SOUND );
    
    
g_kvd register_forward FM_KeyValue"fw_KeyValue");
}

public 
plugin_init ()
{
    if(
g_kvd)
    {
        
unregister_forward(FM_KeyValueg_kvd)
    }
}

public 
fw_KeyValue(enthandle)
{
    if (
pev_valid ent ))
    {
        new 
g_keyNm[16], g_keyVl32 ], g_ClassNm[16];
        
        
get_kvd handleKV_ClassNameg_ClassNmcharsmax(g_ClassNm));
        
get_kvd handleKV_KeyNameg_keyNmcharsmax g_keyNm ) );
        
get_kvd handleKV_Valueg_keyVlcharsmax g_keyVl ) );
        
        if (
equal(g_ClassNm"ambient_generic") && equal g_keyNm"message" ) && equal g_keyVlSIREN_OLD_SOUND ))
        {
            
set_kvd(0KV_ClassNameg_ClassNm)
            
set_kvd(0KV_KeyNameg_keyNm)
            
set_kvd(0KV_ValueSIREN_NEW_SOUND)
            
set_kvd(0KV_fHandled0)
            
dllfunc(DLLFunc_KeyValueent0)
            
            
set_kvd(handleKV_fHandledget_kvd (0KV_fHandled))
            return 
FMRES_SUPERCEDE;
        }
    }
    return 
FMRES_IGNORED;

the old sound & the new sound have the same format :
the output :
1) siren.wav : (old sound of the map)
Quote:
Type: Audio
Codec: PCM U8 (u
Channels: Mono
Sample rate: 11025 Hz
Bits per sample: 8
2) alarm.wav : (new sound what i want replace)
Quote:
Type: Audio
Codec: PCM U8 (u
Channels: Mono
Sample rate: 11025 Hz
Bits per sample: 8
Every sound has 5 sec time
my problem : (old sound work in duration 45s Before the bomb exploded ) im not sur if 45s or mor . nvm
The old sound works and is replayed again
But the new sound only works (only 5s) and does not replayed again

@fysiks
The first explanation was the translation
The second was from my RIP ENG :stranger: !
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 09-29-2017 , 08:13   Re: sounds format ?
Reply With Quote #9

That's a problem from your script, not the sound file
I'll be honest here, I don't really know what that forward does or how you would do this on HL but just from intuition I guess, can you please try this out?
Code:
public fw_KeyValue(ent, handle) {     if (pev_valid ( ent ))     {         new g_keyNm[16], g_keyVl[ 32 ], g_ClassNm[16];                 get_kvd ( handle, KV_ClassName, g_ClassNm, charsmax(g_ClassNm));         get_kvd ( handle, KV_KeyName, g_keyNm, charsmax ( g_keyNm ) );         get_kvd ( handle, KV_Value, g_keyVl, charsmax ( g_keyVl ) );                 if (equal(g_ClassNm, "ambient_generic") && equal ( g_keyNm, "message" ) && equal ( g_keyVl, SIREN_OLD_SOUND ))         {             set_kvd(0, KV_Value, SIREN_NEW_SOUND)             dllfunc(DLLFunc_KeyValue, ent, 0)             return FMRES_SUPERCEDE;         }     }     return FMRES_IGNORED;

If that doesn't work then with my limited knowledge I can only suggest you just block the original sound and play the new one "manually" by using a repeating task and emit_sound (check how many times the sound is played and at what interval, then do a 5 second task that runs 8 times for 45 second siren, but remember to play one when you set the task as well)

if that doesn't work or you want the optimal solution please post in the scripting help section, since your sound is played fine one time it means the format is good
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.

Last edited by aron9forever; 09-29-2017 at 08:15.
aron9forever is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 09-29-2017 , 09:30   Re: sounds format ?
Reply With Quote #10

@aron9forever
i test my script its work for othere original sound from the game they work well and are replayed again
That's why I doubt the sound and its format or whether there are settings on the map that are hidden idk :p
As for the way I suggested it I was thinking about it and maybe the last solution after I make sure everything is fine
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
Reply


Thread Tools
Display Modes

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 01:27.


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