i design games in FreeBasic, now i want to make a game which can
play sounds, and now can i ask you that "what is the most simplest
way for playing sounds in a game". thanks for your attention.
What is the most simplest way for loading sounds?
- BigBadKing
- Veteran
- Posts: 83
- Joined: Fri Oct 09, 2009 12:39 pm
- Location: Space
- Contact:
What is the most simplest way for loading sounds?
<a href="http://mccorp.orgfree.com">Macselent Corporation Offical Site</a>
- burger2227
- Veteran
- Posts: 2465
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Try QB64. It has sound functions that are simple to use.
Otherwise you may wait a long time here for an answer. Try the FB site.
Otherwise you may wait a long time here for an answer. Try the FB site.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
- BigBadKing
- Veteran
- Posts: 83
- Joined: Fri Oct 09, 2009 12:39 pm
- Location: Space
- Contact:
I found it! thanks.
Thanks, i found the solution.
personnaly, i use current windows system mcisendstring api to load and play mp3 files and it works.
(no added software needed)
(no added software needed)
Code: Select all
#include "win/mmsystem.bi"
Sub initsounds
Dim As String soundfic
soundfic="sounds/slash.mp3"
mcisendstring("open "+chr$(34)+soundfic+chr$(34)+" shareable alias slash",0,0,0)
soundfic="sounds/impact.mp3"
mcisendstring("open "+chr$(34)+soundfic+chr$(34)+" shareable alias impact",0,0,0)
'etc...
End Sub
Sub closesounds 'on exit
mcisendstring("close slash",0,0,0)
mcisendstring("close impact",0,0,0)
End Sub
Sub soundslash
mcisendstring("play slash from 0",0,0,0)
End Sub
Sub soundimpact
mcisendstring("play impact from 0",0,0,0)
End Sub
'etc...