Remove Host::UpdateSound

This commit is contained in:
Henrik Rydgård 2023-03-25 08:13:55 +01:00
parent 67353e8f0b
commit 5e36acb9eb
4 changed files with 4 additions and 24 deletions

View File

@ -56,12 +56,14 @@ std::atomic_flag atomicLock_;
FixedSizeQueue<s16, 32768 * 8> chanSampleQueues[PSP_AUDIO_CHANNEL_MAX + 1];
int eventAudioUpdate = -1;
// TODO: This is now useless and should be removed. Just scared of breaking states.
int eventHostAudioUpdate = -1;
int mixFrequency = 44100;
int srcFrequency = 0;
const int hwSampleRate = 44100;
const int hwBlockSize = 64;
static int audioIntervalCycles;
@ -88,10 +90,6 @@ static void hleAudioUpdate(u64 userdata, int cyclesLate) {
static void hleHostAudioUpdate(u64 userdata, int cyclesLate) {
CoreTiming::ScheduleEvent(audioHostIntervalCycles - cyclesLate, eventHostAudioUpdate, 0);
// Not all hosts need this call to poke their audio system once in a while, but those that don't
// can just ignore it.
host->UpdateSound();
}
static void __AudioCPUMHzChange() {

View File

@ -27,8 +27,6 @@ class Host {
public:
virtual ~Host() {}
virtual void UpdateSound() {} // still needed for libretro, will need a proper effort.
virtual void NotifyUserMessage(const std::string &message, float duration = 1.0f, u32 color = 0x00FFFFFF, const char *id = nullptr) {}
virtual void SendDebugOutput(const std::string &output) {}

View File

@ -25,23 +25,7 @@
class QtHost : public Host {
public:
QtHost(MainWindow *mainWindow_)
{
mainWindow = mainWindow_;
}
void UpdateSound() override {}
void PrepareShutdown() {
auto fn = SymbolMapFilename(PSP_CoreParameter().fileToStart);
g_symbolMap->SaveSymbolMap(fn);
}
void NotifyUserMessage(const std::string &message, float duration = 1.0f, u32 color = 0x00FFFFFF, const char *id = nullptr) override {
osm.Show(message, duration, color, -1, true, id);
}
private:
Path SymbolMapFilename(Path currentFilename);
MainWindow* mainWindow;
};

View File

@ -864,7 +864,7 @@ int main(int argc, char *argv[])
g_mainWindow = new MainWindow(nullptr, g_Config.UseFullScreen());
g_mainWindow->show();
if (host == nullptr) {
host = new QtHost(g_mainWindow);
host = new QtHost();
}
// TODO: Support other backends than GL, like Vulkan, in the Qt backend.