<commit_before>//
//  yas_audio_types.h
//  Copyright (c) 2015 <NAME>.
//

#pragma once

#include <memory>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <experimental/optional>
#include <AudioUnit/AUComponent.h>

namespace yas
{
    union render_id {
        void *v;
        struct {
            UInt8 graph;
            UInt16 unit;
        };
    };

    enum class pcm_format : UInt32 {
        other = 0,
        float32,
        float64,
        int16,
        fixed824,
    };

    enum class render_type : UInt32 {
        normal = 0,
        input,
        notify,
        unknown,
    };

    enum class direction {
        output = 0,
        input = 1,
    };

    struct render_parameters {
        render_type in_render_type;
        AudioUnitRenderActionFlags *io_action_flags;
        const AudioTimeStamp *io_time_stamp;
        UInt32 in_bus_number;
        UInt32 in_number_frames;
        AudioBufferList *io_data;
        render_id render_id;
    };

    UInt32 to_uint32(const yas::direction &);
    std::string to_string(const yas::direction &);
    std::string to_string(const AudioUnitScope scope);
    std::string to_string(const render_type &);

    class objc_strong_container;
    class objc_weak_container;
    class audio_time;
    class audio_format;
    class audio_pcm_buffer;
    class audio_route;
    class audio_graph;
    class audio_unit;
    class audio_engine;
    class audio_node;
    class audio_connection;
    class audio_unit_node;
    class audio_unit_io_node;
    class audio_unit_output_node;
    class audio_unit_input_node;
    class audio_offline_output_node;
    class audio_tap_node;
    class audio_input_tap_node;
    class audio_unit_mixer_node;
    class audio_route_node;

    constexpr std::experimental::nullopt_t nullopt = std::experimental::nullopt;

    using bus_result_t = std::experimental::optional<UInt32>;
    using abl_uptr = std::unique_ptr<AudioBufferList, std::function<void(AudioBufferList *)>>;
    using abl_data_uptr = std::unique_ptr<std::vector<std::vector<UInt8>>>;
    using channel_map_t = std::vector<UInt32>;

    using audio_route_set = std::set<audio_route>;
    using audio_engine_sptr = std::shared_ptr<audio_engine>;
    using audio_engine_wptr = std::weak_ptr<audio_engine>;
    using audio_node_sptr = std::shared_ptr<audio_node>;
    using audio_connection_sptr = std::shared_ptr<audio_connection>;<commit_msg>remove unused type<commit_after>//
//  yas_audio_types.h
//  Copyright (c) 2015 <NAME>.
//

#pragma once

#include <memory>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <experimental/optional>
#include <AudioUnit/AUComponent.h>

namespace yas
{
    union render_id {
        void *v;
        struct {
            UInt8 graph;
            UInt16 unit;
        };
    };

    enum class pcm_format : UInt32 {
        other = 0,
        float32,
        float64,
        int16,
        fixed824,
    };

    enum class render_type : UInt32 {
        normal = 0,
        input,
        notify,
        unknown,
    };

    enum class direction {
        output = 0,
        input = 1,
    };

    struct render_parameters {
        render_type in_render_type;
        AudioUnitRenderActionFlags *io_action_flags;
        const AudioTimeStamp *io_time_stamp;
        UInt32 in_bus_number;
        UInt32 in_number_frames;
        AudioBufferList *io_data;
        render_id render_id;
    };

    UInt32 to_uint32(const yas::direction &);
    std::string to_string(const yas::direction &);
    std::string to_string(const AudioUnitScope scope);
    std::string to_string(const render_type &);

    class audio_time;
    class audio_format;
    class audio_pcm_buffer;
    class audio_route;
    class audio_graph;
    class audio_unit;
    class audio_engine;
    class audio_node;
    class audio_connection;
    class audio_unit_node;
    class audio_unit_io_node;
    class audio_unit_output_node;
    class audio_unit_input_node;
    class audio_offline_output_node;
    class audio_tap_node;
    class audio_input_tap_node;
    class audio_unit_mixer_node;
    class audio_route_node;

    constexpr std::experimental::nullopt_t nullopt = std::experimental::nullopt;

    using bus_result_t = std::experimental::optional<UInt32>;
    using abl_uptr = std::unique_ptr<AudioBufferList, std::function<void(AudioBufferList *)>>;
    using abl_data_uptr = std::unique_ptr<std::vector<std::vector<UInt8>>>;
    using channel_map_t = std::vector<UInt32>;

    using audio_route_set = std::set<audio_route>;
    using audio_engine_sptr = std::shared_ptr<audio_engine>;
    using audio_engine_wptr = std::weak_ptr<audio_engine>;
    using audio_node_sptr = std::shared_ptr<audio_node>;
    using audio_connection_sptr = std::shared_ptr<audio_connection>;
{'fraction_non_alphanumeric': 0.09066333957163651, 'fraction_numerical': 0.01538781451445207, 'mean_word_length': 3.100596760443308, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, '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': '2991842', 'n_tokens_mistral': 1607, 'n_tokens_neox': 1526, 'n_words': 319}