SOUND4 IMPACT FM.CL Library [2.0.0]
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions | Variables
sound4::impactfm::dyn Namespace Reference

Namespaces

namespace  helper
 

Classes

class  CAudioConverter
 Audio converter helper. More...
 
class  CDynLib
 Dynamic library interface. More...
 
class  CInstance
 Instance handling class. More...
 
class  CPresetLoader
 Custom preset handler helper. More...
 

Typedefs

using SampleFormat = impactfm_SampleFormat
 
using LogSeverity = impactfm_LogSeverity
 
using log_cb_t = std::function< void(LogSeverity, const std::string &)>
 
using PresetChange_Kind = impactfm_PresetChange_Kind
 

Functions

static std::string GetVersion (CDynLib &dynlib)
 
static unsigned int GetChunkSizeInFrames (CDynLib &dynlib)
 
static std::vector< unsigned int > GetPossibleChunkSizeInFrames (CDynLib &dynlib)
 
static unsigned int GetChannelCount (CDynLib &dynlib)
 
static unsigned int GetAudioInputCount (CDynLib &dynlib)
 
static unsigned int GetAudioOutputCount (CDynLib &dynlib)
 
static unsigned int GetSampleRate (CDynLib &dynlib)
 
static void SanityCheck (CDynLib &dynlib, bool a_bCheckFrames=true)
 
static std::string GetFormatName (CDynLib &dynlib, const SampleFormat fmt)
 
static SampleFormat GetFormatFromName (CDynLib &dynlib, const std::string &name)
 
static unsigned int GetBytesFromFormat (CDynLib &dynlib, const SampleFormat fmt)
 
static void _log_cb_c (impactfm_LogSeverity severity, const char *c_msg)
 
static void SetLogSeverity (CDynLib &dynlib, LogSeverity severity)
 
static void SetLoggerCallback (CDynLib &dynlib, log_cb_t cb)
 

Variables

static constexpr const char * process_name = "SOUND4 IMPACT FM.CL"
 
static constexpr const char * process_shortname = "impactfm"
 
const size_t ChunkFrames = 64
 
const size_t InputChannels = 2 * 1
 
const size_t OutputChannels = 2 * 1
 
const size_t InputSampleSize =ChunkFrames*InputChannels
 
const size_t OutputSampleSize =ChunkFrames*OutputChannels
 
const size_t SampleRate = 48000
 
static log_cb_t _log_cb
 

Detailed Description

Dynamic loading namespace

Typedef Documentation

◆ log_cb_t

using sound4::impactfm::dyn::log_cb_t = typedef std::function<void(LogSeverity,const std::string&)>

Log callback type

Definition at line 881 of file sound4.impactfm.cl_dyn.hpp.

◆ LogSeverity

Log Severity levels

Definition at line 877 of file sound4.impactfm.cl_dyn.hpp.

◆ PresetChange_Kind

Definition at line 955 of file sound4.impactfm.cl_dyn.hpp.

◆ SampleFormat

Definition at line 515 of file sound4.impactfm.cl_dyn.hpp.

Function Documentation

◆ _log_cb_c()

static void sound4::impactfm::dyn::_log_cb_c ( impactfm_LogSeverity  severity,
const char *  c_msg 
)
inlinestatic

Definition at line 888 of file sound4.impactfm.cl_dyn.hpp.

◆ GetAudioInputCount()

static unsigned int sound4::impactfm::dyn::GetAudioInputCount ( CDynLib &  dynlib)
inlinestatic

Get the number of inputs for this process

Remarks
All inputs have GetChannelCount() channels
Parameters
dynlibthe dynamic library
Returns
The process input count

Definition at line 780 of file sound4.impactfm.cl_dyn.hpp.

◆ GetAudioOutputCount()

static unsigned int sound4::impactfm::dyn::GetAudioOutputCount ( CDynLib &  dynlib)
inlinestatic

Get the number of outputs for this process

Remarks
All outputs have GetChannelCount() channels
Parameters
dynlibthe dynamic library
Returns
The process outputs count

Definition at line 793 of file sound4.impactfm.cl_dyn.hpp.

◆ GetBytesFromFormat()

static unsigned int sound4::impactfm::dyn::GetBytesFromFormat ( CDynLib &  dynlib,
const SampleFormat  fmt 
)
inlinestatic

Get the format byte size

Parameters
dynlibthe dynamic library
fmtthe format
Returns
the number of bytes used by this format for a single channel audio sample

Definition at line 869 of file sound4.impactfm.cl_dyn.hpp.

◆ GetChannelCount()

static unsigned int sound4::impactfm::dyn::GetChannelCount ( CDynLib &  dynlib)
inlinestatic

Get the number of channels needed by this process

Parameters
dynlibthe dynamic library
Returns
The process channels count

Definition at line 767 of file sound4.impactfm.cl_dyn.hpp.

◆ GetChunkSizeInFrames()

static unsigned int sound4::impactfm::dyn::GetChunkSizeInFrames ( CDynLib &  dynlib)
inlinestatic

Get the default number of frames in a process chunk.

The output will be available only by chunks of this size.

Note
A Frame is a set of GetChannelCount samples
Deprecated:
Use GetPossibleChunkSizeInFrames
Parameters
dynlibthe dynamic library
Returns
The process chunk size in frame

Definition at line 734 of file sound4.impactfm.cl_dyn.hpp.

