Building sounds with _SNDPLAYCOPY?
#1
With QB64PE V3.3 having new parameters for _SNDPLAYCOPY, I wondered if building a sound and saving it was possible.   I mean in the same sort of way that you can build an image by using pset, line, circle etc and then saving it into an image using _PUTIMAGE.   I assume there's no way but I thought I'd ask here, just in case.

For example, here is a sort of doppler/fading beep routine:

Code: (Select All)
Dim blip&
blip& = _SndOpen("G025.mp3")

v1 = 0
switch = 0
Do
    _Limit 8
    If switch = 0 Then
        v1 = v1 + .499
        If v1 > 1 Then
            v1 = 1
            switch = 1
        End If
    Else
        v1 = v1 - .1
        If v1 < 0 Then
            v1 = 0
            switch = 0
            _Delay 2.
        End If
    End If
    _SndPlayCopy blip&, v1
Loop


If you were making a game and wanted to repeat this overall routine, would you just repeat the routine or try to capture it into a sound file and just use that?   Hope I'm making sense.  Just curious what a good strategy would be.


Attached Files
.zip   G025.zip (Size: 22.34 KB / Downloads: 32)
Reply


Messages In This Thread
Building sounds with _SNDPLAYCOPY? - by james2464 - 10-12-2022, 09:04 PM
RE: Building sounds with _SNDPLAYCOPY? - by Pete - 10-12-2022, 09:29 PM
RE: Building sounds with _SNDPLAYCOPY? - by a740g - 10-13-2022, 03:06 PM
RE: Building sounds with _SNDPLAYCOPY? - by a740g - 10-12-2022, 09:54 PM
RE: Building sounds with _SNDPLAYCOPY? - by Pete - 10-12-2022, 10:08 PM
RE: Building sounds with _SNDPLAYCOPY? - by a740g - 10-13-2022, 03:09 PM
RE: Building sounds with _SNDPLAYCOPY? - by Pete - 10-13-2022, 03:41 PM
RE: Building sounds with _SNDPLAYCOPY? - by Pete - 10-13-2022, 03:50 PM
RE: Building sounds with _SNDPLAYCOPY? - by Pete - 10-13-2022, 05:56 PM
RE: Building sounds with _SNDPLAYCOPY? - by Pete - 10-14-2022, 07:51 PM



Users browsing this thread: 4 Guest(s)