diff options
Diffstat (limited to 'src/audio_core/time_stretch.h')
| -rw-r--r-- | src/audio_core/time_stretch.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/audio_core/time_stretch.h b/src/audio_core/time_stretch.h index 1fde3f72a..42a213679 100644 --- a/src/audio_core/time_stretch.h +++ b/src/audio_core/time_stretch.h | |||
| @@ -37,7 +37,8 @@ public: | |||
| 37 | /** | 37 | /** |
| 38 | * Does audio stretching and produces the time-stretched samples. | 38 | * Does audio stretching and produces the time-stretched samples. |
| 39 | * Timer calculations use sample_delay to determine how much of a margin we have. | 39 | * 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. | 40 | * @param sample_delay How many samples are buffered downstream of this module and haven't been |
| 41 | * played yet. | ||
| 41 | * @return Samples to play in interleaved stereo PCM16 format. | 42 | * @return Samples to play in interleaved stereo PCM16 format. |
| 42 | */ | 43 | */ |
| 43 | std::vector<s16> Process(size_t sample_delay); | 44 | std::vector<s16> Process(size_t sample_delay); |
| @@ -48,7 +49,8 @@ private: | |||
| 48 | 49 | ||
| 49 | /// INTERNAL: ratio = wallclock time / emulated time | 50 | /// INTERNAL: ratio = wallclock time / emulated time |
| 50 | double CalculateCurrentRatio(); | 51 | double CalculateCurrentRatio(); |
| 51 | /// INTERNAL: If we have too many or too few samples downstream, nudge ratio in the appropriate direction. | 52 | /// INTERNAL: If we have too many or too few samples downstream, nudge ratio in the appropriate |
| 53 | /// direction. | ||
| 52 | double CorrectForUnderAndOverflow(double ratio, size_t sample_delay) const; | 54 | double CorrectForUnderAndOverflow(double ratio, size_t sample_delay) const; |
| 53 | /// INTERNAL: Gets the time-stretched samples from SoundTouch. | 55 | /// INTERNAL: Gets the time-stretched samples from SoundTouch. |
| 54 | std::vector<s16> GetSamples(); | 56 | std::vector<s16> GetSamples(); |