Phoenix 3.5.0 bug? - Solved, just diference!
#2
(02-19-2023, 04:25 PM)Petr Wrote: Hello. I found a MemSound bug (see attached test program) that makes Phoenix 3.5.0 MemSound unable to be used properly and causing my programs to crash, unlike QB64 2.02. The attached program exactly shows the occurrence of the error.

Code: (Select All)
$NoPrefix
s = SndOpen("0.mp3")
Dim As MEM l, r
l = MemSound(s, 1)
r = MemSound(s, 2)
Print "MemSound bug"
Print

Print "Value returned for left audio channel:"; l.SIZE
Print "Value returned for right audio channel:"; r.SIZE
chan& = SndLen(s) * 2 * SndRate

If l.SIZE = r.SIZE And r.SIZE = chan& Then Print "All ok!": End

Print "the size of the ONE audio track channel, that is expected:"; chan&
Print "Value returned with SndOpen:"; s;
If s > 0 Then Print "[correct audio file]" Else Print "[unsupported audio file]"
Print
Print "press key for try play this file"
Sleep
SndPlay s
If SndPlaying(s) Then Print "Both channels playing, bug is not in SndOpen." Else Print "Bug is in SndOpen"

'wroted in Phoenix IDE 3.5.0

This is working for me @Petr.

[Image: Screenshot-20230219-101403.png]

However, there has been a slight change in the behavior of _MemSound since we moved to the miniaudio backend. The wiki link has all the details and new examples. But to put this briefly, line "r.SIZE" will always return 0 since miniaudio internally uses interleaved audio for multi-channel sounds. Hence, the "All ok!" text will never print.
Reply


Messages In This Thread
RE: Phoenix 3.5.0 bug? - by a740g - 02-19-2023, 04:53 PM
RE: Phoenix 3.5.0 bug? - by Petr - 02-19-2023, 05:31 PM
RE: Phoenix 3.5.0 bug? - by Petr - 02-19-2023, 06:34 PM
RE: Phoenix 3.5.0 bug? - by a740g - 02-19-2023, 06:51 PM
RE: Phoenix 3.5.0 bug? - by Petr - 02-19-2023, 07:06 PM
RE: Phoenix 3.5.0 bug? - by a740g - 02-19-2023, 07:08 PM
RE: Phoenix 3.5.0 bug? - by a740g - 02-19-2023, 07:12 PM
RE: Phoenix 3.5.0 bug? - by Petr - 02-19-2023, 07:43 PM
RE: Phoenix 3.5.0 bug? - by a740g - 02-20-2023, 12:22 AM



Users browsing this thread: 4 Guest(s)