gregzo / G-Audio

2D Audio Framework for Unity
MIT License
72 stars 19 forks source link

Upgrade to unity 5.5.1p3 #9

Closed kevadsett closed 4 years ago

kevadsett commented 6 years ago

Modified code so that it produces no compile-time warnings or errors in Unity 5.5.1p3, and all examples appear to work correctly.

gregzo commented 6 years ago

All changes look good, but why change the private modifier of the Gain property in GATChannelGain? There are methods to adjust gain, going through the property's setter directly isn't thread safe and can cause clipping.

Thanks for giving G-Audio some love, I wish I had the time to do so too!

kevadsett commented 6 years ago

I actually only made that change as a relatively unthinking compile-time fix. That gain property wasn't working, and changing the accessibility of it got it to work. I wish I could explain myself better, but it was a relatively absent-minded change.

gregzo commented 6 years ago

Does it compile if you change the Gain setter's modifier to protected instead? In both classes? My hunch is that since the property is overriden, private set is not legal.

Please give it a shot, if that works I'll merge the changes - it's actually pretty important that Gain's setter remains protected.

gregzo commented 4 years ago

Merging it even though I had no news regarding the Gain property. I'll commit a protected setter myself after the merge. It's important to keep that protected modifier because of thread concurrency.