mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
Resolves implicit type conversion warnings.
This commit is contained in:
parent
90856a0e7a
commit
337cb4fb86
@ -125,7 +125,7 @@ template <bool is_stereo> void AY38910::get_samples(std::size_t number_of_sample
|
|||||||
if constexpr (is_stereo) {
|
if constexpr (is_stereo) {
|
||||||
reinterpret_cast<uint32_t *>(target)[c] = output_volume_;
|
reinterpret_cast<uint32_t *>(target)[c] = output_volume_;
|
||||||
} else {
|
} else {
|
||||||
target[c] = output_volume_;
|
target[c] = int16_t(output_volume_);
|
||||||
}
|
}
|
||||||
master_divider_++;
|
master_divider_++;
|
||||||
c++;
|
c++;
|
||||||
@ -171,7 +171,7 @@ template <bool is_stereo> void AY38910::get_samples(std::size_t number_of_sample
|
|||||||
if constexpr (is_stereo) {
|
if constexpr (is_stereo) {
|
||||||
reinterpret_cast<uint32_t *>(target)[c] = output_volume_;
|
reinterpret_cast<uint32_t *>(target)[c] = output_volume_;
|
||||||
} else {
|
} else {
|
||||||
target[c] = output_volume_;
|
target[c] = int16_t(output_volume_);
|
||||||
}
|
}
|
||||||
c++;
|
c++;
|
||||||
master_divider_++;
|
master_divider_++;
|
||||||
@ -235,7 +235,7 @@ template <bool is_stereo> void AY38910::evaluate_output_volume() {
|
|||||||
volumes_[volumes[2]] * channel_levels[2] * c_right_
|
volumes_[volumes[2]] * channel_levels[2] * c_right_
|
||||||
) >> 8);
|
) >> 8);
|
||||||
} else {
|
} else {
|
||||||
output_volume_ = int16_t(
|
output_volume_ = uint32_t(
|
||||||
volumes_[volumes[0]] * channel_levels[0] +
|
volumes_[volumes[0]] * channel_levels[0] +
|
||||||
volumes_[volumes[1]] * channel_levels[1] +
|
volumes_[volumes[1]] * channel_levels[1] +
|
||||||
volumes_[volumes[2]] * channel_levels[2]
|
volumes_[volumes[2]] * channel_levels[2]
|
||||||
|
@ -52,7 +52,7 @@ class FIRFilter {
|
|||||||
inline short apply(const short *src, size_t stride = 1) const {
|
inline short apply(const short *src, size_t stride = 1) const {
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
short result;
|
short result;
|
||||||
vDSP_dotpr_s1_15(filter_coefficients_.data(), 1, src, stride, &result, filter_coefficients_.size());
|
vDSP_dotpr_s1_15(filter_coefficients_.data(), 1, src, vDSP_Stride(stride), &result, filter_coefficients_.size());
|
||||||
return result;
|
return result;
|
||||||
#else
|
#else
|
||||||
int outputValue = 0;
|
int outputValue = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user