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:
IWaveSourceasOSXAudioDecoder, as well asMP3DecoderOSXandAACDecoderOSXclasses.MonoMaclibrary 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.IWaveSourcefrom an mp3 file.CodecFactoryclass has been made more cross-platform:OSXAudio.RegisterCodecs()which registers the relevant OSX decoders in the Codec Factory.