     
     // MARK: funcs
         
-    override public func avcaptureDictionary() -> [String: Any]? {
+    public func avcaptureDictionary() -> [String: Any]? {
         if let options = self.options {
             return options
         } else {

    
    // MARK: func
    
    public func avcaptureDictionary() -> [String: Any]? {
        if let options = self.options {
            return options
        } else {


// MARK: - AudioConfiguration

let NextLevelAudioConfigurationDefaultBitRate: UInt64 = 128000
let NextLevelAudioConfigurationDefaultSampleRate: Float64 = 44100
let NextLevelAudioConfigurationDefaultChannelsCount: UInt32 = 2

public class NextLevelAudioConfiguration: NextLevelConfiguration {
    
    public var bitRate: UInt64          // AVEncoderBitRateKey
    
    public var sampleRate: Float64?     // AVSampleRateKey
    
    public var channelsCount: UInt32?   // AVNumberOfChannelsKey
    
    public var format: AudioFormatID    // AVFormatIDKey

    // MARK: - object lifecycle
    
    override init() {
        self.bitRate = NextLevelAudioConfigurationDefaultBitRate
        self.format = kAudioFormatMPEG4AAC
        super.init()
    }

    // MARK: funcs
    
    override public func avcaptureDictionary(withSampleBuffer sampleBuffer: CMSampleBuffer?) -> [String: Any]? {
        if let options = self.options {
            return options
        } else {
            var config: [String: Any] = [AVEncoderBitRateKey:self.bitRate]
            
            if let buffer = sampleBuffer {
                if let formatDescription: CMFormatDescription = CMSampleBufferGetFormatDescription(buffer) {
                    if let _ = self.sampleRate, let _ = self.channelsCount {
                        // loading user provided settings after buffer use
                    } else if let streamBasicDescription = CMAudioFormatDescriptionGetStreamBasicDescription(formatDescription) {
                        self.sampleRate = streamBasicDescription.pointee.mSampleRate
                        self.channelsCount = streamBasicDescription.pointee.mChannelsPerFrame
                    }
                    
                    var layoutSize: Int = 0
                    if let currentChannelLayout = CMAudioFormatDescriptionGetChannelLayout(formatDescription, &layoutSize) {
                        let currentChannelLayoutData = layoutSize > 0 ? Data(bytes: currentChannelLayout, count:layoutSize) : Data()
                        config[AVChannelLayoutKey] = currentChannelLayoutData
                    }
                }
            }
            
            if let sampleRate = self.sampleRate {
                config[AVSampleRateKey] = sampleRate == 0 ? NextLevelAudioConfigurationDefaultSampleRate : sampleRate
            } else {
                config[AVSampleRateKey] = NextLevelAudioConfigurationDefaultSampleRate
            }
                
            if let channels = self.channelsCount {
                config[AVNumberOfChannelsKey] = channels == 0 ? NextLevelAudioConfigurationDefaultChannelsCount : channelsCount
            } else {
                config[AVNumberOfChannelsKey] = NextLevelAudioConfigurationDefaultChannelsCount
            }
            
            config[AVFormatIDKey] = self.format
