mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +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) {
|
||||
int16_t output_level[2];
|
||||
struct Frame {
|
||||
int16_t left, right;
|
||||
} output_level;
|
||||
Frame *target_frames = reinterpret_cast<Frame *>(target);
|
||||
|
||||
size_t c = 0;
|
||||
while(c < number_of_samples) {
|
||||
// I'm unclear on the details of the time division multiplexing so,
|
||||
// for now, just sum the outputs.
|
||||
output_level[0] =
|
||||
output_level.left =
|
||||
volume_ *
|
||||
(use_direct_output_[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
|
||||
));
|
||||
|
||||
output_level[1] =
|
||||
output_level.right =
|
||||
volume_ *
|
||||
(use_direct_output_[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) {
|
||||
--global_divider_;
|
||||
*reinterpret_cast<uint32_t *>(&target[c << 1]) = *reinterpret_cast<uint32_t *>(output_level);
|
||||
target_frames[c] = output_level;
|
||||
++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)
|
||||
// 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]];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user