aboutsummaryrefslogtreecommitdiff
path: root/src/layer_context.cc
blob: 28a94b5fe72e3bf8db4c552b9cf0137be5c8905a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "layer_context.hh"

#include <cstdlib> // for env var
#include <string_view>

namespace low_latency {

LayerContext::LayerContext() {
    this->is_antilag_1_enabled = []() -> auto {
        const auto env = std::getenv(LayerContext::SLEEP_AFTER_PRESENT_ENV);
        return env && std::string_view{env} == "1";
    }();
}

LayerContext::~LayerContext() {}

} // namespace low_latency