This commit is contained in:
dimitris-c
2024-05-15 00:10:55 +03:00
parent 539750c0e7
commit 07b4ecd39a
2 changed files with 2 additions and 2 deletions
@@ -101,7 +101,7 @@ enum AudioContent: Int, CaseIterable {
case .nonOptimized:
return URL(string: "https://github.com/dimitris-c/sample-audio/raw/main/bensound-jazzyfrenchy.m4a")!
case .local:
let path = Bundle.main.path(forResource: "bensound-jazzyfrenchy", ofType: "mp3")!
let path = Bundle.main.path(forResource: "bensound-jazzyfrenchy", ofType: "m4a")!
return URL(fileURLWithPath: path)
case .localWave:
let path = Bundle.main.path(forResource: "hipjazz", ofType: "wav")!
@@ -145,7 +145,7 @@ final class Mp4Restructure {
// This atom can be quite large, and may exceed 2^32 bytes, in which case the size field will be set to 1,
// and the header will contain a 64-bit extended size field.
if atomSize == 1 {
atomSize = Int(try getInteger(data: data, offset: atomOffset + 8) as UInt64)
atomSize = Int(try getInteger(data: data, offset: atomOffset + 8) as UInt64)
}
let mdat = MP4Atom(type: atomType, size: atomSize, offset: atomOffset)
atoms.append(mdat)