How to resolve the algorithm Play recorded sounds step by step in the BBC BASIC programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Play recorded sounds step by step in the BBC BASIC programming language
Table of Contents
Problem Statement
Load at least two prerecorded sounds, and demonstrate as many of these features as you can: Describe: [Note: If it seems to be a good idea, this task may be revised to specify a particular timeline rather than just 'demonstrate these features'.] Where applicable, please categorize examples primarily by the audio facility used (library/API/program/platform) rather than the language if the language is incidental (e.g. "Mac OS X CoreAudio" or "mplayer" rather than "C" or "bash").
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Play recorded sounds step by step in the BBC BASIC programming language
Source code in the bbc programming language
SND_LOOP = 8
SND_ASYNC = 1
SND_FILENAME = &20000
PRINT "Playing a MIDI file..."
*PLAY C:\windows\media\canyon.mid
WAIT 300
PRINT "Playing the Windows TADA sound quietly..."
wave$ = "\windows\media\tada.wav"
volume% = 10000
SYS "waveOutSetVolume", -1, volume% + (volume% << 16)
SYS "PlaySound", wave$, 0, SND_FILENAME + SND_ASYNC
WAIT 300
PRINT "Playing the Windows TADA sound loudly on the left channel..."
volume% = 65535
SYS "waveOutSetVolume", -1, volume%
SYS "PlaySound", wave$, 0, SND_FILENAME + SND_ASYNC
WAIT 300
PRINT "Playing the Windows TADA sound loudly on the right channel..."
volume% = 65535
SYS "waveOutSetVolume", -1, volume% << 16
SYS "PlaySound", wave$, 0, SND_FILENAME + SND_ASYNC
WAIT 300
PRINT "Looping the Windows TADA sound on both channels..."
volume% = 65535
SYS "waveOutSetVolume", -1, volume% + (volume% << 16)
SYS "PlaySound", wave$, 0, SND_FILENAME + SND_ASYNC + SND_LOOP
WAIT 300
SYS "PlaySound", 0, 0, 0
PRINT "Stopped looping..."
WAIT 300
SOUND OFF
PRINT "Stopped MIDI."
END
You may also check:How to resolve the algorithm Generic swap step by step in the Mathematica / Wolfram Language programming language
You may also check:How to resolve the algorithm Comma quibbling step by step in the Fortran programming language
You may also check:How to resolve the algorithm One-dimensional cellular automata step by step in the OCaml programming language
You may also check:How to resolve the algorithm Stirling numbers of the first kind step by step in the Kotlin programming language
You may also check:How to resolve the algorithm Draw a cuboid step by step in the Java programming language