delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2006/03/18/13:31:29

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Trace-PostClient-IP: 68.150.34.10
From: "Fausto Arinos Barbuto" <fbarbuto2002 DOT no AT spam DOT yahoo DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: sound(), delay(), etcoetera
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <BgYSf.154225$sa3.35331@pd7tw1no>
Date: Sat, 18 Mar 2006 18:25:37 GMT
NNTP-Posting-Host: 24.70.95.207
X-Complaints-To: abuse AT shaw DOT ca
X-Trace: pd7tw1no 1142706337 24.70.95.207 (Sat, 18 Mar 2006 11:25:37 MST)
NNTP-Posting-Date: Sat, 18 Mar 2006 11:25:37 MST
Organization: Shaw Residential Internet
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi All;

    Even though functions sound(), nosound() and delay() are listed
    as valid gcc built-in function in:

    http://www.delorie.com/djgpp/doc/libc/

    they don't seem to work on my computer (HP a810n, AMD-64,
    Realtek AC'97 Audio).  For example, the sample code below
    compiles like a charm but produces no sound or delay at all:

#include <pc.h>
#include <dos.h>
#include <stdio.h>

int beepz(int freq);

int main(void)
{
    int a;

    a = beepz(4000);
    return(0);
}

int beepz(int freq)
{
    printf("\n Beepz \n");
    sound(freq);
    delay(180000);
    nosound();
    return (0);
}

    I then ask, what's wrong here?  Thanks in advance!

---Fausto



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019