mirror of
https://github.com/libretro/parallel-gx1.git
synced 2026-11-07 04:26:01 -10:00
Waits that polled now block on an eventcount that the waited-on thread notifies: - Booting in dual core waits for the CPU thread to reach its run loop instead of polling every millisecond. - AsyncShaderCompiler::WaitUntilCompletion wakes as each worker finishes an item instead of every 33 ms. Timed sleeps go through Common::SleepUntil and SleepCurrentThreadUs, built on retro_sleep_us: the CoreTiming throttle, PrecisionTimer, real Wiimote report pacing, Bluetooth timed transfers, the Linux L2CAP connect retry and the BBA read thread's idle wait. FrameTiming::ThrottleFrame had no callers and is deleted.
42 lines
1.0 KiB
C++
42 lines
1.0 KiB
C++
#include <libretro.h>
|
|
#include <atomic>
|
|
#include "Core/State.h"
|
|
#include "Core/System.h"
|
|
#include "AudioCommon/SoundStream.h"
|
|
#include "Common/Options.h"
|
|
|
|
namespace Libretro
|
|
{
|
|
extern double g_core_refresh_rate;
|
|
namespace Audio
|
|
{
|
|
extern retro_audio_sample_batch_t batch_cb;
|
|
static constexpr unsigned int DEFAULT_SAMPLE_RATE = 48000;
|
|
static constexpr unsigned int LEGACY_DEFAULT_SAMPLE_RATE = 32000;
|
|
|
|
void Reset();
|
|
void Init();
|
|
unsigned int GetCoreSampleRate();
|
|
unsigned int GetRetroSampleRate();
|
|
unsigned int GetActiveSampleRate();
|
|
} // namespace Audio
|
|
|
|
namespace FrameTiming
|
|
{
|
|
extern std::atomic<retro_usec_t> target_frame_duration_usec;
|
|
extern std::atomic<retro_usec_t> measured_frame_duration_usec;
|
|
extern bool g_have_frame_time_cb;
|
|
|
|
void Init();
|
|
void Reset();
|
|
bool IsEnabled();
|
|
void CheckForFastForwarding();
|
|
bool IsFastForwarding();
|
|
} // namespace FrameTiming
|
|
|
|
} // namespace Libretro
|
|
|
|
void retroarch_audio_cb();
|
|
void retroarch_audio_state_cb(bool enable);
|
|
void retroarch_audio_buffer_status_cb(bool active, unsigned occupancy, bool underrun);
|