PCem

changeset 165:0710d7cb935f

Silence PC speaker output at very high frequencies - fixes Lemmings and other games that use high frequency as "speaker off".
author TomW
date Sun Sep 28 11:33:08 2014 +0100
parents 9a88154e8608
children 096e27a8c67b
files src/pit.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/src/pit.c	Sat Sep 27 18:39:06 2014 +0100
     1.2 +++ b/src/pit.c	Sun Sep 28 11:33:08 2014 +0100
     1.3 @@ -527,7 +527,12 @@
     1.4  
     1.5  void pit_speaker_timer(int new_out, int old_out)
     1.6  {
     1.7 -        speakon = ppispeakon = new_out;
     1.8 +        int l = pit.l[2] ? pit.l[2] : 0x10000;
     1.9 +        if (l < 25)
    1.10 +                speakon = 0;
    1.11 +        else
    1.12 +                speakon = new_out;
    1.13 +        ppispeakon = new_out;
    1.14  }
    1.15  
    1.16