ws-cleanup-types: Types, api, host: honest annotations; return the full annotated value count
This commit is contained in:
1 parent
59a0352ca6
commit
f209801579
22 files changed
+147
-147
No files matched your search
@@ -78,42 +78,42 @@ end
|
||||
local function sampleFormat(comp: string, bits: number): (string?, string?)
|
||||
if comp == "NONE" or comp == "twos" or comp == "" then
|
||||
if bits >= 1 and bits <= 8 then
|
||||
return "s8"
|
||||
return "s8", nil
|
||||
elseif bits <= 16 then
|
||||
return "s16be"
|
||||
return "s16be", nil
|
||||
elseif bits <= 24 then
|
||||
return "s24be"
|
||||
return "s24be", nil
|
||||
elseif bits <= 32 then
|
||||
return "s32be"
|
||||
return "s32be", nil
|
||||
end
|
||||
return nil, "bad sample size " .. bits
|
||||
elseif comp == "sowt" then
|
||||
if bits >= 1 and bits <= 8 then
|
||||
return "s8"
|
||||
return "s8", nil
|
||||
elseif bits <= 16 then
|
||||
return "s16le"
|
||||
return "s16le", nil
|
||||
elseif bits <= 24 then
|
||||
return "s24le"
|
||||
return "s24le", nil
|
||||
elseif bits <= 32 then
|
||||
return "s32le"
|
||||
return "s32le", nil
|
||||
end
|
||||
return nil, "bad sample size " .. bits
|
||||
elseif comp == "raw " then
|
||||
return "u8"
|
||||
return "u8", nil
|
||||
elseif comp == "in24" then
|
||||
return "s24be"
|
||||
return "s24be", nil
|
||||
elseif comp == "in32" then
|
||||
return "s32be"
|
||||
return "s32be", nil
|
||||
elseif comp == "42ni" then
|
||||
return "s32le"
|
||||
return "s32le", nil
|
||||
elseif comp == "fl32" or comp == "FL32" then
|
||||
return "f32be"
|
||||
return "f32be", nil
|
||||
elseif comp == "fl64" or comp == "FL64" then
|
||||
return "f64be"
|
||||
return "f64be", nil
|
||||
elseif comp == "ulaw" or comp == "ULAW" then
|
||||
return "ulaw"
|
||||
return "ulaw", nil
|
||||
elseif comp == "alaw" or comp == "ALAW" then
|
||||
return "alaw"
|
||||
return "alaw", nil
|
||||
end
|
||||
return nil, "compression " .. string.format("%q", comp)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user