# TAK Decoding Library

Decoding library for TAK, (T)om's lossless (A)udio (K)ompressor.

Version: TAK_DECO_LIB.DLL 2.3.3, 2022-06-30

Copyright 2007 by Thomas Becker, D-49080 Osnabrück.
All rights reserved.

## About

This library is needed by some applications created by other developers, who used the TAK SDK to implement support for decoding and playback of TAK files. Please read the applications documentation, to find out, if it needs this library. For an update just copy the "tak_deco_lib.dll" file into the appropriate directory of the application.

Neither my own TAK applications nor my Winamp plugin need this library!

#### Links and contact information

My homepage provides up-to-date information about TAK, sadly only in German at present.

If you want to contact me via e-mail, please keep in mind that I won't always have the time to answer.

I am regularly active in the "Lossless Audio Compression" forum at Hydrogenaudio; therefore it is a good place to get information about TAK or ask questions.

## Terms of use

#### License

This software is provided as FREEWARE, but only for private, non-commercial use. It's also free for educational and scientific use and for use in charity and humanitarian organisations.

The use of this software in a commercial application is only allowed with prior written approval by the author (Thomas Becker).

#### Disclaimer of warranty

The software is provided "as is" without warranty of any kind. To the maximum extent permitted by applicable law, the author further disclaims all warranties, including without limitation any implied warranties of merchantability, fitness for a particular purpose, and non-infringement. The entire risk arising out of the use or performance of the product and documentation remains with recipient.

To the maximum extent permitted by applicable law, in no event shall the author be liable for any consequential, incidental, direct, indirect, special, punitive, or other damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of this agreement or the use of or inability to use the product, even if the author has been advised of the possibility of such damages.

#### Distribution

The software may be freely distributed provided that it is not modified and the original archive remains intact with all accompanying files, and provided that no fee is charged (except for any reasonable fees necessary to cover costs of distribution media).

It is permitted to distribute the binary libraries (DLLs) separated from the rest of the SDK along with a compiled, non-commercial application, provided that the libraries used remain unmodified, discrete files with their original file names.

For the end user, it is recommended to refer to the official download locations for up-to-date library modules.

# History

### V2.3.3 / 22-06-30

Added an 64-bit version. Required a minor interface change (see SDK).

### V2.3.2 / 22-05-06

Nothing new, just compiled using the latest source code.

### V2.3.1 / 21-03-28

Improvements:

- Faster decoding.

### V2.3.0 / 13-06-18

Improvements:

- Faster decoding.

Fixes:

- A bug with nearly no practical relevance has been fixed. Please look into the application's Readme for more information.

### V2.2.0 / 11-07-10

New features:

- Support for multi-channel audio.
- Some new functions for developers, which still have to be documented.

### V2.1.0 / 11-01-08

Nothing new, just compiled using the latest source code.

### V2.0.0 / 10-01-07

New features:

- Support for the new codec introduced with TAK 2.0.

### V1.1.2 / 9-07-27

Improvements:

- Faster decoding and a smaller binary because of the optimizations in TAK 1.1.2.

### V1.1.1 / 9-03-11

New Features:

- Support for MD5 verification.

Modifications:

- This version will no longer use seek tables contained in files created with applications prior to TAK 1.1.1.

Improvements:

- Smaller binary because of the optimizations in TAK 1.1.1.

### V1.1.0 / 9-01-04

New Features:

- Support for 192 Khz Audio.
- Seeking without seek table.

Improvements:

- Faster decoding because of the optimizations in TAK 1.1.0.

### V1.0.7 / 8-03-11

Modifications:

- Faster decoding because of the optimizations in TAK 1.0.4.

### V1.0.6 / 7-12-14

Modifications:

- The decoder had to be modified to guarantee error robustness (decoding through errors) for files created by pipe encoding with the -ihs (ignore header size) switch applied.

### V1.0.5 / 7-11-05

New features:

- Support for frame sizes of 512, 1024 and 2048 samples which have been introduced with TAK V1.0.2.
- Support for the additional preset INSANE introduced with TAK V1.0.2.

Bug fixes:

- The decoder is expected to process any (damaged) data without any problems. But i have found and corrected two cases, where the decoder could crash. The chance for this was less than 1 : 1000 (for damaged files only!).
- In one place i used an invalid flag combination in a call of Windows' VirtualFree().

Interface Compatibility:

- The decoder functions tak_SSD_GetStreamInfo and tak_SSD_GetEncoderInfo may now return the new values for the frame size (Ttak_str_FrameSizeTypes) and the encoder preset/profile (TtakPresets) which have been introduced with TAK 1.0.2.

### V1.0.1 / 7-04-10

First stable release.

### V1.0.4 / 7-04-21

Fixes:

- Fix of a minor multithreading issue, which could cause suboptimal performance and possibly crashes (in very rare cases). The fix itself is not optimal performancewise; i will improve it when i have more time.

### V1.0.3 / 7-04-21

Fixes:

- The memory manager was not thread safe. Multithreaded applications using more than one decoder instance simultaneously could crash. This was most likely to happen with multi-core systems.

### V1.0.2 / 7-04-14

Internal modifications and fixes:

- The APEv2 tag reading functions are a bit more tolerant when reading invalid tag headers not following the official APEv2 specification.
- tak_SSD_GetCurFrameBitRate() reported wrong values when decoding high resolution audio.