disable keyboard repeat on Windows

add some TinyAudio classes to play wav, mostly from Stk (http://github.com/thestk/stk)
This commit is contained in:
Erwin Coumans
2017-04-26 21:31:01 -07:00
parent 8cc1f51862
commit 943dd16e78
18 changed files with 1452 additions and 57 deletions

View File

@@ -0,0 +1,59 @@
#ifndef B3_SWAP_UTILS_H
#define B3_SWAP_UTILS_H
inline void b3Swap16(unsigned char *ptr)
{
unsigned char val;
// Swap 1st and 2nd bytes
val = *(ptr);
*(ptr) = *(ptr+1);
*(ptr+1) = val;
}
inline void b3Swap32(unsigned char *ptr)
{
unsigned char val;
// Swap 1st and 4th bytes
val = *(ptr);
*(ptr) = *(ptr+3);
*(ptr+3) = val;
//Swap 2nd and 3rd bytes
ptr += 1;
val = *(ptr);
*(ptr) = *(ptr+1);
*(ptr+1) = val;
}
inline void b3Swap64(unsigned char *ptr)
{
unsigned char val;
// Swap 1st and 8th bytes
val = *(ptr);
*(ptr) = *(ptr + 7);
*(ptr + 7) = val;
// Swap 2nd and 7th bytes
ptr += 1;
val = *(ptr);
*(ptr) = *(ptr + 5);
*(ptr + 5) = val;
// Swap 3rd and 6th bytes
ptr += 1;
val = *(ptr);
*(ptr) = *(ptr + 3);
*(ptr + 3) = val;
// Swap 4th and 5th bytes
ptr += 1;
val = *(ptr);
*(ptr) = *(ptr + 1);
*(ptr + 1) = val;
}
#endif //B3_SWAP_UTILS_H