ftp.nice.ch/pub/next/unix/audio/rsynth.2.0.s.tar.gz#/rsynth-2.0/config/pipeplay.c

This is pipeplay.c in view mode; [Download] [Up]

#include <config.h>
#include <useconfig.h>
#include <stdio.h>
#include "proto.h"
#include "getargs.h"
#include "hplay.h"
#include <fcntl.h>

static FILE *dev_fd;
long samp_rate = 8000;

int
audio_init(int argc, char **argv)
{
 dev_fd = popen("/usr/audio/bin/send_sound -l16", "w");
 return (0);
}

void
audio_term(void)
{
 pclose(dev_fd);
}

void
audio_play(int n, short *data)
{
 fwrite(data, 2, n, dev_fd);
 fflush(dev_fd);
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.