29#ifndef NOMLIB_ACTIONS_FADE_AUDIO_GAIN_BY_HPP
30#define NOMLIB_ACTIONS_FADE_AUDIO_GAIN_BY_HPP
34#include "nomlib/config.hpp"
35#include "nomlib/actions/IActionObject.hpp"
68 virtual std::unique_ptr<IActionObject>
clone()
const override;
74 virtual void pause(real32 delta_time)
override;
79 virtual void resume(real32 delta_time)
override;
81 virtual void rewind(real32 delta_time)
override;
86 static const char* DEBUG_CLASS_NAME;
91 void first_frame(real32 delta_time);
92 void last_frame(real32 delta_time);
virtual void pause(real32 delta_time) override
Freeze the action's internal state.
real32 initial_volume_
The initial alpha blending value.
virtual IActionObject::FrameState next_frame(real32 delta_time) override
Play the action forward in time by one time step.
virtual ~FadeAudioGainBy()
Destructor.
virtual void resume(real32 delta_time) override
Resume logic for the animation object.
FadeAudioGainBy(audio::IOAudioEngine *dev, const char *filename, real32 delta, real32 duration)
Default constructor; create the action from an audio file on disk.
FadeAudioGainBy(audio::IOAudioEngine *dev, audio::SoundBuffer *buffer, real32 delta, real32 duration)
Construct the action from a pre-initialized audio buffer.
virtual std::unique_ptr< IActionObject > clone() const override
Create a deep copy instance of the action.
friend class ActionTest
Allow access into our private parts for unit testing.
const real32 total_displacement_
The total change in the alpha blending value.
IActionObject::FrameState update(real32 t, uint8 b, int16 c, real32 d)
Execute the alpha blending logic for the animation.
virtual void release() override
Free externally referenced resources held by the action.
virtual void rewind(real32 delta_time) override
Reset the internal state of the action back to its initial starting values.
audio::SoundBuffer * audible_
The animation proxy object used to perform alpha blending on.
virtual IActionObject::FrameState prev_frame(real32 delta_time) override
Play the action backwards in time by one time step.
FrameState
The update status of the action.
real32 duration() const
Get the duration of the action.
Abstract base class for an instance of the audio hardware interface.