Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
128 Voices in Windows WINMM.DLL
#1
Until some clever one can come up with a way of accessing the 128 Voices in Windows WINMM.DLL using FB here is a simple program produced with BBC BASIC for Windows.

http://sionet.mysite.wanadoo-members.co.uk/voice.zip

Just unzip and click in VOICE.EXE which will display instructions and a list of the voices. The voices can be invoked from a BAT file etc such as

VOICE note(20-110),voice(1-128),duration(10-1000)

Try creating a .bat file using Notepad to play a Tinker Bell as

VOICE 90,113,1000

Or compile a QB program with just

shell "VOICE 90,113,1000"

The only problem is the screen going blank such as when compiling with FB.

Gordon :rotfl:
Reply
#2
being bored i want and looked up some winmm stuff
here some code to play .wav files

note you need lib libwinmm.a to use. you can get this from your friendly MingW package.

Code:
#define SND_ASYNC  &H1
#define SND_LOOP  &H8
#define SND_NODEFAULT  &H2
#define SND_SYNC  &H0
#define SND_NOSTOP  &H10
#define SND_MEMORY  &H4

Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As integer) As integer
sndPlaySound "chimes.wav", SND_ASYNC or SND_LOOP

sleep 3000
Reply
#3
This is in the article I put in QBExpress latest issue Big Grin
·~¹'°¨°'¹i|¡~æthérFòx~¡|i¹'°¨°'¹~·-
avinash.vora - http://www.avinashv.net
Reply
#4
oh cool

found a good site outside the msdn for function prototype's for winmm

http://www.webtropy.com/articles/art9-2....=winmm.dll
Reply
#5
Thanks for your help,

I am pretty ignorant when it comes to API calls etc, and a bit late to learn at the age of 71. I assume we could play MP3, WMA, MPEG3 etc using the WINMM.DLL as is done in other languages.

Gordon
Reply
#6
na never to late to learn anything just think of API as Function/Sub's that exist outside your program.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)