-
Notifications
You must be signed in to change notification settings - Fork 459
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
Native OSX Decoder using CoreAudio APIs #191
base: master
Are you sure you want to change the base?
Conversation
Add a static platform detection class that detects Windows, Mac and Linux. Only register Windows specific codecs if running on Windows. Provide a RegisterDefaultCodec method in the Codec Factory that allows customization of the default codec. This makes use of the DefaultCodecAction delegate. These changes mean that on startup for e.g. Mac, only cross-platform codecs are registered in the Codec Factory. It is up to the user of CSCore to call OSXAudio.RegisterCodecs() which then registers the OSX CoreAudio api with the Codec Factory.
A few notes/questions, semi-related to this pull request:
Cheers :) |
First of all really, really big thanks for your effort! 👍
But thanks again for your really great effort!! |
No worries, thank you for all your effort too! |
Hi @filoe, in the process of figuring out how to deploy my game on OSX I've realised that Xamarin.Mac.dll should be used over MonoMac.dll, as it is newer and has some bug fixes. I'll update this pull request to use Xamarin.Mac.dll instead. I think creating a cscore 1.3 branch is a good idea rather than merging this straight into master. |
Merging into master is definitly not an option. |
Xamarin.Mac.dll is basically the successor to MonoMac.dll and is updated regularly (see https://github.com/xamarin/xamarin-macios). It is licensed under the MIT license now (LICENSE), same as MonoMac.dll, so there are no issues there. |
This is the native OSX audio decoding implementation.
Overview:
IWaveSource
asOSXAudioDecoder
, as well asMP3DecoderOSX
andAACDecoderOSX
classes.MonoMac
library which wraps the CoreAudio API is also provided. This only contains the relevant code needed for CSCore.OSX, and hence is only ~24K in size. This library is merged with the final CSCore.OSX.dll at compile time, so the final output is a single dll.IWaveSource
from an mp3 file.CodecFactory
class has been made more cross-platform:OSXAudio.RegisterCodecs()
which registers the relevant OSX decoders in the Codec Factory.