Files
strato/app/src/main/cpp/skyline/services/audio/IAudioRenderer/effect.h
◱ PixelyIon c76ef3730b Move to MPL-2.0
We earlier moved to LGPLv3.0 or Later. This was a mistake as what we wanted was being able to link to proprietary libraries but LGPL is the opposite and it allows linking proprietary libraries to libskyline instead. After further consideration, we've moved to MPL-2.0, it allows linking to proprietary libraries and is a standardized license as compared to adding an exception to GPL.
2020-04-23 22:26:27 +05:30

49 lines
1.3 KiB
C++

// SPDX-License-Identifier: MPL-2.0
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
#pragma once
#include <common.h>
namespace skyline::service::audio::IAudioRenderer {
/**
* @brief This enumerates various states an effect can be in
*/
enum class EffectState : u8 {
None = 0, //!< The effect isn't being used
New = 1 //!< The effect is new
};
/**
* @brief This is in input containing information on what effects to use on an audio stream
*/
struct EffectIn {
u8 _unk0_;
u8 isNew; //!< Whether the effect was used in the previous samples
u8 _unk1_[0xbe];
};
static_assert(sizeof(EffectIn) == 0xc0);
/**
* @brief This is returned to inform the guest of the state of an effect
*/
struct EffectOut {
EffectState state; //!< The state of the effect
u8 _pad0_[15];
};
static_assert(sizeof(EffectOut) == 0x10);
/**
* @brief The Effect class stores the state of audio post processing effects
*/
class Effect {
public:
EffectOut output{}; //!< The current output state
inline void ProcessInput(const EffectIn &input) {
if (input.isNew)
output.state = EffectState::New;
}
};
}