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

Not working as expected on OS X #6

Open
cloudhead opened this issue Jul 22, 2016 · 1 comment
Open

Not working as expected on OS X #6

cloudhead opened this issue Jul 22, 2016 · 1 comment

Comments

@cloudhead
Copy link

When trying to run the basic example, I get:

Basic-HelloWorld: user error (createBuffer: The operation was invalid in the current ALUT state)

I've done some googling and found this post: http://www.alecjacobson.com/weblog/?p=3708

Which says that the linking order can cause this error, and indeed, -lalut figures after -framework OpenAL.

I have however no idea how to fix this, if this is the problem.

@cloudhead
Copy link
Author

I got it working by creating the context manually, so I guess it's not a linker problem. I'm now using runALUTUsingCurrentContext, otherwise it doesn't seem to work.

    AL.withProgNameAndArgs AL.runALUTUsingCurrentContext $ \_ _ -> do
        (Just device) <- AL.openDevice Nothing
        (Just context) <- AL.createContext device []
        AL.currentContext $= Just context

@cloudhead cloudhead changed the title Not working on OS X Not working as expected on OS X Jul 22, 2016
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

1 participant