zachsaw / MPDN_Extensions

Media Player .Net (MPDN) Open Source Extensions
Other
58 stars 18 forks source link

[Work in Progress] Make AudioChain use Filters #201

Closed Shiandow closed 8 years ago

Shiandow commented 8 years ago

The best way I could find to make this work was to convert "AudioChain" into a Filter and wrap a Chain around that.

This makes it slightly harder to handle settings, although on the flip side you can now assume that settings remain constant

Haven't figured out how to connect the "Process" function to the "Render()" function though, I'm not entirely sure what information is supposed to go where. I'm pretty sure everything that's necessary is there though.

Apart from that the Example scripts are more or less done, and the DynamicRangeCompressor should be more or less finished as well (I hope).

zachsaw commented 8 years ago

I'll take a look at the changes when I get some time. A bit busy at the moment.

Shiandow commented 8 years ago

Okay. I'll see if I can figure out how to get things working (or at least compilable) in the meantime. It's possible likely that I overlooked something though.

Shiandow commented 8 years ago

By the way, is "AudioChain.Reset" supposed to be called when the filter chain is disposed? Or should it be called every time the filter chain is reset?

Shiandow commented 8 years ago

By the way, I added the "PinFilter" class that allows filters to be connected to their input afterwards. This makes it possible to make Filters with parameterless constructors that can easily be made into Chains. I'd really like your opinion on that construction, since it is a bit of 'hack'.

Unfortunately this construction doesn't work entirely If the Filter needs any settings, you need to pass those manually. This is what I did with the DynamicRangeCompressor.