src/sndfile

Search:
Group by:
Source   Edit  

Types

SFAmbisonic {.pure, size: 4.} = enum
  NONE = 64, B_FORMAT = 65
Source   Edit  
SFBitrateMode {.pure, size: 4.} = enum
  CONSTANT, AVERAGE, VARIABLE
Source   Edit  
SFBool {.pure, size: 4.} = enum
  FALSE, TRUE
Source   Edit  
SFBroadcastInfo = object
  description*: array[256, char]
  originator*: array[32, char]
  originatorReference*: array[32, char]
  originationDate*: array[10, char]
  originationTime*: array[8, char]
  timeReferenceLow*: uint32
  timeReferenceHigh*: uint32
  version*: cshort
  umid*: array[64, char]
  loudnessValue*: int16
  loudnessRange*: int16
  maxTruePeakLevel*: int16
  maxMomentaryLoudness*: int16
  maxShorttermLoudness*: int16
  reserved*: array[180, byte]
  codingHistorySize*: uint32
  codingHistory*: array[codingHistSize, char]
Source   Edit  
SFCartInfo = object
  version*: array[4, char]
  title*: array[64, char]
  artist*: array[64, char]
  cutId*: array[64, char]
  clientId*: array[64, char]
  category*: array[64, char]
  classification*: array[64, char]
  outCue*: array[64, char]
  startDate*: array[10, char]
  startTime*: array[8, char]
  endDate*: array[10, char]
  endTime*: array[8, char]
  producerAppId*: array[64, char]
  producerAppVersion*: array[64, char]
  userDef*: array[64, char]
  levelReference*: int32
  postTimers*: array[8, SFCartTimer]
  reserved*: array[276, char]
  url*: array[1024, char]
  tagTextSize*: uint32
  tagText*: array[maxTagTextSize, char]
Source   Edit  
SFCartTimer = object
  usage*: array[4, char]
  value*: int32
Source   Edit  
SFChannelMode {.pure, size: 4.} = enum
  INVALID, MONO, LEFT, RIGHT, CENTER, FRONT_LEFT, FRONT_RIGHT, FRONT_CENTER,
  REAR_CENTER, REAR_LEFT, REAR_RIGHT, LFE, FRONT_LEFT_OF_CENTER,
  FRONT_RIGHT_OF_CENTER, SIDE_LEFT, SIDE_RIGHT, TOP_CENTER, TOP_FRONT_LEFT,
  TOP_FRONT_RIGHT, TOP_FRONT_CENTER, TOP_REAR_LEFT, TOP_REAR_RIGHT,
  TOP_REAR_CENTER, AMBISONIC_B_W, AMBISONIC_B_X, AMBISONIC_B_Y, AMBISONIC_B_Z,
  MAX
Source   Edit  
SFCommand {.pure, size: 4.} = enum
  GET_LIB_VERSION = 4096, GET_LOG_INFO = 4097, GET_CURRENT_SF_INFO = 4098,
  GET_NORM_DOUBLE = 4112, GET_NORM_FLOAT = 4113, SET_NORM_DOUBLE = 4114,
  SET_NORM_FLOAT = 4115, SET_SCALE_FLOAT_INT_READ = 4116,
  SET_SCALE_INT_FLOAT_WRITE = 4117, GET_SIMPLE_FORMAT_COUNT = 4128,
  GET_SIMPLE_FORMAT = 4129, GET_FORMAT_INFO = 4136,
  GET_FORMAT_MAJOR_COUNT = 4144, GET_FORMAT_MAJOR = 4145,
  GET_FORMAT_SUBTYPE_COUNT = 4146, GET_FORMAT_SUBTYPE = 4147,
  CALC_SIGNAL_MAX = 4160, CALC_NORM_SIGNAL_MAX = 4161,
  CALC_MAX_ALL_CHANNELS = 4162, CALC_NORM_MAX_ALL_CHANNELS = 4163,
  GET_SIGNAL_MAX = 4164, GET_MAX_ALL_CHANNELS = 4165, SET_ADD_PEAK_CHUNK = 4176,
  SET_ADD_HEADER_PAD_CHUNK = 4177, UPDATE_HEADER_NOW = 4192,
  SET_UPDATE_HEADER_AUTO = 4193, FILE_TRUNCATE = 4224,
  SET_RAW_START_OFFSET = 4240, SET_DITHER_ON_WRITE = 4256,
  SET_DITHER_ON_READ = 4257, GET_DITHER_INFO_COUNT = 4258,
  GET_DITHER_INFO = 4259, GET_EMBED_FILE_INFO = 4272, SET_CLIPPING = 4288,
  GET_CLIPPING = 4289, GET_INSTRUMENT = 4304, SET_INSTRUMENT = 4305,
  GET_LOOP_INFO = 4320, GET_BROADCAST_INFO = 4336, SET_BROADCAST_INFO = 4337,
  GET_CHANNEL_MAP_INFO = 4352, SET_CHANNEL_MAP_INFO = 4353,
  RAW_DATA_NEEDS_ENDSWAP = 4368, WAVEX_SET_AMBISONIC = 4608,
  WAVEX_GET_AMBISONIC = 4609, RF64_AUTO_DOWNGRADE = 4624,
  SET_VBR_ENCODING_QUALITY = 4864, SET_COMPRESSION_LEVEL = 4865,
  SET_OGG_PAGE_LATENCY_MS = 4866, SET_OGG_PAGE_LATENCY = 4867,
  GET_OGG_STREAM_SERIALNO = 4870, GET_BITRATE_MODE = 4868,
  SET_BITRATE_MODE = 4869, SET_CART_INFO = 5120, GET_CART_INFO = 5121,
  SET_ORIGINAL_SAMPLERATE = 5376, GET_ORIGINAL_SAMPLERATE = 5377,
  TEST_IEEE_FLOAT_REPLACE = 24577
