Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio channel position doesn't works #1011

Open
2 of 5 tasks
JosensGames opened this issue Jan 2, 2025 · 2 comments
Open
2 of 5 tasks

Audio channel position doesn't works #1011

JosensGames opened this issue Jan 2, 2025 · 2 comments
Labels
Priority: Low Minor impact Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@JosensGames
Copy link

JosensGames commented Jan 2, 2025

Priority

Low

Area

  • Data
  • Source
  • Docker
  • Other

What happened?

Hello everyone, since the update that includes 3D enhancements to the client's audio system was released, I immediately wanted to try it out. However, there was a problem: it turns out that the setPosition method for an audio source doesn't work. For any of you who want to test it without creating any scripts, simply try pasting this code into your client's terminal:

local effect = g_sounds.createSoundEffect()
local source
local pos = {x = 0, y = 0}
local dir = 1
local spd = 6

effect:setPreset("cave")

function test()
	source = g_sounds.getChannel(3):play("data/sounds/sfx/sfx_buy.ogg")
	pos.x = pos.x + (spd * dir)
	if math.abs(pos.x) >= 128 then
		dir = dir * -1
	end
	print("Current x position is " ..pos.x.. ".")
	source:setPosition(pos)
	scheduleEvent(test, 250)
end

test()

What this code does is play an OGG file every 250ms, and it changes the x position, which in this case would be the panning, making it fluctuate between -128 and 128. However, nothing happens.

What OS are you seeing the problem on?

Windows

Code of Conduct

  • I agree to follow this project's Code of Conduct
@JosensGames JosensGames added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Jan 2, 2025
@github-actions github-actions bot added Priority: Low Minor impact Status: Pending Test This PR or Issue requires more testing labels Jan 2, 2025
@JosensGames
Copy link
Author

bump

1 similar comment
@JosensGames
Copy link
Author

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Minor impact Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

1 participant