GSCLIB.TXT Driver File Contents (disk2.ZIP)

                     Golden Sound Card Toolkit

The Golden Sound Card Toolkit was designed for software designers and
programmers who wish to add the element of sound to their software but
do not wish to be burdened by having to load a separate TSR (Terminate but
Stay Resident) program.  Having the sound driver integrated into the main
program code has the advantages of easier program distribution and
execution.

The Golden Sound Card Toolkit is separated into two libraries.  The
first library is written for FM synthesis while the second is written for
digitized voice.

The following are the files provided in the toolkit:

QBSND.LIB - Quick BASIC FM synthesis library
TCSND.LIB - Turbo C and Microsoft C FM synthesis library
TCVOC.LIB - Turbo C and Microsoft C digitized voice library

The FM synthesis library supports the following file formats and
automatically detects the file format used by the file name extension
passed:

1.  MIDI files (.MID)
2.  CMF files (.CMF)
3.  MUC files (.MUC)

The digitized voice library supports the following file formats and
automatically detects the file format used by the file name extension
passed:

1. Wave files (.WAV)
2. Sound Blaster voice files (.VOC)
3. Sound Partner Plus voice files (.VOX)
4. Raw voice files (.RAW)

The following lists the functions provided in the FM synthesis library:

------------------------------------------------------------------------------

syntax:   initsound ()

function: initializes the card for FM synthesis

remarks:  1.  Automatically detects for the audio card.  If found, the
              initialization is successfull, otherwise, the PC speaker will
              beep once.
          2.  Must be the first function called before all the other
              functions can be used.
          3.  If not sound card is found, no sound will be heard.

Quick BASIC example:
  Call initsound

Turbo C example:
  initsound ();

------------------------------------------------------------------------------

syntax:   midiout (char *buf)

          buf points to an array of MIDI data.

function: directly sends MIDI data to the MIDI port

remarks:  1.  This function can send individual MIDI data to the MIDI
              device.  This function may not be useful to programmers who
              are not too familiar with MIDI and can skip this function.
          2.  The main purpose of this function is to play single notes
              without having to load a whole song into memory.

Quick BASIC example:
  DEFINT A-Z
  DIM ml(256)
  ml(0)=192+40*256
  ml(1)=144+60*256
  ml(2)=127
  CALL MIDIOUT(ml())

Turbo C example:
  char ml[256];

  ml[0] = 0xC0;
  ml[1] = 0x30;
  ml[2] = 0x90;
  ml[3] = 0x3C;
  ml[4] = 0x7F;
  ml[5] = 0;
  midiout (ml);

------------------------------------------------------------------------------

syntax:   playsong (int counter, char *buf)

          counter represents the number of times to song will be played.

          buf points to the location in memory the song is loaded.

function: Plays a song currently loaded into memory.

remarks:  1. A counter value of -1 will repeat the song an unlimited number
             of times.
          2. Before calling this function, a call to stopsong () is highly
             recommended.

Quick BASIC example:
  CALL playsong(1,midifile())

Turbo C example:
  playsong (1, midifile);

------------------------------------------------------------------------------

syntax:   quitsound ()

function: Terminates the sound toolkit.

remarks:  Because the sound toolkit traps interrupt vectors, a call to this
          function is necessary before exiting your program to restore the
          original status before activating the toolkit.

Quick BASIC example:
  CALL quitsound

Turbo C example:
  quitsound ();

------------------------------------------------------------------------------

syntax:   readplay ()

function: Reads the current status of the song being played. This function
          returns 0 if no song is currently in play and 1 if otherwise.

remarks:  This function is used to determine whether or not a song is
          currently being played.

Quick BASIC example:
  CALL readplay(S%)

Turbo C example:
  int play;

  play = readplay ();

------------------------------------------------------------------------------

syntax:   readsong (char *filename, char *buf)

          filename is the music file that is to be loaded into memory.

          buf points to the memory location where the file is to be loaded.

function: Loads a music file into memory.

remarks:  1. When passing the filename, make sure that the file name is
             valid or else you may not hear anything at all.
          2. The memory buffer should be allocated before calling this
             function. Make sure the memory buffer is large enough to
             contain the whole file.
          3. The maximum buffer size allowed is 65535.

Quick BASIC example:
  DEFINT A-Z
  DIM midifile(10000)
  CALL readsong("demo.mid", midifile())

Turbo C example:
  int midifile[20000];

  readsong ("demo.mid", midifile);

------------------------------------------------------------------------------

syntax:   readtempo ()

function: Reads the current tempo. This function returns the current tempo
          setting.

remarks:  1. Before calling this function, make sure that a song is already
             loaded into memory or else the value returned will be
             meaningless.
          2. The tempo setting within a song may contain more than one
             value.

Quick BASIC example:
  CALL readtempo(S%)

Turbo C example:
  int tempo;

  tempo = readtempo ();

------------------------------------------------------------------------------

syntax:   readticks ()

function: Reads the current tick value. This function returns the current
          tick value.

remarks:  This is a special function and is not normally used.

Quick BASIC example:
  CALL readticks(S%)

Turbo C example:
  int ticks;

  ticks = readticks ();

------------------------------------------------------------------------------

syntax:   readtimer ()

function: Reads the current timer value.

remarks:  1. This is a very useful function. A call to this function allows
             you to determine where you are in the current song. If you
             want to synchronize animation with the song, this function is
             indispensable.
          2. If a song is not currently in play, the value returned will be
             the value of the last song played.
          3. Every time a song is played, the timer value is reset to 0.

