nngn
Loading...
Searching...
No Matches
nngn::Generator Class Reference

#include <gen.h>

Collaboration diagram for nngn::Generator:

Public Member Functions

bool init (std::size_t rate)
 
std::size_t pos (void) const
 
bool set_loop (bool b)
 
void set_rewind (bool b)
 
bool set_mute (bool b)
 
bool set_gain (float g)
 
void set_param (float p)
 
auto release_data (void)
 
std::string_view error (void) const
 
bool generate (const QString &prog)
 
bool stop (void)
 

Private Types

enum  Flag : u8 { LOOP = 1 << 0 , REWIND = 1 << 1 , MUTE = 1 << 2 }
 

Private Member Functions

bool has_source (void) const
 
nngn::lua::value push_msgh (void)
 
bool play (void)
 

Private Attributes

nngn::lua::state lua = {}
 
nngn::Math math = {}
 
nngn::Audio audio = {}
 
nngn::Audio::source source = {}
 
float gain = 1
 
float param = 0
 
std::vector< std::byte > wav_data = {}
 
std::string m_error = {}
 
nngn::Flags< Flagflags = {}
 

Member Enumeration Documentation

◆ Flag

enum nngn::Generator::Flag : u8
private
Enumerator
LOOP 
REWIND 
MUTE 

Member Function Documentation

◆ error()

std::string_view nngn::Generator::error ( void ) const
inline
Here is the caller graph for this function:

◆ generate()

bool nngn::Generator::generate ( const QString & prog)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_source()

bool nngn::Generator::has_source ( void ) const
inlineprivate

◆ init()

bool nngn::Generator::init ( std::size_t rate)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ play()

bool nngn::Generator::play ( void )
private

◆ pos()

std::size_t nngn::Generator::pos ( void ) const

◆ push_msgh()

nngn::lua::value nngn::Generator::push_msgh ( void )
private
Here is the call graph for this function:

◆ release_data()

auto nngn::Generator::release_data ( void )
inline
Here is the caller graph for this function:

◆ set_gain()

bool nngn::Generator::set_gain ( float g)
Here is the caller graph for this function:

◆ set_loop()

bool nngn::Generator::set_loop ( bool b)
Here is the caller graph for this function:

◆ set_mute()

bool nngn::Generator::set_mute ( bool b)
Here is the caller graph for this function:

◆ set_param()

void nngn::Generator::set_param ( float p)
inline
Here is the caller graph for this function:

◆ set_rewind()

void nngn::Generator::set_rewind ( bool b)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

bool nngn::Generator::stop ( void )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ audio

nngn::Audio nngn::Generator::audio = {}
private

◆ flags

nngn::Flags<Flag> nngn::Generator::flags = {}
private

◆ gain

float nngn::Generator::gain = 1
private

◆ lua

nngn::lua::state nngn::Generator::lua = {}
private

◆ m_error

std::string nngn::Generator::m_error = {}
private

◆ math

nngn::Math nngn::Generator::math = {}
private

◆ param

float nngn::Generator::param = 0
private

◆ source

nngn::Audio::source nngn::Generator::source = {}
private

◆ wav_data

std::vector<std::byte> nngn::Generator::wav_data = {}
private

The documentation for this class was generated from the following files: