INSIDE TSID

TSID is a library that allow a sid player to collect your listening statistic.
It comes with (actually) 3 classes:

  1. TSID
  2. SIDT
  3. TSIDExaminer
TSID class:

The class TSID is the base class: it offers the methods for storing the listening information using the class SIDT.
Essentially, for storing information, you must use the addTime method.
addTime needs to have the relative (or absolute) file path from HVSC, the listening time, and the sub song of the file you are listening.

To understand how the information are stored and lately used, some thing are to be known. TSID was thought for use with HVSC. HVSC are structured with directory named with composer names. This allows easy search for a given composer tune. So, TSID use the passed name as a HVSC directory name, and builds a hidden directory (.tsid_hvsc) that reflect the HVSC structure. In Windows the directory is tsid_hvsc and is placed inside windows home.

TSID use buffered technique to avoid player slow down operations, while registering the collected information. It uses SIDT class for this porpoise.

SIDT class:

The class  SIDT manage a .sidt file. When we listen for /Gray_Matt/Tusker.sid, TSID use SIDT for creating the file /Gray_Matt/Tusker.sidt in the hidden directory. SIDT has the add method for adding listening information about that tune. Note that for speed up operation, SIDT update an already existent file in the hidden directory, only when the write method is called.

A .sidt file contains these information:

SIDT has two other useful methods: InitForGet, and getNext that are to be used for queering the sidt file.

TSIDExaminer

The class TSIDExaminer is the class that query the hidden directory and can produce lists of ordered classifies about the listened tunes. It manages single sub tunes, tunes (as a HVSC file) and authors (as HVSC directory).
 

Error System

From TSID 0.6 there is a new error system. Each classes have the getCodeError() and getError() that are to be used to see what was the last error.
Else, if you test the class by the defined boolean operator, you can know if class can go away or it has some error.