/*
          __
         / /_______________  ____  ___
        / __/ ___/ ___/ __ \/ __ \/ _ \
       / /_(__  ) /__/ /_/ / /_/ /  __/
       \__/____/\___/\____/ .___/\___/
                         /_/

    newsound1.c
    read and play a wav file (blocking API)
    (no need to open a graphics window)
*/

#include <tscope.h>

int main()
{
    // make a sample pointer
    snd2_sample *samp;

    // read a sample from a file
    samp=snd2_readsample("example.wav");

    // play the sample
    snd2_playsample_blocking(samp);

    // kill the sample
    snd2_killsample(samp);

    return 0;
}
END_OF_MAIN();





top
Persoonlijke pagina Universiteit GentTscope
Allegro | Cygwin | Gcc
© See license.html for copyright information