AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved [CSGO] multiple sounds behavior (https://forums.alliedmods.net/showthread.php?t=298801)

Lord_SAmMY 06-23-2017 04:38

[CSGO] multiple sounds behavior
 
Hi,

i cannot play two sound files at once. I know about different channels.
I tried different combinations, but no success:
  • Ambient sound on SNDCHAN_VOICE and other sounds on SNDCHAN_AUTO
  • Ambient sound on channel 8 and other sounds on SNDCHAN_AUTO
  • Ambient sound on channel 7 and other sounds on SNDCHAN_AUTO
  • Ambient sound on channel 20 and other sounds on unique channels between 30 and 50
  • All sounds on SNDCHAN_AUTO
  • All sounds on channel 8
  • Ambient sound with client command "play" and other sounds on SNDCHAN_AUTO

Everytime second sound is playing, the first one stops instantly.
I am using EmitSoundToClient but i also tried EmitSound.
I have tried different ambient sounds and different "interrupt" sounds.
Sample rate: 44100khz, 128 kbps on all sounds.

Anybody an idea?

Kinsi 06-23-2017 06:45

Re: [CSGO] multiple sounds behavior
 
Set the speakerEntity to 0, this allows a sound to be played up to 5x at once. I guess you try to play custom sounds using the * diskstream hack eh?

Lord_SAmMY 06-23-2017 07:11

Re: [CSGO] multiple sounds behavior
 
Oh nice thanks, i did not find this solution anywhere. I will try it as soon as i can.

Quote:

I guess you try to play custom sounds using the * diskstream hack eh?
Right.

For knowledge, what does speakerentity?

_GamerX 06-23-2017 09:30

Re: [CSGO] multiple sounds behavior
 
use SNDCHAN_STATIC

Lord_SAmMY 06-23-2017 11:47

Re: [CSGO] multiple sounds behavior
 
Quote:

Originally Posted by Kinsi (Post 2530923)
Set the speakerEntity to 0

Same problem as before.

Quote:

Originally Posted by _GamerX (Post 2530962)
use SNDCHAN_STATIC

Thanks this fixed my issue! :)


All times are GMT -4. The time now is 18:56.

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