SOUND4 IMPACT FM.CL Library [2.0.3]
Loading...
Searching...
No Matches
sound4::impactfm Namespace Reference

Namespaces

namespace  helper
namespace  dyn

Classes

class  CPresetLoader
 Custom preset handler helper. More...
class  CInstance
 Instance handling class. More...
class  CAudioConverter
 Audio converter 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 ()
static unsigned int GetChunkSizeInFrames ()
static std::vector< unsigned int > GetPossibleChunkSizeInFrames ()
static unsigned int GetChannelCount ()
static unsigned int GetAudioInputCount ()
static unsigned int GetAudioOutputCount ()
static unsigned int GetSampleRate ()
static void SanityCheck (bool a_bCheckFrames=true)
static std::string GetFormatName (const SampleFormat fmt)
static SampleFormat GetFormatFromName (const std::string &name)
static unsigned int GetBytesFromFormat (const SampleFormat fmt)
static void _log_cb_c (impactfm_LogSeverity severity, const char *c_msg)
static void SetLogSeverity (LogSeverity severity)
static void SetLoggerCallback (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

impactfm namespace

Typedef Documentation

◆ log_cb_t

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

Log callback type

Definition at line 405 of file sound4.impactfm.cl.hpp.

◆ LogSeverity

Log Severity levels

Definition at line 401 of file sound4.impactfm.cl.hpp.

◆ PresetChange_Kind

◆ SampleFormat

Function Documentation

◆ _log_cb_c()

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

Definition at line 412 of file sound4.impactfm.cl.hpp.

◆ GetAudioInputCount()

unsigned int sound4::impactfm::GetAudioInputCount ( )
inlinestatic

Get the number of inputs for this process

Remarks
All inputs have GetChannelCount() channels
Returns
The process input count

Definition at line 311 of file sound4.impactfm.cl.hpp.

◆ GetAudioOutputCount()

unsigned int sound4::impactfm::GetAudioOutputCount ( )
inlinestatic

Get the number of outputs for this process

Remarks
All outputs have GetChannelCount() channels
Returns
The process outputs count

Definition at line 323 of file sound4.impactfm.cl.hpp.

◆ GetBytesFromFormat()

unsigned int sound4::impactfm::GetBytesFromFormat ( const SampleFormat fmt)
inlinestatic

Get the format byte size

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

Definition at line 393 of file sound4.impactfm.cl.hpp.

◆ GetChannelCount()

unsigned int sound4::impactfm::GetChannelCount ( )
inlinestatic

Get the number of channels needed by this process

Returns
The process channels count

Definition at line 299 of file sound4.impactfm.cl.hpp.

◆ GetChunkSizeInFrames()

unsigned int sound4::impactfm::GetChunkSizeInFrames ( )
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
Returns
The process chunk size in frame
Deprecated
Use GetPossibleChunkSizeInFrames

Definition at line 272 of file sound4.impactfm.cl.hpp.

◆ GetFormatFromName()

SampleFormat sound4::impactfm::GetFormatFromName ( const std::string & name)
inlinestatic

Convert string to format

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

Definition at line 382 of file sound4.impactfm.cl.hpp.

◆ GetFormatName()

std::string sound4::impactfm::GetFormatName ( const SampleFormat fmt)
inlinestatic

Convert format to string

Parameters
fmtthe format
Returns
the string name of the format

Definition at line 371 of file sound4.impactfm.cl.hpp.

◆ GetPossibleChunkSizeInFrames()

std::vector< unsigned int > sound4::impactfm::GetPossibleChunkSizeInFrames ( )
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
Returns
An vector of possible process chunk size in frame

Definition at line 285 of file sound4.impactfm.cl.hpp.

◆ GetSampleRate()

unsigned int sound4::impactfm::GetSampleRate ( )
inlinestatic

Get the processing sample-rate

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

Definition at line 335 of file sound4.impactfm.cl.hpp.

◆ GetVersion()

std::string sound4::impactfm::GetVersion ( )
inlinestatic

Get the process version string

Returns
version string

Definition at line 257 of file sound4.impactfm.cl.hpp.

◆ SanityCheck()

void sound4::impactfm::SanityCheck ( bool a_bCheckFrames = true)
inlinestatic

Checks for library compatibility with const/defines

Throws std::runtime_error on failure

Definition at line 345 of file sound4.impactfm.cl.hpp.

◆ SetLoggerCallback()

void sound4::impactfm::SetLoggerCallback ( log_cb_t cb)
inlinestatic

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

Definition at line 426 of file sound4.impactfm.cl.hpp.

◆ SetLogSeverity()

void sound4::impactfm::SetLogSeverity ( LogSeverity severity)
inlinestatic

Sets the log severity (global)

Definition at line 419 of file sound4.impactfm.cl.hpp.

Variable Documentation

◆ _log_cb

log_cb_t sound4::impactfm::_log_cb
static

internal helpers for C log callbacks

Definition at line 410 of file sound4.impactfm.cl.hpp.

◆ ChunkFrames

const size_t sound4::impactfm::ChunkFrames = 64

Number of frames in a chunk

Deprecated
use GetPossibleChunkSizeInFrames

Definition at line 68 of file sound4.impactfm.cl.hpp.

◆ InputChannels

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

Number of float values in an input frame

Deprecated
Use GetChannelCount and GetAudioInputCount

Definition at line 73 of file sound4.impactfm.cl.hpp.

◆ InputSampleSize

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

Number of float values for an input chunk

Deprecated
Use GetPossibleChunkSizeInFrames and GetAudioInputCount

Definition at line 83 of file sound4.impactfm.cl.hpp.

◆ OutputChannels

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

Number of float values in an output frame

Deprecated
Use GetChannelCount and GetAudioOutputCount

Definition at line 78 of file sound4.impactfm.cl.hpp.

◆ OutputSampleSize

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

Number of float values for an output chunk

Deprecated
Use GetPossibleChunkSizeInFrames and GetAudioOutputCount

Definition at line 88 of file sound4.impactfm.cl.hpp.

◆ process_name

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

Definition at line 61 of file sound4.impactfm.cl.hpp.

◆ process_shortname

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

Definition at line 62 of file sound4.impactfm.cl.hpp.

◆ SampleRate

const size_t sound4::impactfm::SampleRate = 48000

Sample rate of library

Deprecated
Use GetSampleRate

Definition at line 93 of file sound4.impactfm.cl.hpp.