early-access version 2950

This commit is contained in:
pineappleEA 2022-09-15 04:48:53 +02:00
parent 875eae2c07
commit 52fcc73bd4
7 changed files with 42 additions and 23 deletions

View File

@ -1,7 +1,7 @@
yuzu emulator early access
=============
This is the source code for early-access 2948.
This is the source code for early-access 2950.
## Legal Notice

28
dist/AppRun vendored Executable file
View File

@ -0,0 +1,28 @@
#!/bin/sh -e
# SPDX-FileCopyrightText: 2022 <djcj@gmx.de>
# SPDX-License-Identifier: MIT
# From: https://github.com/darealshinji/AppImageKit-checkrt
# add your command to execute here
exec=yuzu
cd "$(dirname "$0")"
if [ "x$exec" = "x" ]; then
exec="$(sed -n 's|^Exec=||p' *.desktop | head -1)"
fi
if [ -x "./usr/optional/checkrt" ]; then
extra_libs="$(./usr/optional/checkrt)"
fi
if [ -n "$extra_libs" ]; then
export LD_LIBRARY_PATH="${extra_libs}${LD_LIBRARY_PATH}"
if [ -e "$PWD/usr/optional/exec.so" ]; then
export LD_PRELOAD="$PWD/usr/optional/exec.so:${LD_PRELOAD}"
fi
fi
export SSL_CERT_FILE="$PWD/ca-certificates.pem"
#echo ">>>>> $LD_LIBRARY_PATH"
#echo ">>>>> $LD_PRELOAD"
./usr/bin/$exec "$*"
exit $?

View File

@ -11,7 +11,7 @@
namespace AudioCore::AudioRenderer {
static void SetCompressorEffectParameter(CompressorInfo::ParameterVersion2& params,
static void SetCompressorEffectParameter(const CompressorInfo::ParameterVersion2& params,
CompressorInfo::State& state) {
const auto ratio{1.0f / params.compressor_ratio};
auto makeup_gain{0.0f};
@ -31,9 +31,9 @@ static void SetCompressorEffectParameter(CompressorInfo::ParameterVersion2& para
state.unk_20 = c;
}
static void InitializeCompressorEffect(CompressorInfo::ParameterVersion2& params,
static void InitializeCompressorEffect(const CompressorInfo::ParameterVersion2& params,
CompressorInfo::State& state) {
std::memset(&state, 0, sizeof(CompressorInfo::State));
state = {};
state.unk_00 = 0;
state.unk_04 = 1.0f;
@ -42,7 +42,7 @@ static void InitializeCompressorEffect(CompressorInfo::ParameterVersion2& params
SetCompressorEffectParameter(params, state);
}
static void ApplyCompressorEffect(CompressorInfo::ParameterVersion2& params,
static void ApplyCompressorEffect(const CompressorInfo::ParameterVersion2& params,
CompressorInfo::State& state, bool enabled,
std::vector<std::span<const s32>> input_buffers,
std::vector<std::span<s32>> output_buffers, u32 sample_count) {
@ -103,8 +103,7 @@ static void ApplyCompressorEffect(CompressorInfo::ParameterVersion2& params,
} else {
for (s16 channel = 0; channel < params.channel_count; channel++) {
if (params.inputs[channel] != params.outputs[channel]) {
std::memcpy((char*)output_buffers[channel].data(),
(char*)input_buffers[channel].data(),
std::memcpy(output_buffers[channel].data(), input_buffers[channel].data(),
output_buffers[channel].size_bytes());
}
}

View File

@ -133,10 +133,10 @@ public:
return;
}
paused = false;
if (cubeb_stream_start(stream_backend) != CUBEB_OK) {
LOG_CRITICAL(Audio_Sink, "Error starting cubeb stream");
}
paused = false;
}
/**
@ -149,12 +149,10 @@ public:
return;
}
paused = true;
if (cubeb_stream_stop(stream_backend) != CUBEB_OK) {
LOG_CRITICAL(Audio_Sink, "Error stopping cubeb stream");
}
was_playing.store(!paused);
paused = true;
}
private:

View File

@ -112,8 +112,8 @@ public:
return;
}
SDL_PauseAudioDevice(device, 0);
paused = false;
SDL_PauseAudioDevice(device, 0);
}
/**
@ -124,8 +124,8 @@ public:
if (device == 0 || paused) {
return;
}
SDL_PauseAudioDevice(device, 1);
paused = true;
SDL_PauseAudioDevice(device, 1);
}
private:

View File

@ -220,8 +220,6 @@ protected:
u32 device_channels{2};
/// Is this stream currently paused?
std::atomic<bool> paused{true};
/// Was this stream previously playing?
std::atomic<bool> was_playing{false};
/// Name of this stream
std::string name{};

View File

@ -592,14 +592,10 @@ bool LANDiscovery::IsFlagSet(ScanFilterFlag flag, ScanFilterFlag search_flag) co
}
int LANDiscovery::GetStationCount() const {
int count = 0;
for (const auto& station : stations) {
if (station.GetStatus() != NodeStatus::Disconnected) {
count++;
}
}
return count;
return static_cast<int>(
std::count_if(stations.begin(), stations.end(), [](const auto& station) {
return station.GetStatus() != NodeStatus::Disconnected;
}));
}
MacAddress LANDiscovery::GetFakeMac() const {