mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
AudioCommon: extract AudioStretcher class for time-stretching
This commit is contained in:
@ -7,12 +7,10 @@
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
|
||||
#include "AudioCommon/AudioStretcher.h"
|
||||
#include "AudioCommon/WaveFile.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
#include <soundtouch/STTypes.h>
|
||||
#include <soundtouch/SoundTouch.h>
|
||||
|
||||
class CMixer final
|
||||
{
|
||||
public:
|
||||
@ -76,17 +74,13 @@ private:
|
||||
u32 m_frac = 0;
|
||||
};
|
||||
|
||||
void StretchAudio(const short* in, unsigned int num_in, short* out, unsigned int num_out);
|
||||
|
||||
MixerFifo m_dma_mixer{this, 32000};
|
||||
MixerFifo m_streaming_mixer{this, 48000};
|
||||
MixerFifo m_wiimote_speaker_mixer{this, 3000};
|
||||
unsigned int m_sampleRate;
|
||||
|
||||
bool m_is_stretching = false;
|
||||
soundtouch::SoundTouch m_sound_touch;
|
||||
double m_stretch_ratio = 1.0;
|
||||
std::array<short, 2> m_last_stretched_sample = {};
|
||||
AudioCommon::AudioStretcher m_stretcher;
|
||||
std::array<short, MAX_SAMPLES * 2> m_stretch_buffer;
|
||||
std::array<float, MAX_SAMPLES * 2> m_float_conversion_buffer;
|
||||
|
||||
|
Reference in New Issue
Block a user