Files
dolphin/Source/Core/Core/HW/AudioInterface.h
CasualPokePlayer 4234b25682 Do not directly store input sample rate, rather just store a divisor for that sample rate, with it using a fixed dividend of 54000000 * 2.
This should reduce (but not completely eliminate) gradual audio desyncs in dumps. This also allows for accurate sample rates for the GameCube.
Completely eliminating gradual audio desyncs will require resampling to an integer sample rate, as nothing seems to support a non-integer sample rate.
2022-07-03 15:07:06 -07:00

36 lines
717 B
C++

// Copyright 2008 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// See CPP file for comments.
#pragma once
#include "Common/CommonTypes.h"
class PointerWrap;
namespace MMIO
{
class Mapping;
}
namespace AudioInterface
{
void Init();
void Shutdown();
void DoState(PointerWrap& p);
bool IsPlaying();
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
// Get the audio rate divisors (divisors for 48KHz or 32KHz only)
// Mixer::FIXED_SAMPLE_RATE_DIVIDEND will be the dividend used for these divisors
u32 GetAIDSampleRateDivisor();
u32 GetAISSampleRateDivisor();
u32 Get32KHzSampleRateDivisor();
u32 Get48KHzSampleRateDivisor();
void GenerateAISInterrupt();
} // namespace AudioInterface