Board index » delphi » A TSR program to play sound through computer speaker

A TSR program to play sound through computer speaker

Hello,

Does onyone know how to run a TSR program to play sound trough the
computer speaker? It will be to make a music in interground from a
application. Any idea or unit will be welcome.

Diane.

           _\|/_
           (o o)
======oOO== (_) ==OOo===== Diane TORNACK =============================
E-Mail: phi96...@studserv.uni-leipzig.de
Uni-Leipzig State
Germany

 

Re:A TSR program to play sound through computer speaker


Quote
Diane TORNACK wrote in message ...
>Hello,

>Does onyone know how to run a TSR program to play sound trough the
>computer speaker? It will be to make a music in interground from a
>application. Any idea or unit will be welcome.

>Diane.

E-Mail: phi96...@studserv.uni-leipzig.de
Quote
>Uni-Leipzig State
>Germany

Here's an example:

Program TonePrg;
{$M 1024,0,0}
{$R-,S-}
Uses Crt,Dos;
Var T,Now: Integer;
Procedure Tone;
Interrupt;
Const Tones: Array[1..30] of
Integer=(0,165,0,147,0,130,0,147,0,165,0,165,0,165,0,0,147,0,147,0,147,0,0,1
30,0,196,0,196,0,0);
Begin
  Inc(Now);
  If (Now=2) Then
  Begin
    If (Tones[T]=0) Then NoSound Else Sound(Tones[T]);
    Inc(T);
    If (T=31) Then T:=1;
    Now:=0;
  End;
End;
Begin
  T:=1;
  Now:=0;
  SetIntVec($1C,@Tone);
  Keep(0);
End.

Compile but do not run this from the IDE.
Quit the IDE then run it from the command prompt.
Hope this helps, Bean th...@igateway.com

Other Threads