Skip to content

Return empty/dummy file for directories [CORRECTIVE]

Matti Tiainen requested to merge mvtiaine/uade:fix-suntronic-customs into master

Some SunTronic customs currently play incorrectly as the samples do not get loaded. For example zoids.src first tries to load/access the instr/ directory and that fails. Returning a dummy/empty file instead makes them play correctly.

Before:

uade123 -v zoids.src 

Content recognized: CUST (zoids.src)
Content recognized: CUST (zoids.src)
Player candidate: custom
score path /usr/local/share/uade/score
Got Amiga message before playloop: open library dos.library
Amiga requests file: instr/
Can not send file: instr/
Got Amiga message before playloop: filesize: file not found: instr/
Got Amiga message before playloop: InitPlayer function returned fail

subsong: 0 from range [0, 0]
Player: zoids.src (16392 bytes)
Song: zoids.src (16392 bytes)
Format name: 
Module name: 
Player name: SunTronic
uade_logs: {'uadecore:audio_start_time': 0.13}

After

uade123 -v zoids.src 

Content recognized: CUST (zoids.src)
Content recognized: CUST (zoids.src)
Player candidate: custom
score path /Users/tundrah/dev/prefix//share/uade/score
uadecore: Amiga stack overrun warning.
Got Amiga message before playloop: open library dos.library
Amiga requests file: instr/
uade warning: File (instr/) is a directory
Sending file: instr/
Got Amiga message before playloop: filesize: file instr/ res 0x0
Got Amiga message before playloop: warning: using dos.library/CurrentDir()
Got Amiga message before playloop: warning: fixfilename
Got Amiga message before playloop: instr/rausch2.x
Amiga requests file: instr/rausch2.x
Sending file: instr/rausch2.x
Got Amiga message before playloop: filesize: file instr/rausch2.x res 0xec4
Got Amiga message before playloop: read: instr/rausch2.x dst 0x16400 off 0x0 len 0xf2a bytesread 0xec4
Got Amiga message before playloop: warning: fixfilename
Got Amiga message before playloop: instr/drum.x
Amiga requests file: instr/drum.x
Sending file: instr/drum.x
Got Amiga message before playloop: filesize: file instr/drum.x res 0x11d4
Got Amiga message before playloop: read: instr/drum.x dst 0x1732a off 0x0 len 0x11d4 bytesread 0x11d4
Got Amiga message before playloop: warning: fixfilename
Got Amiga message before playloop: instr/zoids.x
Amiga requests file: instr/zoids.x
Sending file: instr/zoids.x
Got Amiga message before playloop: filesize: file instr/zoids.x res 0x8ce0
Got Amiga message before playloop: read: instr/zoids.x dst 0x184fe off 0x0 len 0x8ce0 bytesread 0x8ce0
Got Amiga message before playloop: warning: using dos.library/CurrentDir()

subsong: 0 from range [0, 0]
Player: zoids.src (16392 bytes)
Song: zoids.src (16392 bytes)
Format name: 
Module name: 
Player name: SunTronic
uade_logs: {'uadecore:audio_start_time': 0.13}

Merge request reports