Commit 5956f263 authored by James's avatar James
Browse files

Don't resample audio if not needed, submit correct rate to LibRetro

parent f7095ee2
......@@ -9,6 +9,7 @@
#include "common/assert.h"
#include "common/logging/log.h"
#include "core/settings.h"
#include "audio_types.h"
namespace AudioCore {
......@@ -22,7 +23,7 @@ LibRetroSink::LibRetroSink() : impl(std::make_unique<Impl>()) {}
LibRetroSink::~LibRetroSink() {}
unsigned int LibRetroSink::GetNativeSampleRate() const {
return 41000; // We specify this.
return native_sample_rate; // We specify this.
}
std::vector<std::string> LibRetroSink::GetDeviceList() const {
......
......@@ -180,7 +180,7 @@ void EmuWindow_LibRetro::Prepare(bool hasOGL) {
// Update Libretro with our status
struct retro_system_av_info info {};
info.timing.fps = 60.0;
info.timing.sample_rate = 41000;
info.timing.sample_rate = 32728;
info.geometry.aspect_ratio = (float)baseX / (float)baseY;
info.geometry.base_width = baseX;
info.geometry.base_height = baseY;
......
......@@ -145,7 +145,7 @@ void retro_set_input_state(retro_input_state_t cb) {
void retro_get_system_av_info(struct retro_system_av_info* info) {
// These are placeholders until we get control.
info->timing.fps = 60.0;
info->timing.sample_rate = 41000;
info->timing.sample_rate = 32728;
info->geometry.base_width = 400;
info->geometry.base_height = 480;
info->geometry.max_width = 400 * 10;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment