## gva-audit gva-audit — Audit ROM and Sample Sets |

## Synopsis

    void                gva_audit_init                      (void);
    GvaProcess *        gva_audit_roms                      (GError **error);
    GvaProcess *        gva_audit_samples                   (GError **error);
    void                gva_audit_save_errors               (void);
    gboolean            gva_audit_detect_changes            (void);

## Description

These functions audit the available ROM and audio sample sets for correctness and also manipulate the audit results window.

## Details

### gva_audit_init ()

    void                gva_audit_init                      (void);

Initializes the ROM audit window.

This function should be called once when the application starts.

### gva_audit_roms ()

    GvaProcess *        gva_audit_roms                      (GError **error);

Starts the lengthy process of auditing the integrity of the available ROM sets and returns a GvaProcess to track it. The results of the audit are written to the "romset" column of the game database. If an error occurs while starting the audit, it returns `NULL` and sets `error`.

`error` : | return location for a GError, or `NULL`
Returns : | a new GvaProcess, or `NULL`

### gva_audit_samples ()

    GvaProcess *        gva_audit_samples                   (GError **error);

Starts the length process of auditing the integrity of the available sample sets and returns a GvaProcess to track it. The results of the audit are written to the "sampleset" column of the game database. If an error occurs while starting the audit, it returns `NULL` and sets `error`.

`error` : | return location for a GError, or `NULL`
Returns : | a new GvaProcess, or `NULL`

### gva_audit_save_errors ()

    void                gva_audit_save_errors               (void);

Saves the results of the most recent ROM file audit to a file.

### gva_audit_detect_changes ()

    gboolean            gva_audit_detect_changes            (void);

Attempts to detect ROM and sample file changes since the last program execution by scanning the timestamps on the directories listed in the "rompath" and "samplepath" configuration values. It returns `TRUE` if any of those timestamps are more recent than the game database.

Returns : | `TRUE` if changes were detected