summaryrefslogtreecommitdiff
path: root/src/audio_core/time_stretch.h
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2016-09-21 11:29:48 -0700
committerGravatar GitHub2016-09-21 11:29:48 -0700
commitd5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a (patch)
tree8a22ca73ff838f3f0090b29a548ae81087fc90ed /src/audio_core/time_stretch.h
parentREADME: Specify master branch for Travis CI badge (diff)
parentFix Travis clang-format check (diff)
downloadyuzu-d5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a.tar.gz
yuzu-d5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a.tar.xz
yuzu-d5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a.zip
Merge pull request #2086 from linkmauve/clang-format
Add clang-format as part of our {commit,travis}-time checks
Diffstat (limited to 'src/audio_core/time_stretch.h')
-rw-r--r--src/audio_core/time_stretch.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/audio_core/time_stretch.h b/src/audio_core/time_stretch.h
index 1fde3f72a..fa81718ed 100644
--- a/src/audio_core/time_stretch.h
+++ b/src/audio_core/time_stretch.h
@@ -5,7 +5,6 @@
5#include <cstddef> 5#include <cstddef>
6#include <memory> 6#include <memory>
7#include <vector> 7#include <vector>
8
9#include "common/common_types.h" 8#include "common/common_types.h"
10 9
11namespace AudioCore { 10namespace AudioCore {
@@ -37,7 +36,8 @@ public:
37 /** 36 /**
38 * Does audio stretching and produces the time-stretched samples. 37 * Does audio stretching and produces the time-stretched samples.
39 * Timer calculations use sample_delay to determine how much of a margin we have. 38 * Timer calculations use sample_delay to determine how much of a margin we have.
40 * @param sample_delay How many samples are buffered downstream of this module and haven't been played yet. 39 * @param sample_delay How many samples are buffered downstream of this module and haven't been
40 * played yet.
41 * @return Samples to play in interleaved stereo PCM16 format. 41 * @return Samples to play in interleaved stereo PCM16 format.
42 */ 42 */
43 std::vector<s16> Process(size_t sample_delay); 43 std::vector<s16> Process(size_t sample_delay);
@@ -48,7 +48,8 @@ private:
48 48
49 /// INTERNAL: ratio = wallclock time / emulated time 49 /// INTERNAL: ratio = wallclock time / emulated time
50 double CalculateCurrentRatio(); 50 double CalculateCurrentRatio();
51 /// INTERNAL: If we have too many or too few samples downstream, nudge ratio in the appropriate direction. 51 /// INTERNAL: If we have too many or too few samples downstream, nudge ratio in the appropriate
52 /// direction.
52 double CorrectForUnderAndOverflow(double ratio, size_t sample_delay) const; 53 double CorrectForUnderAndOverflow(double ratio, size_t sample_delay) const;
53 /// INTERNAL: Gets the time-stretched samples from SoundTouch. 54 /// INTERNAL: Gets the time-stretched samples from SoundTouch.
54 std::vector<s16> GetSamples(); 55 std::vector<s16> GetSamples();