early-access version 2834
This commit is contained in:
parent
75f8ee434e
commit
5c0ee5eba6
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2833.
|
This is the source code for early-access 2834.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -774,10 +774,6 @@ void CommandGenerator::GenerateDeviceSinkCommand(const s16 buffer_offset, SinkIn
|
|||||||
if (render_context.channels == 2 && parameter.downmix_enabled) {
|
if (render_context.channels == 2 && parameter.downmix_enabled) {
|
||||||
command_buffer.GenerateDownMix6chTo2chCommand(InvalidNodeId, parameter.inputs,
|
command_buffer.GenerateDownMix6chTo2chCommand(InvalidNodeId, parameter.inputs,
|
||||||
buffer_offset, parameter.downmix_coeff);
|
buffer_offset, parameter.downmix_coeff);
|
||||||
} else if (render_context.channels == 2 && parameter.input_count == 6) {
|
|
||||||
constexpr std::array<f32, 4> default_coeffs{{1.0f, 0.707f, 0.251f, 0.707f}};
|
|
||||||
command_buffer.GenerateDownMix6chTo2chCommand(InvalidNodeId, parameter.inputs,
|
|
||||||
buffer_offset, default_coeffs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.upsampler_info != nullptr) {
|
if (state.upsampler_info != nullptr) {
|
||||||
|
@ -235,10 +235,24 @@ public:
|
|||||||
|
|
||||||
for (u32 read_index = 0, write_index = 0; read_index < samples.size();
|
for (u32 read_index = 0, write_index = 0; read_index < samples.size();
|
||||||
read_index += system_channels, write_index += device_channels) {
|
read_index += system_channels, write_index += device_channels) {
|
||||||
new_samples[write_index + static_cast<u32>(Channels::FrontLeft)] =
|
const auto left_sample{static_cast<s16>(std::clamp(
|
||||||
samples[read_index + static_cast<u32>(Channels::FrontLeft)];
|
static_cast<s32>(
|
||||||
|
static_cast<f32>(
|
||||||
|
samples[read_index + static_cast<u32>(Channels::FrontLeft)]) *
|
||||||
|
volume),
|
||||||
|
min, max))};
|
||||||
|
|
||||||
|
new_samples[write_index + static_cast<u32>(Channels::FrontLeft)] = left_sample;
|
||||||
|
|
||||||
|
const auto right_sample{static_cast<s16>(std::clamp(
|
||||||
|
static_cast<s32>(
|
||||||
|
static_cast<f32>(
|
||||||
|
samples[read_index + static_cast<u32>(Channels::FrontRight)]) *
|
||||||
|
volume),
|
||||||
|
min, max))};
|
||||||
|
|
||||||
new_samples[write_index + static_cast<u32>(Channels::FrontRight)] =
|
new_samples[write_index + static_cast<u32>(Channels::FrontRight)] =
|
||||||
samples[read_index + static_cast<u32>(Channels::FrontRight)];
|
right_sample;
|
||||||
}
|
}
|
||||||
samples = std::move(new_samples);
|
samples = std::move(new_samples);
|
||||||
|
|
||||||
|
@ -208,10 +208,24 @@ public:
|
|||||||
|
|
||||||
for (u32 read_index = 0, write_index = 0; read_index < samples.size();
|
for (u32 read_index = 0, write_index = 0; read_index < samples.size();
|
||||||
read_index += system_channels, write_index += device_channels) {
|
read_index += system_channels, write_index += device_channels) {
|
||||||
new_samples[write_index + static_cast<u32>(Channels::FrontLeft)] =
|
const auto left_sample{static_cast<s16>(std::clamp(
|
||||||
samples[read_index + static_cast<u32>(Channels::FrontLeft)];
|
static_cast<s32>(
|
||||||
|
static_cast<f32>(
|
||||||
|
samples[read_index + static_cast<u32>(Channels::FrontLeft)]) *
|
||||||
|
volume),
|
||||||
|
min, max))};
|
||||||
|
|
||||||
|
new_samples[write_index + static_cast<u32>(Channels::FrontLeft)] = left_sample;
|
||||||
|
|
||||||
|
const auto right_sample{static_cast<s16>(std::clamp(
|
||||||
|
static_cast<s32>(
|
||||||
|
static_cast<f32>(
|
||||||
|
samples[read_index + static_cast<u32>(Channels::FrontRight)]) *
|
||||||
|
volume),
|
||||||
|
min, max))};
|
||||||
|
|
||||||
new_samples[write_index + static_cast<u32>(Channels::FrontRight)] =
|
new_samples[write_index + static_cast<u32>(Channels::FrontRight)] =
|
||||||
samples[read_index + static_cast<u32>(Channels::FrontRight)];
|
right_sample;
|
||||||
}
|
}
|
||||||
samples = std::move(new_samples);
|
samples = std::move(new_samples);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user