Source   Edit  
SFCount = int64
Source   Edit  
SFCuePoint = object
  indx*: int32
  position*: uint32
  fccChunk*: int32
  chunkStart*: int32
  blockStart*: int32
  sampleOffset*: uint32
  name*: array[256, char]
Source   Edit  
SFEmbedFileInfo = object
  offset*: SFCount
  length*: SFCount
Source   Edit  
SFEndian {.pure, size: 4.} = enum
  FILE = 0, LITTLE = 268435456, BIG = 536870912, CPU = 805306368
Source   Edit  
SFErr {.pure, size: 4.} = enum
  NO_ERROR, UNRECOGNISED_FORMAT, SYSTEM, MALFORMED_FILE, UNSUPPORTED_ENCODING
Source   Edit  
SFFormat {.pure, size: 4.} = enum
  PCM_S8 = 1, PCM_16 = 2, PCM_24 = 3, PCM_32 = 4, PCM_U8 = 5, FLOAT = 6,
  DOUBLE = 7, ULAW = 16, ALAW = 17, IMA_ADPCM = 18, MS_ADPCM = 19, GSM610 = 32,
  VOX_ADPCM = 33, NMS_ADPCM_16 = 34, NMS_ADPCM_24 = 35, NMS_ADPCM_32 = 36,
  G721_32 = 48, G723_24 = 49, G723_40 = 50, DWVW_12 = 64, DWVW_16 = 65,
  DWVW_24 = 66, DWVW_N = 67, DPCM_8 = 80, DPCM_16 = 81, VORBIS = 96, OPUS = 100,
  ALAC_16 = 112, ALAC_20 = 113, ALAC_24 = 114, ALAC_32 = 115,
  MPEG_LAYER_I = 128, MPEG_LAYER_II = 129, MPEG_LAYER_III = 130, WAV = 65536,
  AIFF = 131072, AU = 196608, RAW = 262144, PAF = 327680, SVX = 393216,
  NIST = 458752, VOC = 524288, IRCAM = 655360, W64 = 720896, MAT4 = 786432,
  MAT5 = 851968, PVF = 917504, XI = 983040, HTK = 1048576, SDS = 1114112,
  AVR = 1179648, WAVEX = 1245184, SD2 = 1441792, FLAC = 1507328, CAF = 1572864,
  WVE = 1638400, OGG = 2097152, MPC2K = 2162688, RF64 = 2228224
Source   Edit  
SFFormatInfo = object
  format*: cint
  name*: cstring
  extension*: cstring
Source   Edit  
SFFormatMask {.pure, size: 4.} = enum
  SUBMASK = 65535, TYPEMASK = 268369920, ENDMASK = 805306368
Source   Edit  
SFInfo = object
  frames*: SFCount
  samplerate*: cint
  channels*: cint
  format*: cint
  sections*: cint
  seekable*: cint
Source   Edit  
SFInstrument = object
  basenote*: byte
  detune*: byte
  velocityLo*: byte
  velocityHi*: byte
  keyLo*: byte
  keyHi*: byte
  loopCount*: cint
  loops*: array[16, SFLoop]
Source   Edit  
SFLoop = object
  mode*: SFLoopMode
  startPos*: uint32
  endPos*: uint32
  count*: uint32
Source   Edit  
SFLoopInfo = object
  timeSigNum*: cshort
  timeSigDen*: cshort
  loopMode*: SFLoopMode
  numBeats*: cint
  bpm*: cfloat
  rootKey*: cint
  future*: array[6, cint]
