Temp commit. Sound

This commit is contained in:
korenkonder
2022-10-03 15:54:28 +03:00
parent 64c1775f92
commit a15befd8fb
232 changed files with 19396 additions and 12396 deletions
+3 -29
View File
@@ -8,18 +8,8 @@
void f2_header_read(stream& s, f2_header* h) {
memset(h, 0, sizeof(f2_header));
switch (s.type) {
case STREAM_FILE:
if (!s.io.stream)
return;
break;
case STREAM_MEMORY:
if (!s.io.data.vec.size())
return;
break;
default:
if (s.check_null())
return;
}
s.read(h, 0x20);
if (h->length == 0x40)
@@ -27,32 +17,16 @@ void f2_header_read(stream& s, f2_header* h) {
}
void f2_header_write(stream& s, f2_header* h, bool extended) {
switch (s.type) {
case STREAM_FILE:
if (!s.io.stream)
return;
break;
case STREAM_MEMORY:
break;
default:
if (s.check_null())
return;
}
h->length = extended ? 0x40 : 0x20;
s.write(h, h->length);
}
void f2_header_write_end_of_container(stream& s, uint32_t depth) {
switch (s.type) {
case STREAM_FILE:
if (!s.io.stream)
return;
break;
case STREAM_MEMORY:
break;
default:
if (s.check_null())
return;
}
f2_header h;
memset(&h, 0, sizeof(f2_header));