BASS.NET API for the Un4seen BASS Audio LibraryEncoderFHGAACplus ClassBASS.NET API for the Un4seen BASS Audio Library
Encoder class implementation for FHG Winamp AACplus encoding using "fhgaacenc.exe" (the command-line encoder using the following Winamp DLLs: "enc_fhgaac.dll", "nsutil.dll", "libsndfile-1.dll" and "libmp4v2.dll").
Inheritance Hierarchy

OnlineSystem Object
  Un4seen.Bass.Misc BaseEncoder
    Un4seen.Bass.Misc EncoderFHGAACplus

Namespace: Un4seen.Bass.Misc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.10.4
Syntax

[SerializableAttribute]
public sealed class EncoderFHGAACplus : BaseEncoder
Remarks

This class uses the BASS_CTYPE_STREAM_AAC encoder type.

fhgaacenc (fhgaacenc.exe) must be downloaded separately (e.g. from Onlinehttps://github.com/tmkk/fhgaacenc).

Since "fhgaacenc.exe" also needs the mentioned Winamp DLLs ("enc_fhgaac.dll", "nsutil.dll" and "libmp4v2.dll" as of version 5.62 or above) you also need to install Winamp and copy the Winamp DLLs from the Winamp resp. Winamp/PlugIns folder into the same folder which contains fhgaacenc.exe (or you might also copy "fhgaacenc.exe" and "libsndfile-1.dll" into the Winamp/PlugIns folder).

The FHG Winamp AACPlus library does not support 32-bit floating point sample data as input, so the BASS_ENCODE_FP_32BIT flag will automatically be used.

Make sure to set the AACPlus_xxx flags before retrieving the EncoderCommandLine or calling Start(ENCODEPROC, IntPtr, Boolean).

This implementation uses the automatic DSP system for encoding. Meaning the sending of sample data to the encoder is done automatically when you play the channel (BASS_ChannelPlay(Int32, Boolean)) or call BASS_ChannelGetData(Int32, IntPtr, Int32) (if it's a decoding channel). So there is no need to call BASS_Encode_Write(Int32, IntPtr, Int32) manually!

The extension of the OutputFile can be either .acc to write an aac bitstream output file or .m4a/.mp4 to box the output to a MP4 container (note, that using m4a/mp4 requires "libmp4v2.dll" to be present).

If you simply want to encode a physical file please also take a look to the EncodeFile(String, String, BaseEncoder, BaseEncoder ENCODEFILEPROC, Boolean, Boolean).

See Also