azahar/src/audio_core/libretro_sink.h
Eric Warmenhoven d9b77cc21e
Implement libretro core (#1215)
* libretro core

* Bringing citra libretro implementation over
* libretro: hook up vulkan renderer
* libretro: github actions
* libretro: gyro
* libretro: core options v2
* libretro: on ios turn off shader jit if unavailable
* moltenvk 1.3.0 introduces 8-bit indexes but allocates 16-bit for metal; this ends up allocating stream buffer * 2 = 132MiB. Instead, just use 16-bit indexes. (This will be necessary for standalone when bumping moltenvk version.)

* libretro core: address review feedback

* libretro: microphone support

* cmake: Add ENABLE_ROOM_STANDALONE to list of incompatible libretro flags

* libretro: proper initial geometry

* libretro: fix software renderer

* libretro: address review feedback

* .github/libretro.yml: Pin macOS runners at macOS 26

* ci: Remove explicit selection of Xcode 16.0

* .github/libretro.yml: remove unnecessary windows builder apt commands

* .github/libretro.yml: bump min macos version to 11.0

* ci: Re-enable CI jobs for all libretro cores

This is under the condition that we don't introduce build cache for these builds

---------

Co-authored-by: OpenSauce04 <opensauce04@gmail.com>
Co-authored-by: PabloMK7 <hackyglitch2@gmail.com>
2026-02-19 22:30:25 +00:00

33 lines
819 B
C++

// Copyright Citra Emulator Project / Azahar Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <cstddef>
#include <string>
#include <vector>
#include "audio_core/sink.h"
namespace AudioCore {
class LibRetroSink final : public Sink {
public:
explicit LibRetroSink(std::string target_device_name);
~LibRetroSink() override;
unsigned int GetNativeSampleRate() const override;
// Not used for immediate submission sinks
void SetCallback(std::function<void(s16*, std::size_t)> cb) override {};
bool ImmediateSubmission() override {
return true;
}
void PushSamples(const void* data, std::size_t num_samples) override;
};
std::vector<std::string> ListLibretroSinkDevices();
} // namespace AudioCore