Skip to content

Commit

Permalink
[Sailor VROM] make sample comments mention PCMA/PCMB
Browse files Browse the repository at this point in the history
also might have found a bug in the program (file is not padded to correct length)
  • Loading branch information
freem committed Oct 27, 2015
1 parent 0f03bc6 commit 3dcf788
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions tools/sailorvrom/lua/readme.txt
Expand Up @@ -80,6 +80,10 @@ Many things.
However, I did a quick spot check using the data from smkdan's ADPCM-A demo,
and the file and sample addresses checked out. (Still needs system testing.)

(2015/10/26 edit)
I have managed to make a file that's 31.7KB (ends at $7F00) instead of 32KB
even (ends at $8000). Time to bugcheck!

* Sample size checking (e.g. if something will be too big)
Max size for ADPCM-A targeted WAV files = 4MiB (1MiB when converted)
Max size for ADPCM-B targeted WAV files depends on sampling rate.
Expand Down
8 changes: 4 additions & 4 deletions tools/sailorvrom/lua/svrom.lua
Expand Up @@ -539,7 +539,7 @@ if pcmaListFN then
outSampleFile:write("samples_PCMA:\n")

for k,v in pairs(pcmaFiles) do
outSampleFile:write(string.format("\t%s\t"..valFormat..","..valFormat.."\t; Sample #%i (%s)\n",direc,v.Start,v.End,v.ID,v.File))
outSampleFile:write(string.format("\t%s\t"..valFormat..","..valFormat.."\t; PCMA Sample #%i (%s)\n",direc,v.Start,v.End,v.ID,v.File))
end
outSampleFile:write("\n")
end
Expand All @@ -550,14 +550,14 @@ if pcmbListFN then
outSampleFile:write("samples_PCMB:\n")

for k,v in pairs(pcmbFiles) do
outSampleFile:write(string.format("\t%s\t"..valFormat..","..valFormat.."\t; Sample #%i (%s, %dHz)\n",direc,v.Start,v.End,v.ID,v.File,v.Rate))
outSampleFile:write(string.format("\t%s\t"..valFormat..","..valFormat.."\t; PCMB Sample #%i (%s, %dHz)\n",direc,v.Start,v.End,v.ID,v.File,v.Rate))
end
outSampleFile:write("\n")

outSampleFile:write("; [ADPCM-B Sample Rates]\n")
outSampleFile:write("; [ADPCM-B Default Sample Rates]\n")
outSampleFile:write("rates_PCMB:\n")
for k,v in pairs(pcmbFiles) do
outSampleFile:write(string.format("\t%s\t"..valFormat.."\t; Sample #%i (%s, %dHz)\n",direc,v.DeltaN,v.ID,v.File,v.Rate))
outSampleFile:write(string.format("\t%s\t"..valFormat.."\t; PCMB Sample #%i (%s, %dHz)\n",direc,v.DeltaN,v.ID,v.File,v.Rate))
end
outSampleFile:write("\n")
end
Expand Down

0 comments on commit 3dcf788

Please sign in to comment.