diff options
author | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2022-07-17 00:48:45 +0200 |
---|---|---|
committer | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2022-07-22 02:11:32 +0200 |
commit | 458da8a94877677f086f06cdeecf959ec4283a33 (patch) | |
tree | 583166d77602ad90a0d552f37de8729ad80fd6c1 /src/audio_core/memory_pool.cpp | |
parent | Merge pull request #8598 from Link4565/recv-dontwait (diff) | |
download | yuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar yuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar.gz yuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar.bz2 yuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar.lz yuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar.xz yuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar.zst yuzu-458da8a94877677f086f06cdeecf959ec4283a33.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio_core/memory_pool.cpp | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/audio_core/memory_pool.cpp b/src/audio_core/memory_pool.cpp deleted file mode 100644 index 627e5f15e..000000000 --- a/src/audio_core/memory_pool.cpp +++ /dev/null @@ -1,60 +0,0 @@ - -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "audio_core/memory_pool.h" -#include "common/logging/log.h" - -namespace AudioCore { - -ServerMemoryPoolInfo::ServerMemoryPoolInfo() = default; -ServerMemoryPoolInfo::~ServerMemoryPoolInfo() = default; - -bool ServerMemoryPoolInfo::Update(const InParams& in_params, OutParams& out_params) { - // Our state does not need to be changed - if (in_params.state != State::RequestAttach && in_params.state != State::RequestDetach) { - return true; - } - - // Address or size is null - if (in_params.address == 0 || in_params.size == 0) { - LOG_ERROR(Audio, "Memory pool address or size is zero! address={:X}, size={:X}", - in_params.address, in_params.size); - return false; - } - - // Address or size is not aligned - if ((in_params.address % 0x1000) != 0 || (in_params.size % 0x1000) != 0) { - LOG_ERROR(Audio, "Memory pool address or size is not aligned! address={:X}, size={:X}", - in_params.address, in_params.size); - return false; - } - - if (in_params.state == State::RequestAttach) { - cpu_address = in_params.address; - size = in_params.size; - used = true; - out_params.state = State::Attached; - } else { - // Unexpected address - if (cpu_address != in_params.address) { - LOG_ERROR(Audio, "Memory pool address differs! Expecting {:X} but address is {:X}", - cpu_address, in_params.address); - return false; - } - - if (size != in_params.size) { - LOG_ERROR(Audio, "Memory pool size differs! Expecting {:X} but size is {:X}", size, - in_params.size); - return false; - } - - cpu_address = 0; - size = 0; - used = false; - out_params.state = State::Detached; - } - return true; -} - -} // namespace AudioCore |