- [WAV File in] Fix file reading error.

This commit is contained in:
Tanasart 2024-06-25 13:58:15 +07:00
parent 6dc56388de
commit ce9c4b0715
6 changed files with 96 additions and 1 deletions

View File

@ -1652,6 +1652,7 @@
{"name":"s_node_3d_sphere_ico","order":15,"path":"sprites/s_node_3d_sphere_ico/s_node_3d_sphere_ico.yy",},
{"name":"s_node_3d_sphere_uv","order":16,"path":"sprites/s_node_3d_sphere_uv/s_node_3d_sphere_uv.yy",},
{"name":"s_node_3d_sphere","order":8,"path":"sprites/s_node_3d_sphere/s_node_3d_sphere.yy",},
{"name":"s_node_3d_stack_slice","order":32,"path":"sprites/s_node_3d_stack_slice/s_node_3d_stack_slice.yy",},
{"name":"s_node_3d_transform_scene","order":22,"path":"sprites/s_node_3d_transform_scene/s_node_3d_transform_scene.yy",},
{"name":"s_node_3d_transform","order":4,"path":"sprites/s_node_3d_transform/s_node_3d_transform.yy",},
{"name":"s_node_ace","order":61,"path":"sprites/s_node_ace/s_node_ace.yy",},

View File

@ -2195,6 +2195,7 @@
{"id":{"name":"s_node_3d_sphere_ico","path":"sprites/s_node_3d_sphere_ico/s_node_3d_sphere_ico.yy",},},
{"id":{"name":"s_node_3d_sphere_uv","path":"sprites/s_node_3d_sphere_uv/s_node_3d_sphere_uv.yy",},},
{"id":{"name":"s_node_3d_sphere","path":"sprites/s_node_3d_sphere/s_node_3d_sphere.yy",},},
{"id":{"name":"s_node_3d_stack_slice","path":"sprites/s_node_3d_stack_slice/s_node_3d_stack_slice.yy",},},
{"id":{"name":"s_node_3d_transform_scene","path":"sprites/s_node_3d_transform_scene/s_node_3d_transform_scene.yy",},},
{"id":{"name":"s_node_3d_transform","path":"sprites/s_node_3d_transform/s_node_3d_transform.yy",},},
{"id":{"name":"s_node_9patch","path":"sprites/s_node_9patch/s_node_9patch.yy",},},

View File

@ -89,6 +89,7 @@ function file_read_wav(path) {
content.packet = bits;
printIf(global.FLAG.wav_import, debug_str);
print($"Reading buffer {bits} pack from data length {l} with remaining data {_buffer_left}");
return content;
}
@ -103,7 +104,8 @@ function file_read_wav_step() {
else if(content.bit_depth == 16) { bf_type = buffer_s16; lim = 32_768; }
else if(content.bit_depth == 32) { bf_type = buffer_s32; lim = 2_147_483_648; }
for(; wav_file_prg < content.packet; wav_file_prg++ ) {
// print($"Reading {wav_file_prg} to {content.packet} ({content.packet - wav_file_prg}) with remaining data {(buffer_get_size(wav_file_reader) - buffer_tell(wav_file_reader)) / (content.bit_depth / 8)}");
while(wav_file_prg < content.packet) {
var ch = 0;
var cha = content.channels;
var j = 0;
@ -116,6 +118,7 @@ function file_read_wav_step() {
}
content.soundF[0][wav_file_prg] = ch / content.channels;
wav_file_prg++;
if(current_time - t > 1000 / 30) return false;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,90 @@
{
"$GMSprite":"",
"%Name":"s_node_3d_stack_slice",
"bboxMode":0,
"bbox_bottom":60,
"bbox_left":1,
"bbox_right":62,
"bbox_top":3,
"collisionKind":1,
"collisionTolerance":0,
"DynamicTexturePage":false,
"edgeFiltering":false,
"For3D":false,
"frames":[
{"$GMSpriteFrame":"","%Name":"549edffd-9fc0-45db-8e73-40427c866f2e","name":"549edffd-9fc0-45db-8e73-40427c866f2e","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
],
"gridX":0,
"gridY":0,
"height":64,
"HTile":false,
"layers":[
{"$GMImageLayer":"","%Name":"4f1ea2f4-b418-4333-9d11-8579b39fdbf8","blendMode":0,"displayName":"default","isLocked":false,"name":"4f1ea2f4-b418-4333-9d11-8579b39fdbf8","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
],
"name":"s_node_3d_stack_slice",
"nineSlice":null,
"origin":4,
"parent":{
"name":"3D",
"path":"folders/nodes/icons/3D.yy",
},
"preMultiplyAlpha":false,
"resourceType":"GMSprite",
"resourceVersion":"2.0",
"sequence":{
"$GMSequence":"",
"%Name":"s_node_3d_stack_slice",
"autoRecord":true,
"backdropHeight":768,
"backdropImageOpacity":0.5,
"backdropImagePath":"",
"backdropWidth":1366,
"backdropXOffset":0.0,
"backdropYOffset":0.0,
"events":{
"$KeyframeStore<MessageEventKeyframe>":"",
"Keyframes":[],
"resourceType":"KeyframeStore<MessageEventKeyframe>",
"resourceVersion":"2.0",
},
"eventStubScript":null,
"eventToFunction":{},
"length":1.0,
"lockOrigin":false,
"moments":{
"$KeyframeStore<MomentsEventKeyframe>":"",
"Keyframes":[],
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
"resourceVersion":"2.0",
},
"name":"s_node_3d_stack_slice",
"playback":1,
"playbackSpeed":30.0,
"playbackSpeedType":0,
"resourceType":"GMSequence",
"resourceVersion":"2.0",
"showBackdrop":true,
"showBackdropImage":false,
"timeUnits":1,
"tracks":[
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"549edffd-9fc0-45db-8e73-40427c866f2e","path":"sprites/s_node_3d_stack_slice/s_node_3d_stack_slice.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
},"Disabled":false,"id":"626bcbe7-74cf-416d-8c0f-abf2b90c3799","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
],
"visibleRange":null,
"volume":1.0,
"xorigin":32,
"yorigin":32,
},
"swatchColours":null,
"swfPrecision":0.5,
"textureGroupId":{
"name":"Default",
"path":"texturegroups/Default",
},
"type":0,
"VTile":false,
"width":64,
}