home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:19443 comp.lang.c++:18854 comp.lang.misc:4099
- Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.misc
- Path: sparky!uunet!brunix!cs.brown.edu!sj
- From: sj@cs.brown.edu (Shuang Ji)
- Subject: Re: How to turn PC speaker off?
- Message-ID: <1993Jan8.195256.27080@cs.brown.edu>
- Sender: news@cs.brown.edu
- Organization: Brown Computer Science Dept.
- References: <C0Gz8y.H0@cmie.ernet.in> <1993Jan8.004849.1660@jwminhh.hanse.de>
- Date: Fri, 8 Jan 1993 19:52:56 GMT
- Lines: 52
-
- In article <1993Jan8.004849.1660@jwminhh.hanse.de>, wieck@jwminhh.hanse.de (Jan Wieck) writes:
- |> rs@cmie.ernet.in (Rajappa Iyer) writes:
- |> : wieck@jwminhh.hanse.de (Jan Wieck) writes:
- |> : : cschang@hamlet.umd.edu (C. S. Chang) writes:
- |> : : : Is there any way to turn the PC speaker off so that there will be no
- |> : : : beeps if a certain function call failed. I do not have access to this
- |> : : : particular function call which beeps at failure. So I am looking for
- |> : : : a way to prevent the PC from generating some beeping noise.
- |> : :
- |> : : Oh, you wanted a solution for PC-DOS? Well, also possible, cut the
- |> : : wire (this is no joke - it's the only way under PC-DOS).
- |> :
- |> : Well, yes, this is the only way to do it for programs which control
- |> : the sound chip directly and / or write to the speaker port. But if you
- |> : are interested in cutting out plain vanilla beeps from plain vanilla
- |> : apps (which are likely to be using a dos / bios call to write ASCII 7 for
- |> : beep) then you *can* intercept the bios video interrupt and disable the
- |> : beep.
- |>
- |> Normally (all the user's in our office) someone want's to turn off
- |> the speaker to play games. Most games have a turn-speaker-off-feature
- |> (and some a boss-is-coming-hotkey) today. But ALL games directly
- |> write to the speaker port.
- |>
- |> Just interested - let us know for what reason do you need this feature,
- |> Mr./Mrs. Chang?
- |>
- |>
- |> Until later, Jan
- |>
- |> --
- |> # Any language keeps its own misunderstandings; #
- |> # why shouldn't programming languages do? #
- |> # #
- |> # wieck@jwminhh.hanse.de (Jan Wieck) #
-
- It's practically impossible to turn off the speaker. But you can write
- a TSR program which will intercept the clock interrupt and repeatedly
- send CLOSE commands to the port register controlling the speaker.
- Sometimes this can make the game completely silent. And in the worst
- case, it will reduce continuous, loud sound into intermittent, weak
- sounds.
-
- A potential problem with this solution is that the game might also
- provide its own clock interrupt handler, and if it decides not to
- keep the original ISR active (i.e., maintain an interrupt handler chain),
- all you have done might be in vain.
-
- If you want to know more about the details, let me know.
-
-
- Shuang
-