AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Playing .mp3 file while other .mp3 is already played (https://forums.alliedmods.net/showthread.php?t=216375)

Kia 05-20-2013 09:05

Playing .mp3 file while other .mp3 is already played
 
Hello everybody,

I'm using Background Sounds to play ambience music at my server.
Now I want to play a short mp3 sound when someone does action X.
I tried emit_sound, but it doesn't work. When I use "mp3 play" the sounds gets played, but my ambience sound stops playing.
Anyone has an Idea how to solve that?

Arkshine 05-20-2013 11:18

Re: Playing .mp3 file while other .mp3 is already played
 
You can't. With wav you can, though.

Kia 05-20-2013 11:20

Re: Playing .mp3 file while other .mp3 is already played
 
Hmm okay, thanks.
I have this now :
PHP Code:

new const g_szTeleportSound[]   = "mod/bassdrum.wav"
emit_sound(0CHAN_BODYg_szTeleportSound1.0ATTN_NONE0PITCH_NORM ); 

But I can't hear anything, how can I be sure that the .wav is playable?
When I type "spk /sound/mod/bassdrum" in console, the sound also doesn't get played.

bibu 05-20-2013 12:06

Re: Playing .mp3 file while other .mp3 is already played
 
Probably mono and bit settings. You can try this include, though it's buggy sometimes as I reported it there but never got an answer:

https://forums.alliedmods.net/showthread.php?t=176259

Kia 05-20-2013 16:29

AW: Playing .mp3 file while other .mp3 is already played
 
How do I convert my wav correct now?

ConnorMcLeod 05-20-2013 16:40

Re: Playing .mp3 file while other .mp3 is already played
 
I don't think you can pass id=0 with emit_sound.

Arkshine 05-20-2013 16:40

Re: Playing .mp3 file while other .mp3 is already played
 
It should be : spk mod/bassdrum.wav (don't remember if extension is required).

If you still hear nothing, you need to use an audio software and save it in a generic format, mono is a must.

Arkshine 05-20-2013 16:41

Re: Playing .mp3 file while other .mp3 is already played
 
Quote:

Originally Posted by ConnorMcLeod (Post 1955321)
I don't think you can pass id=0 with emit_sound.

No, it's available.

Kia 05-20-2013 16:51

AW: Playing .mp3 file while other .mp3 is already played
 
What do you mean with generic format?

Arkshine 05-20-2013 18:31

Re: Playing .mp3 file while other .mp3 is already played
 
Not something special. Standard. Anyway check yourself, test, and ask there if needed.


All times are GMT -4. The time now is 16:23.

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