| ... | ... |
@@ -15,7 +15,7 @@ Player::Player() : prio(0), nTracks(0), tempo(0), tempoCount(0), tempoRate(0), m |
| 15 | 15 |
interpolation(INTERPOLATION_NONE) |
| 16 | 16 |
{
|
| 17 | 17 |
memset(this->trackIds, 0, sizeof(this->trackIds)); |
| 18 |
- for (size_t i = 0; i < 16; ++i) |
|
| 18 |
+ for (int8_t i = 0; i < 16; ++i) |
|
| 19 | 19 |
{
|
| 20 | 20 |
this->channels[i].chnId = i; |
| 21 | 21 |
this->channels[i].ply = this; |
| ... | ... |
@@ -42,7 +42,7 @@ struct PseudoFile |
| 42 | 42 |
arr[i] = this->ReadLE<T>(); |
| 43 | 43 |
} |
| 44 | 44 |
|
| 45 |
- template<size_t N> void ReadLE( uint8_t arr[N]) |
|
| 45 |
+ template<size_t N> void ReadLE(uint8_t arr[N]) |
|
| 46 | 46 |
{
|
| 47 | 47 |
memcpy(&arr[0], &(*this->data)[this->pos], N); |
| 48 | 48 |
this->pos += N; |
| ... | ... |
@@ -217,12 +217,12 @@ inline int Cnv_Sust(int sust) |
| 217 | 217 |
|
| 218 | 218 |
inline int Cnv_Sine(int arg) |
| 219 | 219 |
{
|
| 220 |
- static const int lut_size = 32; |
|
| 221 | 220 |
static const int8_t lut[] = |
| 222 | 221 |
{
|
| 223 | 222 |
0, 6, 12, 19, 25, 31, 37, 43, 49, 54, 60, 65, 71, 76, 81, 85, 90, 94, |
| 224 | 223 |
98, 102, 106, 109, 112, 115, 117, 120, 122, 123, 125, 126, 126, 127, 127 |
| 225 | 224 |
}; |
| 225 |
+ static const int lut_size = sizeof(lut) / sizeof(int8_t); |
|
| 226 | 226 |
|
| 227 | 227 |
if (arg < lut_size) |
| 228 | 228 |
return lut[arg]; |