Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PC Speaker in Windows

7 views
Skip to first unread message

Brent Roberts

unread,
Feb 19, 1994, 1:11:25 PM2/19/94
to
Greetings,

Does anyone know how to program the speaker for Windows in TPW v1.5?
I cannot find anything in the MMSystem unit. Also, I am unable to
program the port for the speaker using imbedded assembly language.

Bormann

unread,
Feb 21, 1994, 7:36:42 AM2/21/94
to

Try "messagebeep(0)". If you have configured Windows to use the speaker, this
should cause a "beeeeeeep".

Stefan Bormann

Jt Edwards

unread,
Feb 21, 1994, 11:35:00 AM2/21/94
to
-] Quoting Robertsb02-19-94 12:11mapub.dma.org to All -N

Ro> Does anyone know how to program the speaker for Windows in TPW v1.5?
Ro> I cannot find anything in the MMSystem unit. Also, I am unable to
Ro> program the port for the speaker using imbedded assembly language.

you cant do stuff directly to the speaker, you have to use the mmystem calls
and have a driver for the speaker installed.
jt


... Smith & Wesson: the original point-and-click interface.
___ Blue Wave/QWK v2.12

Michael Vincze

unread,
Feb 21, 1994, 2:02:13 PM2/21/94
to


Here are three quick alternatives:

1. If you have the speaker driver installed then you can play *.wav files
with the sndPlaySound() function found in the MMSystem unit.

2. You could enable the systems sounds and use MessageBeep(),.

3. Writing directly to the speaker is not recommended. With Windows 3.0-
you were given a set of API routines that you could make sounds with.
With Windows 3.1 these routines became unsupported, though they still
work in Windows 3.1 There is no guarantee though that they will work
in future Windows versions.

If you have the documentation for TPW 1.0 or 1.5, you should be able
to find these calls (at least in the on-line help if you don't have
a hard copy).

Here is an example that produces a chirp:

var
Pitch : integer;
begin
OpenSound;
for Pitch:= 80 to 84 do
begin
SetVoiceNote (1, Pitch, 100, 1);
SetVoiceAccent (1, 15, 255, s_Legato, Pitch);
end;
StartSound;
WaitSoundState (S_QueueEmpty);
StopSound;
CloseSound
end;

Best regards,

----------------------------------------------------------------------
| Michael Vincze | "If your heart is in your dream, no request |
| Vincze International | is too extreme" - Jiminy Cricket |
| Garland, Texas |---------------------------------------------|
| vin...@lobby.ti.com | "You can't deviate unless you have a plan" |
| (214) 575-2724 | - Alvin Crofts II. |
----------------------------------------------------------------------


0 new messages