Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
resampler_config.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Roc Streaming authors
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
8 
9 //! @file roc_audio/resampler_config.h
10 //! @brief Resampler config.
11 
12 #ifndef ROC_AUDIO_RESAMPLER_CONFIG_H_
13 #define ROC_AUDIO_RESAMPLER_CONFIG_H_
14 
16 
17 namespace roc {
18 namespace audio {
19 
20 //! Resampler backends.
22  //! Default backend.
23  //! Resolved to one of other backends, depending on what
24  //! is enabled at build time.
26 
27  //! Built-in resampler.
28  //! High precision, high quality, slow.
30 
31  //! SpeexDSP resampler.
32  //! Low precision, high quality, fast.
33  //! May be disabled at build time.
35 
36  //! Combined SpeexDSP + decimating resampler.
37  //! Tolerable precision, tolerable quality, fast.
38  //! May be disabled at build time.
40 };
41 
42 //! Resampler parameters presets.
44  //! Low quality, fast speed.
46 
47  //! Medium quality, medium speed.
49 
50  //! High quality, low speed.
52 };
53 
54 //! Resampler config.
56  //! Resampler backend.
58 
59  //! Resampler profile.
61 
65  }
66 
67  //! Automatically fill missing settings.
68  void deduce_defaults(LatencyTunerBackend latency_backend,
69  LatencyTunerProfile latency_tuner);
70 };
71 
72 //! Get string name of resampler backend.
74 
75 //! Get string name of resampler profile.
77 
78 } // namespace audio
79 } // namespace roc
80 
81 #endif // ROC_AUDIO_RESAMPLER_CONFIG_H_
Latency tuner.
LatencyTunerBackend
Latency tuner backend. Defines which latency we monitor and tune to achieve target.
Definition: latency_tuner.h:29
ResamplerBackend
Resampler backends.
@ ResamplerBackend_SpeexDec
Combined SpeexDSP + decimating resampler. Tolerable precision, tolerable quality, fast....
@ ResamplerBackend_Builtin
Built-in resampler. High precision, high quality, slow.
@ ResamplerBackend_Default
Default backend. Resolved to one of other backends, depending on what is enabled at build time.
@ ResamplerBackend_Speex
SpeexDSP resampler. Low precision, high quality, fast. May be disabled at build time.
const char * resampler_backend_to_str(ResamplerBackend backend)
Get string name of resampler backend.
ResamplerProfile
Resampler parameters presets.
@ ResamplerProfile_Low
Low quality, fast speed.
@ ResamplerProfile_High
High quality, low speed.
@ ResamplerProfile_Medium
Medium quality, medium speed.
LatencyTunerProfile
Latency tuner profile. Defines whether and how we tune latency on fly to compensate clock drift and j...
Definition: latency_tuner.h:47
const char * resampler_profile_to_str(ResamplerProfile profile)
Get string name of resampler profile.
Root namespace.
ResamplerBackend backend
Resampler backend.
ResamplerProfile profile
Resampler profile.
void deduce_defaults(LatencyTunerBackend latency_backend, LatencyTunerProfile latency_tuner)
Automatically fill missing settings.