Hi, thanks for making this awesome tool.
I’ve been experimenting with Remote NetMD and encountered an issue when uploading tracks in SP Stereo.
When uploading an SP Stereo track through a Remote NetMD device, the browser encryption worker crashes with:
RangeError: Invalid array length
LP2 uploads work correctly.
The Remote NetMD server receives the SP upload request as:
/upload/.websocket?...&format=SPS
The issue appears to be in src/services/interfaces/remote-netmd.ts.
The remote upload path explicitly converts ATRAC3 formats:
AT3 / 132 → LP2
AT3 / 66 → LP4
However, non-AT3 formats are passed through unchanged. This means SP Stereo remains SPS rather than being converted to the NetMD wire format SP.
Later, the code uses:
WireformatDict[format.codec]
However, WireformatDict contains SP, LP2, LP105, and LP4, but not SPS or SPM.
As a result, an SP Stereo upload attempts to access:
WireformatDict['SPS']
which returns undefined and eventually causes the encryption worker to throw:
RangeError: Invalid array length
I tested the following change:
const format =
_format.codec === 'AT3'
? { codec: _format.bitrate === 66 ? 'LP4' : 'LP2' }
: _format.codec === 'SPS' || _format.codec === 'SPM'
? { codec: 'SP' }
: _format;
After applying this locally and rebuilding Web MiniDisc, an SP Stereo upload completed successfully through Remote NetMD.
I have only directly tested SPS; SPM appears likely to be affected by the same issue.
Thanks!
Hi, thanks for making this awesome tool.
I’ve been experimenting with Remote NetMD and encountered an issue when uploading tracks in SP Stereo.
When uploading an SP Stereo track through a Remote NetMD device, the browser encryption worker crashes with:
RangeError: Invalid array lengthLP2 uploads work correctly.
The Remote NetMD server receives the SP upload request as:
/upload/.websocket?...&format=SPSThe issue appears to be in src/services/interfaces/remote-netmd.ts.
The remote upload path explicitly converts ATRAC3 formats:
AT3 / 132 → LP2
AT3 / 66 → LP4
However, non-AT3 formats are passed through unchanged. This means SP Stereo remains SPS rather than being converted to the NetMD wire format SP.
Later, the code uses:
WireformatDict[format.codec]However, WireformatDict contains SP, LP2, LP105, and LP4, but not SPS or SPM.
As a result, an SP Stereo upload attempts to access:
WireformatDict['SPS']
which returns undefined and eventually causes the encryption worker to throw:
RangeError: Invalid array length
I tested the following change:
After applying this locally and rebuilding Web MiniDisc, an SP Stereo upload completed successfully through Remote NetMD.
I have only directly tested SPS; SPM appears likely to be affected by the same issue.
Thanks!