Vital
|
Implements utility functions and classes declared in utils.h, including PCM conversion, order encoding/decoding, random generation, etc. More...
#include "utils.h"
Go to the source code of this file.
Namespaces | |
namespace | vital |
Contains classes and functions used within the Vital synthesizer framework. | |
namespace | vital::utils |
A collection of inline helper functions and constants used for SIMD computations, interpolation, and other audio-related utilities. | |
Functions | |
mono_float | vital::utils::encodeOrderToFloat (int *order, int size) |
Encodes a permutation (stored in order ) into a single float. | |
void | vital::utils::decodeFloatToOrder (int *order, mono_float float_code, int size) |
Decodes a float-encoded permutation back into order . | |
void | vital::utils::floatToPcmData (int16_t *pcm_data, const float *float_data, int size) |
Converts floating-point audio data to 16-bit PCM data. | |
void | vital::utils::complexToPcmData (int16_t *pcm_data, const std::complex< float > *complex_data, int size) |
Converts an array of complex floats (magnitude/phase) to PCM data. | |
void | vital::utils::pcmToFloatData (float *float_data, const int16_t *pcm_data, int size) |
Converts 16-bit PCM data to floating-point audio data. | |
void | vital::utils::pcmToComplexData (std::complex< float > *complex_data, const int16_t *pcm_data, int size) |
Converts 16-bit PCM data representing complex info (amp/phase) back to std::complex floats. | |
Variables | |
constexpr float | vital::kPcmScale = 32767.0f |
Scaling for converting float data to 16-bit PCM. | |
constexpr float | vital::kComplexAmplitudePcmScale = 50.0f |
Additional amplitude scale used for complex data to PCM. | |
constexpr float | vital::kComplexPhasePcmScale = 10000.0f |
Additional phase scale used for complex data to PCM. | |
Implements utility functions and classes declared in utils.h, including PCM conversion, order encoding/decoding, random generation, etc.