Skip to content
Snippets Groups Projects
Commit f4d364a6 authored by MerryMage's avatar MerryMage
Browse files

DSP/HLE: Audio output

parent 6542c606
No related branches found
No related tags found
No related merge requests found
...@@ -88,6 +88,11 @@ static StereoFrame16 GenerateCurrentFrame() { ...@@ -88,6 +88,11 @@ static StereoFrame16 GenerateCurrentFrame() {
static std::unique_ptr<AudioCore::Sink> sink; static std::unique_ptr<AudioCore::Sink> sink;
static AudioCore::TimeStretcher time_stretcher; static AudioCore::TimeStretcher time_stretcher;
static void OutputCurrentFrame(const StereoFrame16& frame) {
time_stretcher.AddSamples(&frame[0][0], frame.size());
sink->EnqueueSamples(time_stretcher.Process(sink->SamplesInQueue()));
}
// Public Interface // Public Interface
void Init() { void Init() {
...@@ -121,6 +126,8 @@ bool Tick() { ...@@ -121,6 +126,8 @@ bool Tick() {
// TODO: Check dsp::DSP semaphore (which indicates emulated application has finished writing to shared memory region) // TODO: Check dsp::DSP semaphore (which indicates emulated application has finished writing to shared memory region)
current_frame = GenerateCurrentFrame(); current_frame = GenerateCurrentFrame();
OutputCurrentFrame(current_frame);
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment