1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-04 04:50:22 +00:00

Add tests for _NEWSOUND and _SNDOPEN

This commit is contained in:
Samuel Gomes 2022-12-31 04:22:42 +05:30
parent 4c80f6bcea
commit 31257262a8
5 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,14 @@
$Console:Only
Option _Explicit
Option _ExplicitArray
Dim h As Long: h = _NewSound(1024, 2, 32)
Print "Handle ="; h
Dim m As _MEM: m = _MemSound(h, 0)
Print "Size ="; m.SIZE
Print "Type ="; m.TYPE
Print "Element Size ="; m.ELEMENTSIZE
Print "Sound ="; m.SOUND
System

View file

@ -0,0 +1,5 @@
Handle = 1
Size = 8192
Type = 260
Element Size = 8
Sound = 1

View file

@ -0,0 +1,17 @@
$Console:Only
Option _Explicit
Option _ExplicitArray
Dim f As Long: f = FreeFile
Open "test.mp3" For Binary Access Read As f
Dim buffer As String: buffer = Input$(LOF(f), f)
Print "Size ="; Len(buffer)
Close f
Dim h As Long: h = _SndOpen(buffer, "memory")
Print "Handle ="; h
System

View file

@ -0,0 +1,2 @@
Size = 42018
Handle = 1

Binary file not shown.