Consts
typeMidi = (mime: (typ: "audio", subType: "midi", value: "audio/midi"), extension: "mid")
typeMp3 = (mime: (typ: "audio", subType: "mpeg", value: "audio/mpeg"), extension: "mp3")
typeM4a = (mime: (typ: "audio", subType: "m4a", value: "audio/m4a"), extension: "m4a")
typeOgg = (mime: (typ: "audio", subType: "ogg", value: "audio/ogg"), extension: "ogg")
typeFlac = (mime: (typ: "audio", subType: "x-flac", value: "audio/x-flac"), extension: "flac")
typeWav = (mime: (typ: "audio", subType: "x-wav", value: "audio/x-wav"), extension: "wav")
typeAmr = (mime: (typ: "audio", subType: "amr", value: "audio/amr"), extension: "amr")
typeAac = (mime: (typ: "audio", subType: "aac", value: "audio/aac"), extension: "aac")
audioMatcher = [((mime: (typ: "audio", subType: "midi", value: "audio/midi"), extension: "mid"), isMidi), (( mime: (typ: "audio", subType: "ogg", value: "audio/ogg"), extension: "ogg"), isOgg), ((mime: (typ: "audio", subType: "x-flac", value: "audio/x-flac"), extension: "flac"), isFlac), (( mime: (typ: "audio", subType: "x-wav", value: "audio/x-wav"), extension: "wav"), isWav), ((mime: (typ: "audio", subType: "amr", value: "audio/amr"), extension: "amr"), isAmr), (( mime: (typ: "audio", subType: "mpeg", value: "audio/mpeg"), extension: "mp3"), isMp3), ((mime: (typ: "audio", subType: "aac", value: "audio/aac"), extension: "aac"), isAac)]
Procs
proc isMp3File(file: string): bool {...}{.raises: [IOError, OSError, Exception], tags: [ ReadDirEffect, ReadIOEffect, WriteIOEffect].}
-
Returns that the file is Mp3 format file or not.
Note: Not available for JS backend.
proc isAacFile(file: string): bool {...}{.raises: [IOError, OSError, Exception], tags: [ ReadDirEffect, ReadIOEffect, WriteIOEffect].}
-
Returns that the file is Aac format file or not.
Note: Not available for JS backend.
proc isWavFile(file: string): bool {...}{.raises: [IOError, OSError, Exception], tags: [ ReadDirEffect, ReadIOEffect, WriteIOEffect].}
-
Returns that the file is Wav format file or not.
Note: Not available for JS backend.
proc isMidiFile(file: string): bool {...}{.raises: [IOError, OSError, Exception], tags: [ ReadDirEffect, ReadIOEffect, WriteIOEffect].}
-
Returns that the file is Midi format file or not.
Note: Not available for JS backend.
proc isOggFile(file: string): bool {...}{.raises: [IOError, OSError, Exception], tags: [ ReadDirEffect, ReadIOEffect, WriteIOEffect].}
-
Returns that the file is Ogg format file or not.
Note: Not available for JS backend.
proc isFlacFile(file: string): bool {...}{.raises: [IOError, OSError, Exception], tags: [ ReadDirEffect, ReadIOEffect, WriteIOEffect].}
-
Returns that the file is Flac format file or not.
Note: Not available for JS backend.
proc isAmrFile(file: string): bool {...}{.raises: [IOError, OSError, Exception], tags: [ ReadDirEffect, ReadIOEffect, WriteIOEffect].}
-
Returns that the file is Amr format file or not.
Note: Not available for JS backend.
Funcs
func isMp3(buf: openArray[byte]): bool {...}{.raises: [], tags: [].}
func isAac(buf: openArray[byte]): bool {...}{.raises: [], tags: [].}
func isWav(buf: openArray[byte]): bool {...}{.raises: [], tags: [].}
func isMidi(buf: openArray[byte]): bool {...}{.raises: [], tags: [].}
- Returns buf matches Midi format magic number.
func isOgg(buf: openArray[byte]): bool {...}{.raises: [], tags: [].}
- Returns buf matches Ogg format magic number.
func isFlac(buf: openArray[byte]): bool {...}{.raises: [], tags: [].}
- Returns buf matches Flac format magic number.
func isAmr(buf: openArray[byte]): bool {...}{.raises: [], tags: [].}
- Returns buf matches Amr format magic number.