nanos-world / issues

Issue Tracker for nanos world
9 stars 1 forks source link

Spawning several 3D sounds in a row, only the first one is played #803

Open NegativeNameNGT opened 2 years ago

NegativeNameNGT commented 2 years ago

Prerequisites

Your Environment

Description

Spawning multiple 3D sounds only plays the first one and not all the sounds. Works when using different audio files.

My code :

local my_sound = Sound(
  Vector(0, 0, 0), -- Location (if a 3D sound)
  "package://nanos-serversidesounds/Client/test.ogg", -- Asset Path
  false, -- Is 2D Sound
  false, -- Auto Destroy (if to destroy after finished playing)
  SoundType.SFX,
  1, -- Volume
  1 -- Pitch
)

local my_sound2 = Sound(
  Vector(1000, 0, 0), -- Location (if a 3D sound)
  "package://nanos-serversidesounds/Client/test.ogg", -- Asset Path
  false, -- Is 2D Sound
  false, -- Auto Destroy (if to destroy after finished playing)
  SoundType.SFX,
  1, -- Volume
  1 -- Pitch
)

Tried to attach both sounds to props. The cross is the sound I can't hear. image

Steps to reproduce the behavior

Spawn multiple 3D sounds in a row

Expected behavior

All the sounds should play

Actual behavior

Only one sound is played

gtnardy commented 1 year ago

I didn't manage to reproduce. Both seems to be playing properly, do you have another example?

Also the :Play() - which was crashing before, doesn't seem to be crashing anymore, did you notice that too?