Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Feature Request - SOUND breaks on/off
#2
UPDATE:  I found a solution.  I was tinkering around with the sample code found in the QB64PE Wiki entry for the SOUND statement, and I found a statement that does what I want:  PLAY "Q0"
This sets "volume ramping" to a value in milliseconds.  I didn't know this would also effect SOUND statements (I thought it was only for PLAY statements).  But then I saw this used in the "sound effects" sample code. When you set it to zero, it turns off the Sound Break (like I mentioned above) and completely gets rid of the buzzing!

Add a PLAY "Q0" to my above code, and the sound will play as it does in QBasic (which is even better than how it plays in QB64PE 3.6!!).  No buzzes/clicks at all.  Try the code below in QB64PE 3.11 and compare the sound quality to QBasic in DosBox (you'll need to remove or comment-out the PLAY "Q0" for QBasic):

Code: (Select All)

Play "Q0"
For w = 1 To 3
    For q = 100 To 2000 Step 10
        Sound q, .2
    Next q
    For q = 2010 To 110 Step -10
        Sound q, .2
    Next q
Next w
End

I will now be able to compile my old game using the current QB64PE version. Just need to add a PLAY "Q0" to it.

Again, thanks for the work you all have put into QB64PE.  This is fantastic!!
Reply


Messages In This Thread
Feature Request - SOUND breaks on/off - by Abazek - 02-05-2024, 05:41 AM
RE: Feature Request - SOUND breaks on/off - by Abazek - 02-05-2024, 07:09 AM



Users browsing this thread: 4 Guest(s)