新增mixer控件
This commit is contained in:
parent
dc4576634d
commit
1c76e93d29
@ -18,6 +18,7 @@ void mixer_track::init() {
|
||||
buffer.resize(channel_count, g_audio_device_manager.get_buffer_size());
|
||||
for (int i = 0; i < buffer.get_num_channels(); ++i) {
|
||||
ui_buffers->emplace_back(g_audio_device_manager.get_buffer_size() * 2);
|
||||
ui_buffer_peaks.emplace_back();
|
||||
}
|
||||
|
||||
channel_interface_ = new mixer_channel_interface(this);
|
||||
|
@ -18,6 +18,11 @@ struct mixer_track_link {
|
||||
float send_level;
|
||||
};
|
||||
|
||||
struct mixer_track_peak {
|
||||
sample_t peak;
|
||||
float left_time;
|
||||
};
|
||||
|
||||
class CORE_API mixer_track {
|
||||
public:
|
||||
explicit mixer_track(mixer_track_type in_type) : type_(in_type) {
|
||||
@ -47,12 +52,15 @@ public:
|
||||
[[nodiscard]] float get_volume() const { return volume; }
|
||||
|
||||
audio_buffer buffer;
|
||||
std::shared_ptr<circular_buffer_vector_type> ui_buffers;
|
||||
std::vector<plugin_host*> effects{};
|
||||
std::vector<mixer_track_link> children{};
|
||||
multicast_delegate<mixer_track*> on_processed;
|
||||
multicast_delegate<plugin_host*> on_add_effect;
|
||||
multicast_delegate<plugin_host*> on_remove_effect;
|
||||
|
||||
// UI
|
||||
std::shared_ptr<circular_buffer_vector_type> ui_buffers;
|
||||
std::vector<mixer_track_peak> ui_buffer_peaks;
|
||||
private:
|
||||
const mixer_track_type type_;
|
||||
std::atomic<float> volume = 1.0f;
|
||||
|
@ -76,7 +76,6 @@ void window_manager::destroy_plugin_window(plugin_host* host) {
|
||||
}
|
||||
|
||||
void window_manager::update() {
|
||||
// glfwPollEvents();
|
||||
for (auto& info : host_infos_) {
|
||||
if (!info.second.window) {
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user