//
//  AudioNode.hpp
//  SwitchboardSDK
//
//  Created by Balázs Kiss on 2022. 03. 03..
//  Copyright © 2022. Synervoz Inc. All rights reserved.
//

#pragma once

#include <switchboard/export.h>
#include <switchboard_core/Node.hpp>
#include <switchboard_core/SwitchboardCore.hpp>

#include <any>
#include <map>
#include <string>
#include <vector>

namespace switchboard {

/**
 * AudioNode class.
 * @brief Represents a node in the audio graph.
 */
class SWITCHBOARDSDK_EXPORT AudioNode : public Node {
public:
    /**
     * @brief AudioNode constructor.
     *
     * @param numberOfInputs The number of inputs for the audio node.
     * @param numberOfOutputs The number of outputs for the audio node.
     */
    AudioNode(uint numberOfInputs, uint numberOfOutputs);

    /**
     * @brief AudioNode virtual destructor.
     */
    ~AudioNode() override = default;

    /**
     * @brief Gets the display name of the audio node.
     * @details By default the display name follows this format: name (type)
     *
     * @returns The display name of the node.
     */
    virtual std::string getDisplayName() const;

    /**
     * @brief Called when the audio graph is started.
     * @details Override to perform any setup needed when the graph begins processing.
     */
    virtual void onGraphStart() {}

    /**
     * @brief Called when the audio graph is stopped.
     * @details Override to perform any teardown needed when the graph stops processing.
     */
    virtual void onGraphStop() {}
};

}
