|
vdr-plugin-softhddevice-drm-gles 1.6.7
|
Audio Manipulation. More...
#include <audioprocessor.h>
Public Member Functions | |
| cAudioProcessor (const int) | |
| Create a new audio processoror. | |
| void | Normalize (uint16_t *, int) |
| Normalize audio samples. | |
| void | SetNormalizer (int) |
| Set normalize volume parameters. | |
| void | ResetNormalizer (void) |
| void | Compress (uint16_t *, int) |
| Compress audio samples. | |
| void | SetCompressor (int) |
| Set volume compression parameters. | |
| void | ResetCompressor (void) |
| void | SetEqualizer (int[18]) |
| Set equalizer bands. | |
| std::string | GetEqualizerOptions (void) const |
| Get equalizer filter options. | |
| void | Amplify (int16_t *, int, int) |
| Amplify the samples in software. | |
| void | SetAmplifier (int volume) |
Private Attributes | |
| const int | m_bytesPerSample |
| int | m_normalizeCounter |
| normalize sample counter | |
| uint32_t | m_normalizeAverage [NORMALIZE_MAX_INDEX] |
| average of n last normalize sample blocks | |
| int | m_normalizeIndex |
| index into normalize average table | |
| int | m_normalizeReady |
| index normalize counter | |
| int | m_normalizeFactor |
| current normalize factor | |
| int | m_normalizeMaxFactor |
| max. normalize factor | |
| int | m_compressionFactor = 0 |
| current compression factor | |
| int | m_compressionMaxFactor |
| max. compression factor | |
| float | m_equalizerBand [18] |
| equalizer band | |
| int | m_amplifier |
| software volume amplify factor | |
Static Private Attributes | |
| static constexpr int | NORMALIZE_MAX_INDEX = 128 |
| number of normalize average samples | |
| static constexpr int | NORMALIZE_SAMPLES = 4096 |
| number of normalize samples | |
| static constexpr int | NORMALIZE_DEFAULT_FACTOR = 1000 |
| default normalize factor | |
| static constexpr int | NORMALIZE_MIN_FACTOR = 100 |
| min. normalize factor | |
| static constexpr int | COMPRESSION_DEFAULT_FACTOR = 1000 |
| default compression factor | |
| static constexpr int | COMPRESSION_DEFAULT_MAX_FACTOR = 2000 |
| default compression max. factor | |
Audio Manipulation.
Definition at line 24 of file audioprocessor.h.
Create a new audio processoror.
| bytesPerSample | bytes per sampler (hardcoded to 2) |
Definition at line 31 of file audioprocessor.cpp.
Amplify the samples in software.
| samples | sample buffer |
| count | number of bytes in sample buffer |
Definition at line 286 of file audioprocessor.cpp.
References m_amplifier, and m_bytesPerSample.
Referenced by cSoftHdAudio::SendAudio().
Compress audio samples.
| samples | sample buffer |
| count | number of bytes in sample buffer |
Definition at line 144 of file audioprocessor.cpp.
References L_SOUND, LOGDEBUG2, m_bytesPerSample, m_compressionFactor, and m_compressionMaxFactor.
Referenced by cSoftHdAudio::EnqueueFrame().
| std::string cAudioProcessor::GetEqualizerOptions | ( | void | ) | const |
Get equalizer filter options.
Definition at line 257 of file audioprocessor.cpp.
References m_equalizerBand.
Referenced by cSoftHdAudio::InitFilter().
Normalize audio samples.
| samples | sample buffer |
| count | number of bytes in sample buffer |
Definition at line 42 of file audioprocessor.cpp.
References L_SOUND, LOGDEBUG2, m_bytesPerSample, m_normalizeAverage, m_normalizeCounter, m_normalizeFactor, m_normalizeIndex, m_normalizeMaxFactor, m_normalizeReady, NORMALIZE_MAX_INDEX, NORMALIZE_MIN_FACTOR, and NORMALIZE_SAMPLES.
Referenced by cSoftHdAudio::EnqueueFrame().
Definition at line 209 of file audioprocessor.cpp.
References COMPRESSION_DEFAULT_MAX_FACTOR, m_compressionFactor, and m_compressionMaxFactor.
Referenced by cSoftHdAudio::DropAlsaBuffers(), and cSoftHdAudio::FlushAlsaBuffers().
Definition at line 127 of file audioprocessor.cpp.
References m_normalizeAverage, m_normalizeCounter, m_normalizeFactor, m_normalizeReady, NORMALIZE_DEFAULT_FACTOR, and NORMALIZE_MAX_INDEX.
Referenced by cSoftHdAudio::DropAlsaBuffers(), and cSoftHdAudio::FlushAlsaBuffers().
Definition at line 40 of file audioprocessor.h.
References m_amplifier.
Referenced by cSoftHdAudio::SetVolume().
Set volume compression parameters.
| maxfac | max. factor of compression / 1000 |
Definition at line 198 of file audioprocessor.cpp.
References COMPRESSION_DEFAULT_FACTOR, m_compressionFactor, and m_compressionMaxFactor.
Referenced by cSoftHdAudio::SetCompression().
Set equalizer bands.
| band | setting frequenz bands |
Definition at line 222 of file audioprocessor.cpp.
References m_equalizerBand.
Referenced by cSoftHdAudio::SetEqualizer().
Set normalize volume parameters.
| maxfac | max. factor of normalize / 1000 |
Definition at line 122 of file audioprocessor.cpp.
References m_normalizeMaxFactor.
Referenced by cSoftHdAudio::SetNormalize().
default compression factor
Definition at line 58 of file audioprocessor.h.
Referenced by SetCompressor().
default compression max. factor
Definition at line 59 of file audioprocessor.h.
Referenced by ResetCompressor().
|
private |
software volume amplify factor
Definition at line 67 of file audioprocessor.h.
Referenced by Amplify(), and SetAmplifier().
Definition at line 43 of file audioprocessor.h.
Referenced by Amplify(), Compress(), and Normalize().
|
private |
current compression factor
Definition at line 60 of file audioprocessor.h.
Referenced by Compress(), ResetCompressor(), and SetCompressor().
|
private |
max. compression factor
Definition at line 61 of file audioprocessor.h.
Referenced by Compress(), ResetCompressor(), and SetCompressor().
|
private |
equalizer band
Definition at line 64 of file audioprocessor.h.
Referenced by GetEqualizerOptions(), and SetEqualizer().
|
private |
average of n last normalize sample blocks
Definition at line 51 of file audioprocessor.h.
Referenced by Normalize(), and ResetNormalizer().
|
private |
normalize sample counter
Definition at line 50 of file audioprocessor.h.
Referenced by Normalize(), and ResetNormalizer().
|
private |
current normalize factor
Definition at line 54 of file audioprocessor.h.
Referenced by Normalize(), and ResetNormalizer().
|
private |
index into normalize average table
Definition at line 52 of file audioprocessor.h.
Referenced by Normalize().
|
private |
max. normalize factor
Definition at line 55 of file audioprocessor.h.
Referenced by Normalize(), and SetNormalizer().
|
private |
index normalize counter
Definition at line 53 of file audioprocessor.h.
Referenced by Normalize(), and ResetNormalizer().
default normalize factor
Definition at line 48 of file audioprocessor.h.
Referenced by ResetNormalizer().
number of normalize average samples
Definition at line 46 of file audioprocessor.h.
Referenced by Normalize(), and ResetNormalizer().
number of normalize samples
Definition at line 47 of file audioprocessor.h.
Referenced by Normalize().