SOUND4 IMPACT.CL Library [1.3.6]
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions | Variables
sound4::impact Namespace Reference

Namespaces

namespace  dyn
 
namespace  helper
 

Classes

class  CInstance
 Instance handling class. More...
 
class  CPresetLoader
 Custom preset handler helper. More...
 

Typedefs

using SampleFormat = impact_SampleFormat
 
using LogSeverity = impact_LogSeverity
 
using log_cb_t = std::function< void(LogSeverity, const std::string &)>
 
using PresetChange_Kind = impact_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 (impact_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.CL"
 
static constexpr const char * process_shortname = "impact"
 
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

impact namespace

Typedef Documentation

◆ log_cb_t

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

Log callback type

Definition at line 395 of file sound4.impact.cl.hpp.

◆ LogSeverity

Log Severity levels

Definition at line 391 of file sound4.impact.cl.hpp.

◆ PresetChange_Kind

Definition at line 461 of file sound4.impact.cl.hpp.

◆ SampleFormat

Definition at line 53 of file sound4.impact.cl.hpp.

Function Documentation

◆ _log_cb_c()

static void sound4::impact::_log_cb_c ( impact_LogSeverity  severity,
const char *  c_msg 
)
inlinestatic

Definition at line 402 of file sound4.impact.cl.hpp.

◆ GetAudioInputCount()

static unsigned int sound4::impact::GetAudioInputCount ( )
inlinestatic

Get the number of inputs for this process

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

Definition at line 301 of file sound4.impact.cl.hpp.

◆ GetAudioOutputCount()

static unsigned int sound4::impact::GetAudioOutputCount ( )
inlinestatic

Get the number of outputs for this process

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

Definition at line 313 of file sound4.impact.cl.hpp.

◆ GetBytesFromFormat()

static unsigned int sound4::impact::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 383 of file sound4.impact.cl.hpp.

◆ GetChannelCount()

static unsigned int sound4::impact::GetChannelCount ( )
inlinestatic

Get the number of channels needed by this process

Returns
The process channels count

Definition at line 289 of file sound4.impact.cl.hpp.

◆ GetChunkSizeInFrames()

static unsigned int sound4::impact::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 262 of file sound4.impact.cl.hpp.

◆ GetFormatFromName()

static SampleFormat sound4::impact::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 372 of file sound4.impact.cl.hpp.

◆ GetFormatName()

static std::string sound4::impact::GetFormatName ( const SampleFormat  fmt)
inlinestatic

Convert format to string

Parameters
fmtthe format
Returns
the string name of the format

Definition at line 361 of file sound4.impact.cl.hpp.

◆ GetPossibleChunkSizeInFrames()

static std::vector< unsigned int > sound4::impact::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 275 of file sound4.impact.cl.hpp.

◆ GetSampleRate()

static unsigned int sound4::impact::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 325 of file sound4.impact.cl.hpp.

◆ GetVersion()

static std::string sound4::impact::GetVersion ( )
inlinestatic

Get the process version string

Returns
version string

Definition at line 247 of file sound4.impact.cl.hpp.

◆ SanityCheck()

static void sound4::impact::SanityCheck ( bool  a_bCheckFrames = true)
inlinestatic

Checks for library compatibility with const/defines

Throws std::runtime_error on failure

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

◆ SetLoggerCallback()

static void sound4::impact::SetLoggerCallback ( log_cb_t  cb)
inlinestatic

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

Definition at line 416 of file sound4.impact.cl.hpp.

◆ SetLogSeverity()

static void sound4::impact::SetLogSeverity ( LogSeverity  severity)
inlinestatic

Sets the log severity (global)

Definition at line 409 of file sound4.impact.cl.hpp.

Variable Documentation

◆ _log_cb

log_cb_t sound4::impact::_log_cb
static

internal helpers for C log callbacks

Definition at line 400 of file sound4.impact.cl.hpp.

◆ ChunkFrames

const size_t sound4::impact::ChunkFrames = 64

Number of frames in a chunk

Deprecated:
use GetPossibleChunkSizeInFrames

Definition at line 58 of file sound4.impact.cl.hpp.

◆ InputChannels

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

Number of float values in an input frame

Deprecated:
Use GetChannelCount and GetAudioInputCount

Definition at line 63 of file sound4.impact.cl.hpp.

◆ InputSampleSize

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

Number of float values for an input chunk

Deprecated:
Use GetPossibleChunkSizeInFrames and GetAudioInputCount

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

◆ OutputChannels

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

Number of float values in an output frame

Deprecated:
Use GetChannelCount and GetAudioOutputCount

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

◆ OutputSampleSize

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

Number of float values for an output chunk

Deprecated:
Use GetPossibleChunkSizeInFrames and GetAudioOutputCount

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

◆ process_name

constexpr const char* sound4::impact::process_name = "SOUND4 IMPACT.CL"
staticconstexpr

Definition at line 51 of file sound4.impact.cl.hpp.

◆ process_shortname

constexpr const char* sound4::impact::process_shortname = "impact"
staticconstexpr

Definition at line 52 of file sound4.impact.cl.hpp.

◆ SampleRate

const size_t sound4::impact::SampleRate = 48000

Sample rate of library

Deprecated:
Use GetSampleRate

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