<commit_before>//
//  AKManager.swift
//  AudioKit
//
//  Created by <NAME> on 10/4/15.
//  Copyright © 2015 AudioKit. All rights reserved.
//

import Foundation
import AVFoundation

/** Top level AudioKit managing class */
public class AKManager {
    
    /** Globally accessible singleton */
    public static let sharedInstance = AKManager()
    
    /** Reference to the AV Audio Engine */
    public var engine = AVAudioEngine()
    
    /** An audio output operation that most applications will need to use last */
    public var audioOutput: AKOperation? {
        didSet {
            engine.connect(audioOutput!.output!, to: engine.outputNode, format: nil)
        }
    }
    
    /** Start up the audio engine */
    public func start() {
        // Start the engine.
        do {
            try self.engine.start()
        } catch {
            fatalError("Could not start engine. error: \(error).")
        }
    }
}<commit_msg>Added ability to stop AudioKit<commit_after>//
//  AKManager.swift
//  AudioKit
//
//  Created by <NAME> on 10/4/15.
//  Copyright © 2015 AudioKit. All rights reserved.
//

import Foundation
import AVFoundation

/** Top level AudioKit managing class */
public class AKManager {
    
    /** Globally accessible singleton */
    public static let sharedInstance = AKManager()
    
    /** Reference to the AV Audio Engine */
    public var engine = AVAudioEngine()
    
    /** An audio output operation that most applications will need to use last */
    public var audioOutput: AKOperation? {
        didSet {
            engine.connect(audioOutput!.output!, to: engine.outputNode, format: nil)
        }
    }
    
    /** Start up the audio engine */
    public func start() {
        // Start the engine.
        do {
            try self.engine.start()
        } catch {
            fatalError("Could not start engine. error: \(error).")
        }
    }
    
    /** Stop the audio engine */
    public func stop() {
        // Stop the engine.
        self.engine.stop()
    }
}
{'fraction_non_alphanumeric': 0.10754810064134189, 'fraction_numerical': 0.008880118401578688, 'mean_word_length': 1.9867452135493373, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6177342', 'n_tokens_mistral': 571, 'n_tokens_neox': 539, 'n_words': 191}