Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Beep() on win9x

rai_netrai_net Member Posts: 51
I have been building a program that makes heavy use of the beep() function, however it only works properly on Win NT because win9x just ignores all the arguments and outputs the exact same sound every time :(

Does anyone know of any win9x compatible functions similar to beep() where I can control the frequency and duration of the sound coming from the internal speaker on my PC

rai_net

Comments

  • MTWMTW Member Posts: 5
    You can use the function MessageBeep to use a standard windows sound, or others, form the control panel-sounds.

    You can also acces the speaker by writing 80x86 assembley. This is simply implented in C

    asm{
    mov ah,0x03
    int 0x10
    } //just an example

  • rai_netrai_net Member Posts: 51
    : You can use the function MessageBeep to use a standard windows sound, or others, form the control panel-sounds.
    :
    : You can also acces the speaker by writing 80x86 assembley. This is simply implented in C
    :
    : asm{
    : mov ah,0x03
    : int 0x10
    : } //just an example
    :
    :

    Thanks for the help, but I thought that most C/C++ compilers do not let you use interrupts when writing inline assembly and also how would I change the frequency of the sound generated, is it just the value passed to the ah register?
  • Justin BibJustin Bib USAMember Posts: 0

    ______ { http://forcoder.org } free ebooks and video tutorials about ( Python, JavaScript, Objective-C, Perl, Delphi, Visual Basic, PHP, Go, Assembly, R, C++, Java, C, PL/SQL, C#, MATLAB, Ruby, Visual Basic .NET, Scratch, Swift FoxPro, Kotlin, Scheme, Prolog, Julia, Alice, Lisp, Rust, D, COBOL, LabVIEW, Crystal, Awk, SAS, ABAP, Fortran, Clojure, Lua, VBScript, Scala, F#, Apex, Bash, Transact-SQL, Ada, Logo, ML, Erlang, Dart, Hack ) ________

Sign In or Register to comment.