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

Stereo audio not affected #18

Open
Scylla2020 opened this issue Jan 28, 2023 · 1 comment
Open

Stereo audio not affected #18

Scylla2020 opened this issue Jan 28, 2023 · 1 comment

Comments

@Scylla2020
Copy link

Scylla2020 commented Jan 28, 2023

Im trying to run this simple code, positioning audio to the left but it still sounds the same. What am i doing wrong?I expected to hear the audio in my right ear but it sounds normal.

from openal import * 
import time

# open our wave file
source = oalOpen(f)
source.set_position((0,0,0))

x=oalGetListener()
x.set_position=((-5,0,0))

# and start playback
source.play()

check if the file is still playing
while source.get_state() == AL_PLAYING:
    # wait until the file is done playing
    time.sleep(1)

oalQuit()
@Scylla2020 Scylla2020 changed the title Audio not affected Stereo audio not affected Jan 28, 2023
@Zuzu-Typ
Copy link
Owner

Hi there @Scylla2020 ,

A possible source of the problem might be the audio file you are using.
Positional audio playback only works with files that only have one audio channel (mono).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants