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

should pygame.mixer.Channel.set_source_location() work with negative angle values ? #139

Open
Robomarchello opened this issue Dec 4, 2023 · 2 comments
Assignees
Labels
pygame prebuilt issue may come from pygame-wasm question Further information is requested

Comments

@Robomarchello
Copy link

A really specific issue, but when calling pygame.mixer.Channel.set_source_location() with negative angle value, pygbag seems to ignore negative sign, so it plays in the right instead of the left

import pygame

pygame.init()
pygame.mixer.init()

sound = pygame.mixer.Sound("zombie.ogg")

angle = -90
channel = sound.play()
channel.set_source_location(angle, 100)
@pmp-p
Copy link
Member

pmp-p commented Dec 4, 2023

any chance you have a sdl2 C sample for that ? it could be a sdl2 port problem

@pmp-p pmp-p self-assigned this Dec 4, 2023
@pmp-p pmp-p added bug Something isn't working pygame prebuilt issue may come from pygame-wasm labels Dec 4, 2023
@pmp-p
Copy link
Member

pmp-p commented Dec 4, 2023

SDL_mixer documentation suggests that angle value should be 0-360 range so -90 would be 360-90 instead. Maybe pygame-ce should ensure the conversion here ?

The fact it worked on desktop could be pure coincidence

@pmp-p pmp-p added question Further information is requested and removed bug Something isn't working labels Dec 4, 2023
@pmp-p pmp-p changed the title pygame.mixer.Channel.set_source_location() doesn't work right with negative angle values should pygame.mixer.Channel.set_source_location() work with negative angle values ? Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pygame prebuilt issue may come from pygame-wasm question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants