Raised This Month: $ Target: $400
 0% 

Playing .mp3 file while other .mp3 is already played


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-20-2013 , 09:05   Playing .mp3 file while other .mp3 is already played
Reply With Quote #1

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?
__________________
Kia is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-20-2013 , 11:18   Re: Playing .mp3 file while other .mp3 is already played
Reply With Quote #2

You can't. With wav you can, though.
__________________
Arkshine is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-20-2013 , 11:20   Re: Playing .mp3 file while other .mp3 is already played
Reply With Quote #3

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.
__________________

Last edited by Kia; 05-20-2013 at 11:46.
Kia is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 05-20-2013 , 12:06   Re: Playing .mp3 file while other .mp3 is already played
Reply With Quote #4

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
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-20-2013 , 16:29   AW: Playing .mp3 file while other .mp3 is already played
Reply With Quote #5

How do I convert my wav correct now?
__________________
Kia is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-20-2013 , 16:40   Re: Playing .mp3 file while other .mp3 is already played
Reply With Quote #6

I don't think you can pass id=0 with emit_sound.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-20-2013 , 16:41   Re: Playing .mp3 file while other .mp3 is already played
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
I don't think you can pass id=0 with emit_sound.
No, it's available.
__________________
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-20-2013 , 16:40   Re: Playing .mp3 file while other .mp3 is already played
Reply With Quote #8

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 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-20-2013 , 16:51   AW: Playing .mp3 file while other .mp3 is already played
Reply With Quote #9

What do you mean with generic format?
__________________
Kia is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-20-2013 , 18:31   Re: Playing .mp3 file while other .mp3 is already played
Reply With Quote #10

Not something special. Standard. Anyway check yourself, test, and ask there if needed.
__________________
Arkshine 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 16:23.


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