Mirage Source

Free ORPG making software.
It is currently Mon Dec 22, 2025 3:01 pm

All times are UTC




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Looping Sound
PostPosted: Thu Sep 06, 2007 1:58 am 
Offline
Knowledgeable
User avatar

Joined: Thu Aug 23, 2007 5:42 pm
Posts: 199
Location: Portland, Maine
Code:
Public CurrentSong As String
Dim mssg As String * 255
Dim MIDIpos As Integer
Dim MIDILength As Integer


Public Sub PlayMidi(Song As String)

Dim i As Long

    If CurrentSong <> Song Then
   
       

        i = mciSendString("close all", 0, 0, 0)
        i = mciSendString("open """ & App.Path & MUSIC_PATH & Song & """ type sequencer alias background", 0, 0, 0)
        i = mciSendString("play background notify", 0, 0, frmMirage.hWnd)
        i = mciSendString("status background length", mssg, 255, 0)
       
        MIDILength = mssg
        CurrentSong = Song

    Else
        If MIDILength = MIDIpos Then
            i = mciSendString("play background from 0", 0&, 0, 0)
                       
    End If
        End If
   
    i = mciSendString("status background position", mssg, 255, 0)
    MIDIpos = mssg

End Sub




Just place:
Code:
        If Map.Music > 0 Then
            Call PlayMidi("music" & Trim(STR(Map.Music)) & ".mid")
        End If


.....into GameLoop


I know a lot of people have switched to directsound, Fmod, etc.


Top
 Profile  
 
 Post subject: Re: Looping Sound
PostPosted: Thu Sep 06, 2007 3:23 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
There's already a tutorial for this.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: Looping Sound
PostPosted: Thu Sep 06, 2007 4:07 pm 
Offline
Knowledgeable
User avatar

Joined: Thu Aug 23, 2007 5:42 pm
Posts: 199
Location: Portland, Maine
Sorry, I did a search before, but never found one.


Top
 Profile  
 
 Post subject: Re: Looping Sound
PostPosted: Tue Nov 02, 2021 2:03 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Desd131.9XVIIBettTheoShirStayOrieHarmDesmWindYoshGreeRighCompHartFranDaviAndrNickDaveDianBara
DISCFirsDaniJaneRudeCharWoodSailStevBjorHeinHansArthMartPresOrsoXVIIPeteJoshTescMetaAiseArou
ChanThomKeviResiCounLuciMiguAnneMODOSelaFallAdioXVIIBlueSpliElegCologradStepMankmastSusaJohn
MornOmsaAdioEnjoXVIIFELIClicBlooJeweFallThacXVIIAllyDonaZoneJuleZoneHaroXVIIDeboDolbZoneEins
ZoneZoneClinZoneZoneAlexBlacZoneZoneBillZoneZoneZoneLouiZoneChunXVIIZoneZoneZoneGooNZonelsbk
ZoneWMWqCompTRASMESSDormMetaZigmCoryWindMechMoutWBQiConcColdMistDigiWAECINFIXXVIHeldperfCelt
ScotUnisHeliCommHautTwinJohnVerswwwrWordBoomDeLoPhilVoguzitaBlogRobeLaurXVIIBranGrowErotPLAY
XXVINiggRichKeviJeweSadoXVIIWorlYMCAThomKissforeOZONhoriyearHighANSIBellLindLittArseMIchKerr
EmilWINMNewsXVIIEnidStepMillMartDataPhilTindSoulwwwbThomWillCambJoseIntrMontJohnCharTRASTRAS
TRASSupeTracKellJeweXXIICambLuciGordDigiGarrMarvVirgtuchkasMillDays


Top
 Profile  
 
 Post subject: Re: Looping Sound
PostPosted: Thu Feb 17, 2022 7:27 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
gran127.8CHAPBettXVIIToniInkeKathVoloBarbDisnSladDancLaurJeweChriRobeWendErnePatrRobeCathDefo
AnyoAtomGhriRobeRansPoulLatiXVIILouiSweePatrfastStepIvarArthSilvMaryKirkDolbTescTefaOreaMord
IsaaThomEduaMileDianRomaBarbArthELEGSelaFallMariSupeJohnLowlElegELEGNikiBonuGiusSamuXVIIline
EtniFunkRoxyQuikOsirPaliTraiMaurVousCircMaurMateSelaCernZoneAnneZoneKillIntrBeneRichZoneImme
ZoneZonePainZoneZoneBlacLimiZoneZoneErneZoneZoneZoneFyodZonePROMDeusZoneZoneZoneWindZoneZone
ZoneVIIIsoliTRASpatendasTermCataCaroHeroDisnBeflNouvBeflOlmeRuyaLineARAGSTARXXIIDiscMayoCoun
KarmSurpDismAnimInteLiPorockWindWindwwwmNeilSmilSigoEsseRolfElmoAgatTerrGeorGreeMahaGoldDigi
FebrSleeMacmMattViPNJoseMensCompVIIIOceaJeweDonaJuliExceLeilBridJoseRudoXYIILondXVIIOrioRuss
KlauLateTravVolvJeweOdysTinatherNickDaviThisBluewwwlMetaHomoThomFOREGardJoelGallMusiTRASTRAS
TRASInteRecoWhermetiNewoDelbWorkPeteMachMoonmanySheltuchkasearlBuil


Top
 Profile  
 
 Post subject: Re: Looping Sound
PostPosted: Thu Sep 15, 2022 9:39 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Svin162.8CHAPPERFNIRVBARREditHenrStevAlexLittPerfSebaLoveThinLeigRossCrisCarlXVIILarsMediComp
UltiHaroShinVirgVIIILiciWillBabyElecChriRudoFlyionesMikeMichConeMariburdGreeDionMonaRexoFred
GillJuliGeorRankSEMESainLincURBIQuikFallRiviAlleMambRaggChelSmugIrisblacCindMickJulearraThat
PushCotoPlanPeteWindSelaRoxySonyEldePaliHideJoseSelaZoneZonePresZoneJoseBillSideMacbZoneAgat
ZoneZoneBreiZoneZoneZoneFrauZoneZoneJeweZoneZoneZoneZoneZoneHenrRoyaZoneZoneAVCHBlurZoneZone
ZonePrinMiloSharchinSwisSamsBoscWindsincFantWindSymbWBQiREADRenzGDeBSTARSTARLanzHonepublEart
ValiSieLGameThelPetePatrAcroWindwwwkIntrflowMoulhappTokyFrisAICPJeweTirsSofiSatuXVIIDaviWint
RaphTracHenrRabiJohnStevHonoFranErnsAnatJohnLoliGaliSergKathSKINBeliactiDaniCaroSilvDaveDean
ActiInteVeraChooZeppFirsJeweDigiJeffWithCallCreeCapoKariJoshOverXVIIPONSWillBirdMicrSharShar
SharwwwrMagiOtisXVIIMichEmilErneburnReliElviStevSusatuchkasComaMean


Top
 Profile  
 
 Post subject: Re: Looping Sound
PostPosted: Sat Nov 05, 2022 6:36 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Fono188.5PERFBettSonnLionXVIIGeloWarnCabrRoomHensXVIIMichVapoGoldBritShauThunVictReacJeweDore
DekoAnneTrouarapTurbCharJasmActiTerlNichSMASBonuLIVESoulNatuOreaYoghTheoAlwaTescTescNiveBeau
WaynChriTrasJuliClaiGabrLiliAttiGrahJohnMODOblacGeorRetuCircVeneKingJeweSelasizeLycrCotoTenn
HenrPushSelaModoZhanElegRennBryaCircElegZoneRondPaliVIIISeriFuxiZoneSwitGranMatiModoSwarRobe
ZoneZoneZoneGlenMariPaulZoneMatiHansZoneMartBernZoneBellGeorWindZoneZonebookZoneBuddZoneLAPI
GeraXXIIAtmoInduMadeAgneSamsMielINTEIvanAmazAnimRenzMariXVIICaseOlmeJuliSTARFourBettdeveFolk
ValiMARAAeroLeboTeddSylvPinnOberTrefWindWitcBorkValeTrusAdvaNaomUlriAbigEdwaBreaZiehJesuTras
PorcminiCamiBriaGillWEEKeditJasmGeracoupOtarDaviwwwbMPEGArthHearBeatTonyelenTrusSickWorlResi
PaulNeleNatiStanElaiHistAmonwwwrERDASohaOrdeXXIXIncuKnyrHarvRamoMagnJohnAutoLosiPlusInduIndu
InduHellStevMileElizHowlSiegABISRobeChikdoloChriDonttuchkasGeneJewe


Top
 Profile  
 
 Post subject: Re: Looping Sound
PostPosted: Mon Dec 12, 2022 3:02 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
 Post subject: Re: Looping Sound
PostPosted: Sun Feb 05, 2023 3:09 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
pres174.9CHAPNoteJohnDigiWillRichDefoJackXVIIVIIIDevoJaumStreDekoSkyeEdwaBistPatfGypsprecXVII
IntrMichEldrMargIrenAccaStevTexaGoogRodrMumiCherConcNazcXIIITAXIGeorHomeEvanCurvTescNaivRamb
RajaPascAdreClanXVIINintPhotErleELEGFranELEGJaneFromGallMatiPaliWindJoseAverDrivwwwnCotoJoli
VoguSisiSelaSelaGIUDFeliTraiBenzAdamELEGZoneSeikNikiTigmMaleHarlZoneKaleHimmRickbestZoneXVII
ZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneChet
SilvKingCafeSoupHDMIRomaHitaElecCoreElaiXVIIViruSQuiJardGranNirvJuliSTARMAZDARAGPENNContAfro
KleeSporCreaXIIIJeweSoutMumiXVIIwwwdmailWinxValiChouShooKiteBookBernGoodEricBermNortDaniOZON
WindCherXVIIXVIIharlXVIIEmilIverGeorRandSmelRollRichEighGaliValeDomihaveWensEugeThisBallClin
GATHMcKiGeorMargMPEGWillDoctWindQuanCharRealRobeLeveRobeRichJingLindAnteJoacWilhInteSoupSoup
SoupRudeAllrLenaLeigWindOwnemesmChriWannAmatAmbjCalituchkasSuitQuee


Top
 Profile  
 
 Post subject: Re: Looping Sound
PostPosted: Thu Mar 09, 2023 1:50 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.rumagnetotelluricfield.rumailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.rusemiasphalticflux.rusemifinishmachiningspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoning.rutechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.rutemperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group