1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-09-07 08:20:18 +00:00
QB64-PE/tests/compile_tests/audio_mem_test/newsound_test.bas

77 lines
1.4 KiB
QBasic
Raw Normal View History

2022-12-30 22:52:42 +00:00
$Console:Only
Option _Explicit
Option _ExplicitArray
Dim h As Long: h = _SndNew(1024, 2, 32)
2022-12-30 22:52:42 +00:00
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
Print
_SndClose h
h = _SndNew(0, 2, 32)
Print "Handle ="; h
m = _MemSound(h, 0)
Print "Size ="; m.SIZE
Print "Type ="; m.TYPE
Print "Element Size ="; m.ELEMENTSIZE
Print "Sound ="; m.SOUND
Print
_SndClose h
h = _SndNew(1024, 0, 32)
Print "Handle ="; h
m = _MemSound(h, 0)
Print "Size ="; m.SIZE
Print "Type ="; m.TYPE
Print "Element Size ="; m.ELEMENTSIZE
Print "Sound ="; m.SOUND
Print
_SndClose h
h = _SndNew(1024, 1, 0)
Print "Handle ="; h
m = _MemSound(h, 0)
Print "Size ="; m.SIZE
Print "Type ="; m.TYPE
Print "Element Size ="; m.ELEMENTSIZE
Print "Sound ="; m.SOUND
Print
_SndClose h
h = _SndNew(1024, -10, 16)
Print "Handle ="; h
m = _MemSound(h, 0)
Print "Size ="; m.SIZE
Print "Type ="; m.TYPE
Print "Element Size ="; m.ELEMENTSIZE
Print "Sound ="; m.SOUND
Print
_SndClose h
h = _SndNew(1024, 1, -32)
Print "Handle ="; h
m = _MemSound(h, 0)
Print "Size ="; m.SIZE
Print "Type ="; m.TYPE
Print "Element Size ="; m.ELEMENTSIZE
Print "Sound ="; m.SOUND
Print
_SndClose h
h = _SndNew(-1024, 1, 16)
Print "Handle ="; h
m = _MemSound(h, 0)
Print "Size ="; m.SIZE
Print "Type ="; m.TYPE
Print "Element Size ="; m.ELEMENTSIZE
Print "Sound ="; m.SOUND
Print
_SndClose h
2022-12-30 22:52:42 +00:00
System