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

OpenAL Implementation #93

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

OpenAL Implementation #93

wants to merge 14 commits into from

Conversation

opcon
Copy link
Contributor

@opcon opcon commented May 15, 2016

I have fixed and improved the OpenAL implementation from #16.

The main issue was incorrectly buffering IEEE 32-bit float samples, whereas OpenAL expects PCM audio (8 or 16 bit).

I also made the following changes:

  • Added error checking functions to ALInterops.cs
  • Fixed incorrect OpenAL enum names
  • Added support for custom latencies in ALSoundOut
  • Added unpausing support
  • Catch null reference exceptions in the core playback loop - should only occur when ALSoundOut is stopped and then disposed in a very short time

Kevin Scholz and others added 12 commits May 15, 2016 15:46
Note that openal needs some adjustments to match the unit tests
Also allow users to choose their favorite device and removed c#6
features
I don't know if it's a my sound driver, but when opening all devices
sound gets very... uhm.. sounds bad. The ALDevice is now checking if
it's already initialized so it don't hurt initing it multiple times.
Sound should work as expected again
OpenAL expects a PCM source (either 8 or 16 bit), not an IEEE 32-bit float source
To fix this, we use the original bit depth of the wave source if it is 8 or 16 bits, and use 16 bits otherwise
@filoe filoe added this to the CSCore 1.2 release milestone May 16, 2016
@filoe
Copy link
Owner

filoe commented May 18, 2016

What are you actually using to build the project on linux. Got little to no experience with c# on linux. VSCode, MonoDev?

@opcon
Copy link
Contributor Author

opcon commented May 18, 2016

I built it with MonoDevelop. I had to disable "Use MSBuild" in each project that I wanted to build though, I didn't bother looking in to why that was the case.

I had to make a few changes to the project files to handle Linux's case sensitivity and dll mapping, this was done in commit 588bc9b, which is in the linux branch of my fork.

This pull request is just for OpenAL support though, the linux part still needs polishing.

@filoe
Copy link
Owner

filoe commented May 20, 2016

Have you rewritten the post build-event code?

opcon added 2 commits May 21, 2016 16:53
Previous method would sometimes overwrite buffers that were in use, causing the audio to skip, and could also dequeue buffers that were in use.
Now only fill buffers that have been dequeued.

Also added a few helper functions for filling buffers and dequeuing them.
@opcon opcon mentioned this pull request May 21, 2016
11 tasks
@opcon
Copy link
Contributor Author

opcon commented May 21, 2016

I have not got that working yet. I am a bit unsure on it's function, is this what the post build step does?

  1. InlineILCompiler inlines key pieces of code (all in ILUtilities.cs?) to improve performance
  2. CSCli rewrites code marked with [CSCalli] attribute to enable multi-threaded COM interop

I have created issue #94 so that we can discuss cross-platform support and list the current progress towards it, I suggest we move the discussion there?

@filoe
Copy link
Owner

filoe commented May 21, 2016

Exactly, but I'm not sure how to handle multiple platforms. Maybe we should just exclude all windows components from the linux and mac build. So we would not need the CSCli(and the ILUtilities??) build step anymore.

@filoe filoe mentioned this pull request May 26, 2016
@filoe
Copy link
Owner

filoe commented May 28, 2016

Merged pull request into an openal branch

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

Successfully merging this pull request may close these issues.

2 participants