Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1330 PC speaker changing frequency witout switching off

fixed_in_SVN
closed
5
2014-05-24
2013-06-04
dos386
No

Can't change PC speaker frequency without switching the sound OFF before (OK on real hardware).

Testcase binary: "6A4AuR4A6DUA6AUAuABMzSG6DAC70AfoEAC7QAboCgBKdfHkYST85mHDsLbmQ5PmQojg5kLkYQwD
5mG5AQAxwI7AJqBsBCY6BmwEdPni88M=" (base64 DOS COM executable)

Source code: http://board.flatassembler.net/topic.php?p=158576#158576

Expected behevior: hearing the phone sound with 2 frequencies
Observed behavior: hearing a long beep with just 1 frequency

Discussion

  • dos386
    dos386
    2013-06-06

    Test code included in image sent by mail.

    Update: seems that BOCHS tries to connect to host's PC speaker if no other device is available (???) ... but the very same BUG still occurs (only 1 frequency).

    How is the output controlled? Is it documented somewhere?

    Proposal for improvement:

    Add "global sound control" option, with following possible values:

    1. Discard all sound (pretend playing to apps)
    2. No global control, specify per emulated device (PC speaker, SB16, ENS1370)
    3. Mix together and send to host's sound device
    4. Mix together and save to WAV file

    For [1.], sound output MUST be specified per device, otherwise it MAY NOT be specified per device.

     
  • Volker Ruppert
    Volker Ruppert
    2013-06-13

    Please try again with latest SVN sources. The PIT code now calls beep_on() after writing to a counter when the speaker is enabled. The Windows beep code and the sound output code has been changed, too. The sound output control could be added as a feature request.

     
  • dos386
    dos386
    2013-06-15

    Please try again with latest SVN sources.

    Any Win32 binary? I don't have the technology to compile from SVN :-(

    The PIT code now calls beep_on() after writing to a counter
    when the speaker is enabled.

    Looks good, thanks :-)

    The Windows beep code and the sound output code has been changed, too.

    How?

    The sound output control could be added as a feature request.

    Should I brew a separate tracker report?

     
  • Volker Ruppert
    Volker Ruppert
    2013-06-18

    I can build a Windows binary from the latest SVN sources and send it to you for testing. The modified code now calls beep_off() if the beep is already on. The lowlevel sound code stop the square wave generator thread before creating a new one and the Windows code does something similar. NOTE: The Windows Beep() has been reported to be broken in recent versions. As a first step I have added a 'speaker' option to the bochsrc. The available output modes are 'sound', 'system' and 'gui' (see bochsrc sample in SVN snapshot).

     
  • Volker Ruppert
    Volker Ruppert
    2013-07-14

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     Can't change PC speaker frequency without switching the sound OFF before (OK on real hardware).
    
     Testcase binary: "6A4AuR4A6DUA6AUAuABMzSG6DAC70AfoEAC7QAboCgBKdfHkYST85mHDsLbmQ5PmQojg5kLkYQwD
    
    • status: open --> accepted
    • assigned_to: Volker Ruppert
    • Group: to_be_fixed_in_next_release --> fixed_in_SVN
     
  • Volker Ruppert
    Volker Ruppert
    2013-07-14

    The original bug is already fixed and the sound options rewrite is done and almost stable. The documentation will be updated soon.

     
  • Volker Ruppert
    Volker Ruppert
    2014-05-24

    • status: accepted --> closed