about summary refs log tree commit diff
path: root/src/engine/external
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-05-10 17:18:56 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-05-10 17:18:56 +0000
commit0d3b988c1aed8f6b91879a801253db81a251a532 (patch)
tree00f9d5128bff6ee4ec44e5f669b8eecedd55a4a1 /src/engine/external
parentac18c6a3bd9b1e497cd97c52fd77f256961b48e6 (diff)
downloadzcatch-0d3b988c1aed8f6b91879a801253db81a251a532.tar.gz
zcatch-0d3b988c1aed8f6b91879a801253db81a251a532.zip
major changes to the build script, requires new bam
Diffstat (limited to 'src/engine/external')
-rw-r--r--src/engine/external/portaudio/src/hostapi/oss/recplay.c114
1 files changed, 0 insertions, 114 deletions
diff --git a/src/engine/external/portaudio/src/hostapi/oss/recplay.c b/src/engine/external/portaudio/src/hostapi/oss/recplay.c
deleted file mode 100644
index 9d4c78cf..00000000
--- a/src/engine/external/portaudio/src/hostapi/oss/recplay.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * recplay.c
- * Phil Burk
- * Minimal record and playback test.
- * 
- */
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#ifndef __STDC__
-/* #include <getopt.h> */
-#endif /* __STDC__ */
-#include <fcntl.h>
-#ifdef __STDC__
-#include <string.h>
-#else /* __STDC__ */
-#include <strings.h>
-#endif /* __STDC__ */
-#include <sys/soundcard.h>
-
-#define NUM_BYTES   (64*1024)
-#define BLOCK_SIZE   (4*1024)
-
-#define AUDIO "/dev/dsp"
-
-char buffer[NUM_BYTES];
-
-int audioDev = 0;
-
-main (int argc, char *argv[])
-{
-    int   numLeft;
-    char *ptr;
-    int   num;
-    int   samplesize;
-
-    /********** RECORD ********************/
-    /* Open audio device. */
-    audioDev = open (AUDIO, O_RDONLY, 0);
-    if (audioDev == -1)
-    {
-        perror (AUDIO);
-        exit (-1);
-    }
-
-    /* Set to 16 bit samples. */
-    samplesize = 16;
-    ioctl(audioDev, SNDCTL_DSP_SAMPLESIZE, &samplesize);
-    if (samplesize != 16)
-    {
-        perror("Unable to set the sample size.");
-        exit(-1);
-    }
-
-    /* Record in blocks */
-    printf("Begin recording.\n");
-    numLeft = NUM_BYTES;
-    ptr = buffer;
-    while( numLeft >= BLOCK_SIZE )
-    {
-        if ( (num = read (audioDev, ptr, BLOCK_SIZE)) < 0 )
-        {
-            perror (AUDIO);
-            exit (-1);
-        }
-        else
-        {
-            printf("Read %d bytes\n", num);
-            ptr += num;
-            numLeft -= num;
-        }
-    }
-
-    close( audioDev );
-
-    /********** PLAYBACK ********************/
-    /* Open audio device for writing. */
-    audioDev = open (AUDIO, O_WRONLY, 0);
-    if (audioDev == -1)
-    {
-        perror (AUDIO);
-        exit (-1);
-    }
-
-    /* Set to 16 bit samples. */
-    samplesize = 16;
-    ioctl(audioDev, SNDCTL_DSP_SAMPLESIZE, &samplesize);
-    if (samplesize != 16)
-    {
-        perror("Unable to set the sample size.");
-        exit(-1);
-    }
-
-    /* Play in blocks */
-    printf("Begin playing.\n");
-    numLeft = NUM_BYTES;
-    ptr = buffer;
-    while( numLeft >= BLOCK_SIZE )
-    {
-        if ( (num = write (audioDev, ptr, BLOCK_SIZE)) < 0 )
-        {
-            perror (AUDIO);
-            exit (-1);
-        }
-        else
-        {
-            printf("Wrote %d bytes\n", num);
-            ptr += num;
-            numLeft -= num;
-        }
-    }
-
-    close( audioDev );
-}