MTCoreAudio provides some NSValueTransformers for use with Cocoa Bindings. They are registered and available to Cocoa Bindings when MTCoreAudioDevice is initialized. These transformers must be initialized and registered before any nib file that uses them is loaded.
NSString * const MTDecibelToLinearTransformerName = @"MTDecibelToLinearTransformer"
MTDecibelToLinearTransformerName
value transformer returns an instance of NSNumber containing a double-precision floating point value. The returned value is the result of converting the original logarithmic-scale value, dB
, to a linear scale with the formula α = 10(dB/20)
. This transformation is reversible if α
is positive. The original value must respond to -doubleValue
.
NSString * const MTLinearToDecibelTransformerName = @"MTLinearToDecibelTransformer"
MTLinearToDecibelTransformerName
value transformer returns an instance of NSNumber containing a double-precision floating point value. The returned value is the result of converting the original linear-scale value, α
(which must be positive), to a logarithmic scale with the formula dB = 20 × log10(α)
. This transformation is reversible. The original value must respond to -doubleValue
.