Added put_8bit for consistency/clarity

This commit is contained in:
bnnm 2016-12-18 12:46:11 +01:00
parent d1dc2b6082
commit ce040bbb36
2 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,10 @@ void interleave_stereo(sample * buffer, int32_t sample_count) {
}
*/
void put_8bit(uint8_t * buf, int8_t i) {
buf[0] = i;
}
void put_16bitLE(uint8_t * buf, int16_t i) {
buf[0] = (i & 0xFF);
buf[1] = i >> 8;

View File

@ -25,6 +25,8 @@ static inline int32_t get_32bitLE(uint8_t * p) {
return (p[0]) | (p[1]<<8) | (p[2]<<16) | (p[3]<<24);
}
void put_8bit(uint8_t * buf, int8_t i);
void put_16bitLE(uint8_t * buf, int16_t i);
void put_32bitLE(uint8_t * buf, int32_t i);