Source   Edit  
SFLoopMode {.pure, size: 4.} = enum
  NONE = 800, FORWARD, BACKWARD, ALTERNATING
Source   Edit  
SFMode {.pure, size: 4.} = enum
  READ = 16, WRITE = 32, RDWR = 48
Source   Edit  
SFSeek {.pure, size: 4.} = enum
  SET, CUR, END
Source   Edit  
SFStrType {.pure, size: 4.} = enum
  TITLE = 1, COPYRIGHT = 2, SOFTWARE = 3, ARTIST = 4, COMMENT = 5, DATE = 6,
  ALBUM = 7, LICENSE = 8, TRACKNUMBER = 9, GENRE = 16
Source   Edit  
SndFile = distinct object
Source   Edit  

Procs

proc close(sndfile: ptr SndFile): cint {.cdecl, dynlib: soname,
    importc: "sf_close", discardable, ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc command(sndfile: ptr SndFile; cmd: SFCommand; data: pointer; datasize: cint): cint {.
    cdecl, dynlib: soname, importc: "sf_command", discardable, ...raises: [],
    tags: [], forbids: [].}
Source   Edit  
proc currentByterate(sndfile: ptr SndFile): cint {.cdecl, dynlib: soname,
    importc: "sf_current_byterate", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc error(sndfile: ptr SndFile): cint {.cdecl, dynlib: soname,
    importc: "sf_error", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc errorNumber(errnum: int): cstring {.cdecl, dynlib: soname,
    importc: "sf_error_number", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc formatCheck(info: ptr SFInfo): SFBool {.cdecl, dynlib: soname,
    importc: "sf_format_check", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc getString(sndfile: ptr SndFile; str_type: SFStrType): cstring {.cdecl,
    dynlib: soname, importc: "sf_get_string", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc open(path: cstring; mode: SFMode; sfinfo: ptr SFInfo): ptr SndFile {.cdecl,
    dynlib: soname, importc: "sf_open", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc readDouble(sndfile: ptr SndFile; buffer_ptr: ptr cdouble; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_read_double", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc readFDouble(sndfile: ptr SndFile; buffer_ptr: ptr cdouble; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_readf_double", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc readFFloat(sndfile: ptr SndFile; buffer_ptr: ptr cfloat; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_readf_float", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc readFInt(sndfile: ptr SndFile; buffer_ptr: ptr cint; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_readf_int", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc readFloat(sndfile: ptr SndFile; buffer_ptr: ptr cfloat; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_read_float", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc readFShort(sndfile: ptr SndFile; buffer_ptr: ptr cshort; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_readf_short", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc readInt(sndfile: ptr SndFile; buffer_ptr: ptr cint; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_read_int", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc readShort(sndfile: ptr SndFile; buffer_ptr: ptr cshort; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_read_short", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc seek(sndfile: ptr SndFile; frames: SFCount; whence: SFSeek): SFCount {.
    cdecl, dynlib: soname, importc: "sf_seek", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc setString(sndfile: ptr SndFile; str_type: SFStrType; str: cstring): cint {.
    cdecl, dynlib: soname, importc: "sf_set_string", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc strError(sndfile: ptr SndFile): cstring {.cdecl, dynlib: soname,
    importc: "sf_strerror", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc versionString(): cstring {.cdecl, dynlib: soname,
                                importc: "sf_version_string", ...raises: [],
                                tags: [], forbids: [].}
Source   Edit  
proc writeDouble(sndfile: ptr SndFile; buffer_ptr: ptr cdouble; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_write_double", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc writeFDouble(sndfile: ptr SndFile; buffer_ptr: ptr cdouble; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_writef_double", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc writeFFloat(sndfile: ptr SndFile; buffer_ptr: ptr cfloat; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_writef_float", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc writeFInt(sndfile: ptr SndFile; buffer_ptr: ptr cint; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_writef_int", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc writeFloat(sndfile: ptr SndFile; buffer_ptr: ptr cfloat; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_write_float", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc writeFShort(sndfile: ptr SndFile; buffer_ptr: ptr cshort; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_writef_short", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc writeInt(sndfile: ptr SndFile; buffer_ptr: ptr cint; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_write_int", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc writeShort(sndfile: ptr SndFile; buffer_ptr: ptr cshort; items: SFCount): SFCount {.
    cdecl, dynlib: soname, importc: "sf_write_short", ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc writeSync(sndfile: ptr SndFile) {.cdecl, dynlib: soname,
                                       importc: "sf_write_sync", ...raises: [],
                                       tags: [], forbids: [].}
Source   Edit