Streaming audio file in C on linux
<p>I have a .au audio file and am reading it in parts using fread. However when i write this to /dev/audio  there is no sound being played. Do I need to do something or is the system supposed to play back as soon as I write to /dev/audio. I am not getting any errors.</p>

<pre><code>    player = open("/dev/audio", O_WRONLY, 0);
    if (player &lt; 0) 
    {
     perror("Opening /dev/audio failed\n");
     exit(1);
    }
    while(1)
    {
        //code to read from the file writes to buf 1000 bytes per read
        //fread(buf,1000, 1, audioFile); //server side

        write(player, buf, 1000);
    }
</code></pre>