mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Merge pull request #979 from TomHarte/Warnings
Resolve all dangling GCC warnings.
This commit is contained in:
commit
038ed0551e
@ -100,12 +100,16 @@ void Audio::update_channel(int c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Audio::get_samples(std::size_t number_of_samples, int16_t *target) {
|
void Audio::get_samples(std::size_t number_of_samples, int16_t *target) {
|
||||||
int16_t output_level[2];
|
struct Frame {
|
||||||
|
int16_t left, right;
|
||||||
|
} output_level;
|
||||||
|
Frame *target_frames = reinterpret_cast<Frame *>(target);
|
||||||
|
|
||||||
size_t c = 0;
|
size_t c = 0;
|
||||||
while(c < number_of_samples) {
|
while(c < number_of_samples) {
|
||||||
// I'm unclear on the details of the time division multiplexing so,
|
// I'm unclear on the details of the time division multiplexing so,
|
||||||
// for now, just sum the outputs.
|
// for now, just sum the outputs.
|
||||||
output_level[0] =
|
output_level.left =
|
||||||
volume_ *
|
volume_ *
|
||||||
(use_direct_output_[0] ?
|
(use_direct_output_[0] ?
|
||||||
channels_[0].amplitude[0]
|
channels_[0].amplitude[0]
|
||||||
@ -116,7 +120,7 @@ void Audio::get_samples(std::size_t number_of_samples, int16_t *target) {
|
|||||||
noise_.amplitude[0] * noise_.final_output
|
noise_.amplitude[0] * noise_.final_output
|
||||||
));
|
));
|
||||||
|
|
||||||
output_level[1] =
|
output_level.right =
|
||||||
volume_ *
|
volume_ *
|
||||||
(use_direct_output_[1] ?
|
(use_direct_output_[1] ?
|
||||||
channels_[0].amplitude[1]
|
channels_[0].amplitude[1]
|
||||||
@ -129,7 +133,7 @@ void Audio::get_samples(std::size_t number_of_samples, int16_t *target) {
|
|||||||
|
|
||||||
while(global_divider_ && c < number_of_samples) {
|
while(global_divider_ && c < number_of_samples) {
|
||||||
--global_divider_;
|
--global_divider_;
|
||||||
*reinterpret_cast<uint32_t *>(&target[c << 1]) = *reinterpret_cast<uint32_t *>(output_level);
|
target_frames[c] = output_level;
|
||||||
++c;
|
++c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -448,7 +448,7 @@ template <bool has_disk_controller, bool is_6mhz> class ConcreteMachine:
|
|||||||
|
|
||||||
// Dave delays (i.e. those affecting memory areas not associated with Nick)
|
// Dave delays (i.e. those affecting memory areas not associated with Nick)
|
||||||
// are one cycle in 8Mhz mode, two cycles in 12Mhz mode.
|
// are one cycle in 8Mhz mode, two cycles in 12Mhz mode.
|
||||||
dave_delay_ = HalfCycles(2 + (*cycle.value)&2);
|
dave_delay_ = HalfCycles(2 + ((*cycle.value)&2));
|
||||||
|
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user