Quick BASIC example:
  CALL readtimer(S%)

Turbo C example:
  int timer;

  timer = readtimer ();

------------------------------------------------------------------------------

syntax:   readvolume ()

function: Reads the current volume. Maximum value is 127, minimum value is
          0.

remarks:  This special function allows you to determine the current playing
          volume and should be used in conjunction with setvolume ().

Quick BASIC example:
  CALL readvolume(S%)

Turbo C example:
  int volume;

  volume = readvolume ();

------------------------------------------------------------------------------

syntax:   settempo (int tempo)

          tempo is the desired tempo value.

function: This function sets the tempo value.

remarks:  Use this function to speed up or slow down the song being played.

Quick BASIC example:
  CALL settempo(120)

Turbo C example:
  settempo (120);

------------------------------------------------------------------------------

syntax:   setvolume (int volume)

          volume is the desired volume setting.

function: This function sets the volume.

remarks:  Use this function to adjust the volume of the song being played.
          You may want to lower the volume of the song when a screen
          appears and increase it back to normal after the screen
          disappears.

Quick BASIC example:
  CALL setvolume(127)

Turbo C example:
  setvolume (127)

------------------------------------------------------------------------------

syntax:   stopsong ()

function: This function stops the song playback.

remarks:  Use this function if you want to stop the song from being played.

Quick BASIC example:
  CALL stopsong

Turbo C example:
  stopsong ();

------------------------------------------------------------------------------

Quick BASIC sample program:

DEFINT A-Z
,
DIM SONG1(15000)
'
CALL initsound
'
CALL readsong("SNDDEMO.MID",song1())
CALL playsong(-1,song1())
'
PRINT "Press any key to stop."
lk$=input$(1)
'
CALL stopsong
CALL quitsound
End'

Turbo C sample program:

#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

int demosong[30000];

void main (void)
{
  initsound ();

  readsong ("SNDDEMO.MID", demosong);
  playsong (-1, demosong);
  printf ("Press any key to stop.\n");
  getch ();
  stopsong ();
  quitsound ();
}

The following lists the functions provided in the digitized voice library:

------------------------------------------------------------------------------

syntax:   initvoice ()

function: Initializes the card for digitized voice output.

remarks:  1. Automatically detects for the audio card. If found, the
             initialization is successfull, otherwise, the PC speaker will
             beep once.
          2. Must be the first function called before all the other
             functions can be used.
          3. If not sound card is found, no sound will be heard.

Turbo C example:
  initvoice ();

------------------------------------------------------------------------------

syntax:   readvoice (char *filename, char *buf)

          filename is the voice file that is to be loaded into memory.

          buf points to the memory location where the file is to be loaded.

function: Loads a voice file into memory.

remarks:  1. When passing the filename, make sure that the file name is
             valid or else you may not hear anything at all.
          2. The memory buffer should be allocated before calling this
             function. Make sure the memory buffer is large enough to
             contain the whole file.

Turbo C example:
  char *vfile;

  vfile = farmalloc (400000);
  readsong ("test.voc", vfile);

------------------------------------------------------------------------------

syntax:   playvoice (int position, char *buf)

          position represents the starting position in the file where
          playback will start.

          buf points to the location in memory the voice data is loaded.

function: Plays a voice file currently loaded into memory.

remarks:  1. The position value determines where in the voice file playback
             will start. If the whole file is to be played back, this value
             should be 0.
          2. Before calling this function, a call to stopvoice () is highly
             recommended.

Turbo C example:
  playvoice (0, vfile);

------------------------------------------------------------------------------

syntax:   stopvoice ()

function: This function stops the voice playback.

remarks:  Use this function if you want to stop the voice file from being
          played.

Turbo C example:
  stopvoice ();

------------------------------------------------------------------------------

syntax:   quitvoice ()

function: Terminates the sound toolkit.

remarks:  Because the sound toolkit traps interrupt vectors, a call to this
          function is necessary before exiting your program to restore the
          original status before activating the toolkit.

Turbo C example:
  quitvoice ();

------------------------------------------------------------------------------

syntax:   statusvoc ()

function: Returns the voice play status:

remarks:  This function returns -1 if no voice file is being played and
          returns 0 if a voice file is being played.

Turbo C example:
  int vplay;

  vplay = statusvoc ();

------------------------------------------------------------------------------

Turbo C sample program:

#include <alloc.h>
#include <conio.h>
#include <stdio.h>

void main (void)
{
  char *demovoice;

  demovoice = (char *) farmalloc (400000l);
  if (demovoice == NULL) {
    printf ("Not enough memory.\n");
    return;
  }

  initvoice ();

  readvoice ("TEST.VOC", demovoice);
  playvoice (0, demovoice);

  printf ("Press any key to stop.");
  getch ();

  stopvoice ();
  quitvoice ();
  farfree (demovoice);
}

Download Driver Pack

How To Update Drivers Manually

After your driver has been downloaded, follow these simple steps to install it.

  • Expand the archive file (if the download file is in zip or rar format).

  • If the expanded file has an .exe extension, double click it and follow the installation instructions.

  • Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.

  • Find the device and model you want to update in the device list.

  • Double-click on it to open the Properties dialog box.

  • From the Properties dialog box, select the Driver tab.

  • Click the Update Driver button, then follow the instructions.

Very important: You must reboot your system to ensure that any driver updates have taken effect.

For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.

server: web3, load: 2.38