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)
 
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 , LOOP = 1 << 0 ,
  REWIND = 1 << 1 , MUTE = 1 << 2
}
 
enum  Flag : u8 {
  LOOP = 1 << 0 , REWIND = 1 << 1 , MUTE = 1 << 2 , 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)
 
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 [1/2]

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

◆ Flag [2/2]

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

Member Function Documentation

◆ error() [1/2]

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

◆ error() [2/2]

std::string_view nngn::Generator::error ( void  ) const
inline

◆ generate() [1/2]

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

◆ generate() [2/2]

bool nngn::Generator::generate ( const QString &  prog)

◆ has_source() [1/2]

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

◆ has_source() [2/2]

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

◆ init() [1/2]

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

◆ init() [2/2]

bool nngn::Generator::init ( std::size_t  rate)

◆ play() [1/2]

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

◆ play() [2/2]

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

◆ pos() [1/2]

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

◆ pos() [2/2]

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

◆ push_msgh() [1/2]

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

◆ push_msgh() [2/2]

nngn::lua::value nngn::Generator::push_msgh ( void  )
private

◆ release_data() [1/2]

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

◆ release_data() [2/2]

auto nngn::Generator::release_data ( void  )
inline

◆ set_gain() [1/2]

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

◆ set_gain() [2/2]

bool nngn::Generator::set_gain ( float  g)

◆ set_loop() [1/2]

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

◆ set_loop() [2/2]

bool nngn::Generator::set_loop ( bool  b)

◆ set_mute() [1/2]

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

◆ set_mute() [2/2]

bool nngn::Generator::set_mute ( bool  b)

◆ set_param() [1/2]

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

◆ set_param() [2/2]

void nngn::Generator::set_param ( float  p)
inline

◆ set_rewind() [1/2]

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

◆ set_rewind() [2/2]

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

◆ stop() [1/2]

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

◆ stop() [2/2]

bool nngn::Generator::stop ( void  )
inline
Here is the call 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: