Okay I cheated. Fishing for info because I could never figure it out for a graphics screen.
Here is a snippet from my prog of approx about 21 years ago: It is mainly for short boom bang crash thats it, wrong etc (1-3 second )
You could play a music file but oh boy you must wait untill it finishes before the program can continue.
REM $DYNAMIC
CLEAR
DIM SHARED GetAnswer$, PlayIt$ ' Essentials from original program
SCREEN 0
WIDTH 80, 43
COLOR 14, 11
CLS
' Snippet from a program to add sound/music to a qb45 file
' Author : D M J Cronje. Coded 1989-09-26
' Translated to English and fully commented on 2010-06-25
' Run any DOS or WINDOWS program with the 'COMMAND` START (WIN98SE)
' This snippet is to play wave files
' I have not yet tried it using any other MediaPlayer but it should work.
' Almost a DOS version of WINDOWS RUNDLL32
' SNDREC32.EXE plays *.wav files but not MP3, Ogg
' It works on SCREEN 0
' Any other mode completely messes up my Screen display
' My screen card is a Nvidia Gforce 5500 using Microsoft's driver
'***** Switches for use with START.EXE *****
' /m Minimized in background
' /max maximized in foreground
' /r Restored in foreground (default)
' /w Wait. Will not return until the other program exits
'***** The following lines are to check if it works *****
LOCATE 1, 1: PRINT STRING$(79, "*");
LOCATE 4, 12: PRINT "Start";
LOCATE 16, 1: PRINT STRING$(79, "*");
'**** Do not use this it leaves your program minimized on the Task Bar
'**** SHELL "C:\WINDOWS\SNDREC32.EXE /open /play /close C:\WINDOWS\MEDIA\TADA.WAV"
'The following is the original code
'PlayIt$ = "START /m /w C:\WINDOWS\SNDREC32.EXE /open /play /close" + GetAnswer$
PlayIt$ = "START /m /w C:\WINDOWS\SNDREC32.EXE /open /play /close" + " C:\WINDOWS\MEDIA\CHIMES.WAV"
SHELL PlayIt$
LOCATE 6, 2: PRINT "That was CHIMES.WAV using a string ie PlayIt$ to play it"
SHELL "START /m /w C:\WINDOWS\SNDREC32.EXE /open /play /close C:\WINDOWS\MEDIA\TADA.WAV"
LOCATE 19, 2: PRINT "That was TADA.WAV using file TADA.wav"
COLOR 30 '**** 15 added to color to make it flash
LOCATE 25, 12
PRINT "Success ";
COLOR 15
PRINT "I am back in my QB45 program"
LOCATE 30, 12
PRINT "Waiting for a key press"
Wag$ = INPUT$(1) 'Wag=Wait for a keypress. Easier than using an INKEY$ loop
END

Passions: MyWife&Family QB4.5 Electronics Computers Hypnosis Humanity AncientHistory ReligionS. Psychology, Yoga Radio-Rx/Tx
(I trade you my mind)