ws-audio2: merge ws/audio2-tracker (MTM, 669, STM, ULT, OKT, MED, PTM, FAR, UMX; Tracker engine families)
This commit is contained in:
commit
270eccab0f
43 files changed
+4907
-65
No files matched your search
+10
-1
@@ -276,6 +276,9 @@ end
|
||||
-- the embedded parts) when called directly.
|
||||
-- They also see the injected plug-ins as opts.plugins (F.plugins: the B-rep kernel for cad/step) unless given their own.
|
||||
--
|
||||
-- Tracker modules inside other files (music/umx): opts.decodeModule(buf, format?) -> Module | nil, Err, the bytes loaded
|
||||
-- as music (sniffed, or as the given format).
|
||||
--
|
||||
-- Audio tracks of video containers: opts.openAudio(demuxer, track) -> audio Decoder | nil, Err. The track's packets
|
||||
-- become a stream an audio format reads (containers/AudioWrap: PCM -> WAV, Opus / Vorbis -> Ogg, AAC -> ADTS, MP3 /
|
||||
-- FLAC / AC-3 as they are), opened through F.open with that format.
|
||||
@@ -299,7 +302,7 @@ local function openAudio(demuxer: any, track: any): (any, Err.Err?)
|
||||
end
|
||||
|
||||
local function withHooks(o: Options): Options
|
||||
if o.decodeImage ~= nil and o.encodeImage ~= nil and o.plugins ~= nil and o.openAudio ~= nil then
|
||||
if o.decodeImage ~= nil and o.encodeImage ~= nil and o.plugins ~= nil and o.openAudio ~= nil and o.decodeModule ~= nil then
|
||||
return o
|
||||
end
|
||||
local c = table.clone(o)
|
||||
@@ -319,6 +322,12 @@ local function withHooks(o: Options): Options
|
||||
return F.save(img, nil, { format = format, category = "image" })
|
||||
end
|
||||
end
|
||||
if c.decodeModule == nil then
|
||||
-- tracker modules inside other files (music/umx: the module of an Unreal package), as their own format
|
||||
c.decodeModule = function(b: buffer, format: string?): (any, Err.Err?)
|
||||
return F.load(b, { category = "music", format = format })
|
||||
end
|
||||
end
|
||||
return c
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user