Category : Files from Magazines
Archive   : APR91.ZIP
Filename : 2N04043A

 
Output of file : 2N04043A contained in archive : APR91.ZIP
#include "sm.h"
#include
#include
#include
#include
#include
#include
#include

/******************************************************************
* Digitize speech (or other sound) and store the digitized sound
* in a specified file.
*
* Parameters:
* File - file name to use for output, with no extension.
*
* Notes:
* 1. This version uses ADPCM 3 recording with silence suppresion
*
* 2. Compiled with TurboC's large memory model, case sensitive link
* turned off.
*
* 3. Requires files sm.h and cvxtlcc.lib, both of which are
* supplied by Covox.
*
* Copyright:
* Original code by William H. Roetzheim (619) 669-6970
* Copyright 1990 by William H. Roetzheim
* All rights reserved.
**********************************************************************/

void main (int argc, char *argv[])
{
int i;
long lLength;
char *lpBuffer;
char szFileName[15];
int nFile;

if (argc != 2)
{
printf ("\nsyntax: Record filename");
exit (-1);
}

/* test for extension in filename */
for (i = 0; i < strlen (argv[1]); i++)
{
if (argv[1][i] == '.')
{
printf ("\n File name should not have an extension.");
exit (-1);
}
}

strcpy (szFileName, argv[1]);
strcat (szFileName, ".v3s"); /* ADPCM 3 compression, silence encoding */
nFile = open (szFileName, O_BINARY | O_RDWR | O_CREAT, S_IREAD | S_IWRITE);
if (nFile == -1)
{
printf ("\nError opening file.");
exit (-1);
}

lpBuffer = malloc (0xFFFF); /* Pick a number that's plenty big */
printf ("\nPress any key to start recording.");
getch();
printf ("\nPress any key to stop recording.");
lLength = record3s (lpBuffer, 0xFFFF, 0, 0, 6);
/* lLength will be actual bytes in buffer used */
/* 0xFFFF is the size of the buffer */
/* The first 0 is rate, we're using the default of 132 */
/* The second 0 is port, we're using Voice Master factory default */
/* The 6 tells the routine to use the default for silence encoding */
/* */
/* To record using a different encoding scheme, we would just */
/* change the call to the appropriate flavor of record */

if (kbhit()) getch(); /* flush buffer if user pressed key to stop */

/* done, output results and clean up */
write (nFile, lpBuffer, lLength);
close (nFile);
free (lpBuffer);
}

  3 Responses to “Category : Files from Magazines
Archive   : APR91.ZIP
Filename : 2N04043A

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/