◆ GetFormatFromName()

static SampleFormat sound4::impactfm::dyn::GetFormatFromName ( CDynLib &  dynlib,
const std::string &  name 
)
inlinestatic

Convert string to format

Parameters
dynlibthe dynamic library
namethe format string
Returns
the matching format, or INVALID_FORMAT if invalid.

Definition at line 857 of file sound4.impactfm.cl_dyn.hpp.

◆ GetFormatName()

static std::string sound4::impactfm::dyn::GetFormatName ( CDynLib &  dynlib,
const SampleFormat  fmt 
)
inlinestatic

Convert format to string

Parameters
dynlibthe dynamic library
fmtthe format
Returns
the string name of the format

Definition at line 845 of file sound4.impactfm.cl_dyn.hpp.

◆ GetPossibleChunkSizeInFrames()

static std::vector< unsigned int > sound4::impactfm::dyn::GetPossibleChunkSizeInFrames ( CDynLib &  dynlib)
inlinestatic

Get the possibles number of frames in a process chunk.

The output will be available only by chunks of this size.

Note
A Frame is a set of GetChannelCount samples
Parameters
dynlibthe dynamic library
Returns
An vector of possible process chunk size in frame

Definition at line 748 of file sound4.impactfm.cl_dyn.hpp.

◆ GetSampleRate()

static unsigned int sound4::impactfm::dyn::GetSampleRate ( CDynLib &  dynlib)
inlinestatic

Get the processing sample-rate

Remarks
For now, always return 48000, but should be checked for backward compatibility
Parameters
dynlibthe dynamic library
Returns
The process sample-rate in Hz

Definition at line 806 of file sound4.impactfm.cl_dyn.hpp.

◆ GetVersion()

static std::string sound4::impactfm::dyn::GetVersion ( CDynLib &  dynlib)
inlinestatic

Get the process version string

Parameters
dynlibthe dynamic library
Returns
version string

Definition at line 718 of file sound4.impactfm.cl_dyn.hpp.

◆ SanityCheck()

static void sound4::impactfm::dyn::SanityCheck ( CDynLib &  dynlib,
bool  a_bCheckFrames = true 
)
inlinestatic

Checks for library compatibility with const/defines

Exceptions
std::runtime_erroron failure
Parameters
dynlibthe dynamic library
a_bCheckFramesif false, do not check chunk size

Definition at line 818 of file sound4.impactfm.cl_dyn.hpp.

◆ SetLoggerCallback()

static void sound4::impactfm::dyn::SetLoggerCallback ( CDynLib &  dynlib,
log_cb_t  cb 
)
inlinestatic

Sets the log callback. If not set, console output will be used.

Definition at line 902 of file sound4.impactfm.cl_dyn.hpp.

◆ SetLogSeverity()

static void sound4::impactfm::dyn::SetLogSeverity ( CDynLib &  dynlib,
LogSeverity  severity 
)
inlinestatic

Sets the log severity (global)

Definition at line 895 of file sound4.impactfm.cl_dyn.hpp.

Variable Documentation

◆ _log_cb

log_cb_t sound4::impactfm::dyn::_log_cb
static

internal helpers for C log callbacks

Definition at line 886 of file sound4.impactfm.cl_dyn.hpp.

◆ ChunkFrames

const size_t sound4::impactfm::dyn::ChunkFrames = 64

Number of frames in a chunk

Deprecated:
use GetPossibleChunkSizeInFrames()

Definition at line 520 of file sound4.impactfm.cl_dyn.hpp.

◆ InputChannels

const size_t sound4::impactfm::dyn::InputChannels = 2 * 1

Number of float values in an input frame

Deprecated:
Use GetChannelCount and GetAudioInputCount

Definition at line 525 of file sound4.impactfm.cl_dyn.hpp.

◆ InputSampleSize

const size_t sound4::impactfm::dyn::InputSampleSize =ChunkFrames*InputChannels

Number of float values for an input chunk

Deprecated:
Use GetPossibleChunkSizeInFrames and GetAudioInputCount

Definition at line 535 of file sound4.impactfm.cl_dyn.hpp.

◆ OutputChannels

const size_t sound4::impactfm::dyn::OutputChannels = 2 * 1

Number of float values in an output frame

Deprecated:
Use GetChannelCount and GetAudioOutputCount

Definition at line 530 of file sound4.impactfm.cl_dyn.hpp.

◆ OutputSampleSize

const size_t sound4::impactfm::dyn::OutputSampleSize =ChunkFrames*OutputChannels

Number of float values for an output chunk

Deprecated:
Use GetPossibleChunkSizeInFrames and GetAudioOutputCount

Definition at line 540 of file sound4.impactfm.cl_dyn.hpp.

◆ process_name

constexpr const char* sound4::impactfm::dyn::process_name = "SOUND4 IMPACT FM.CL"
staticconstexpr

Definition at line 513 of file sound4.impactfm.cl_dyn.hpp.

◆ process_shortname

constexpr const char* sound4::impactfm::dyn::process_shortname = "impactfm"
staticconstexpr

Definition at line 514 of file sound4.impactfm.cl_dyn.hpp.

◆ SampleRate

const size_t sound4::impactfm::dyn::SampleRate = 48000

Sample rate of library

Deprecated:
Use GetSampleRate

Definition at line 545 of file sound4.impactfm.cl_dyn.hpp.