Amiga: validation export sample/wave book
tiny optimization
This commit is contained in:
parent
262eaa19c1
commit
527f962c1b
4 changed files with 192 additions and 24 deletions
|
|
@ -144,6 +144,16 @@ int SafeWriter::writeI(int val) {
|
|||
return write(&val,4);
|
||||
}
|
||||
|
||||
int SafeWriter::writeI_BE(int val) {
|
||||
unsigned char bytes[4] {
|
||||
(unsigned char)((val>>24)&0xff),
|
||||
(unsigned char)((val>>16)&0xff),
|
||||
(unsigned char)((val>>8)&0xff),
|
||||
(unsigned char)(val&0xff)
|
||||
};
|
||||
return write(bytes,4);
|
||||
}
|
||||
|
||||
int SafeWriter::writeL(int64_t val) {
|
||||
return write(&val,8);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue