/*
 * Copyright (c) 1997-2004 Alexandros Eleftheriadis, Danny Hong and
 * Yuntai Kyong.
 * 
 * This file is part of Flavor, developed at Columbia University
 * (www.ee.columbia.edu/flavor).
 *
 * Flavor is free software; you can redistribute it and/or modify
 * it under the terms of the Flavor Artistic License as described in
 * the file COPYING.txt. 
 *
 */

/* 
 * Authors:
 * Danny Hong <danny@ee.columbia.edu>
 *
 */


/*
 * AU File Format
 *
 * This example reads audio files in the NeXT/Sun audio formats.
 *
 */

/*
 * Header
 *
 */
class Header {
    char(8) magic[4] = ".snd";
    int(32) dataLocation;
    int(32) dataSize;
    int(32) dataFormat;
    int(32) samplingRate;
    int(32) channelCount;
    char(8) info[dataLocation-24]; // Min size is 4
}

/*
 * AU File (NeXT/Sun Audio File)
 *
 */
class AU {
    Header hd;

    int i;
    for (i = 0; i < hd.dataSize; i++) {
        char(8) data;
        /* Here we can use verbatim code to manipulate data */
    }
}