mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-01 13:58:20 +00:00
Add buffer-length assert; add <tuple> where std::tuple_size is used.
This commit is contained in:
parent
3a26f6b8bf
commit
e6fe36f45c
@ -14,6 +14,7 @@
|
|||||||
#include "../../Outputs/Log.hpp"
|
#include "../../Outputs/Log.hpp"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
using namespace Amiga;
|
using namespace Amiga;
|
||||||
|
|
||||||
@ -100,6 +101,7 @@ void Audio::output() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Left.
|
// Left.
|
||||||
|
static_assert(std::tuple_size<AudioBuffer>::value % 2 == 0);
|
||||||
buffer_[buffer_pointer_][sample_pointer_] = int16_t(
|
buffer_[buffer_pointer_][sample_pointer_] = int16_t(
|
||||||
(
|
(
|
||||||
channels_[1].output_level * channels_[1].output_enabled +
|
channels_[1].output_level * channels_[1].output_enabled +
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
using namespace Amiga;
|
using namespace Amiga;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user