HolyLib Wiki

IGModAudioChannel:CreateEncoder

 IGModAudioChannelEncoder, string IGModAudioChannel:CreateEncoder( string fileName, number bassFlags )

Description

Creates a encoder and returns it, on failure it returns nil with the second return value containing the error reason
You can still provide a full filename into which the channel its bound to is slowly written
unlike IGModAudioChannel:EncodeToDisk this works on non-decode channels though it written bit by bit as the channel plays.
Valid encoders are:

  • wav (Requires BASSENC plugin)
  • aiff (Requires BASSENC plugin)
  • mp3 (Requires BASSENC_MP3 plugin)
  • ogg (Requires BASSENC_OGG plugin)
  • opus (Requires BASSENC_OPUS plugin)
  • flac (Requires BASSENC_FLAC plugin)

    This function requires the BASSENC plugin to work at all!
    You can find all the plugins at https://www.un4seen.com/ drop them into the bin/ folder besides libbass.so

    Recently Added

    This was recently added in version (0.8 - DEV).

Arguments

1string fileName
2number bassFlags

Returns

1IGModAudioChannelEncoder encoder

nil on failure

2string errMsg = nil