29#ifndef NOMLIB_ACTIONS_PLAY_AUDIO_SOURCE_HPP
30#define NOMLIB_ACTIONS_PLAY_AUDIO_SOURCE_HPP
34#include "nomlib/config.hpp"
35#include "nomlib/actions/IActionObject.hpp"
67 virtual std::unique_ptr<IActionObject>
clone()
const override;
73 virtual void pause(real32 delta_time)
override;
78 virtual void resume(real32 delta_time)
override;
80 virtual void rewind(real32 delta_time)
override;
85 static const char* DEBUG_CLASS_NAME;
90 void first_frame(real32 delta_time);
91 void last_frame(real32 delta_time);
105 typedef std::vector<audio::SoundBuffer*> audio_buffers;
106 audio_buffers::iterator current_buffer_;
107 audio_buffers audible_;
109 uint32 input_pos_ = 0;
FrameState
The update status of the action.
virtual void rewind(real32 delta_time) override
Reset the internal state of the action back to its initial starting values.
virtual void resume(real32 delta_time) override
Resume logic for the animation object.
virtual void release() override
Free externally referenced resources held by the action.
IActionObject::FrameState update(real32 t, uint8 b, int16 c, real32 d)
Execute the alpha blending logic for the animation.
friend class ActionTest
Allow access into our private parts for unit testing.
virtual IActionObject::FrameState prev_frame(real32 delta_time) override
Play the action backwards in time by one time step.
virtual void pause(real32 delta_time) override
Freeze the action's internal state.
virtual std::unique_ptr< IActionObject > clone() const override
Create a deep copy instance of the action.
virtual ~PlayAudioSource()
Construct the action from a pre-initialized audio buffer.
virtual IActionObject::FrameState next_frame(real32 delta_time) override
Play the action forward in time by one time step.
nom::size_type curr_frame_
The initial alpha blending value.
PlayAudioSource(audio::IOAudioEngine *dev, const char *filename)
Default constructor; create the action from an audio file on disk.
Abstract base class for an instance of the audio hardware interface.