firelight technologies fmod ex - documentation.help · platform support fmod ex supports the...
TRANSCRIPT
FirelightTechnologiesFMODEx
Introduction
TheFMODExsoundsystemisanaudioengineforgamedevelopers,multimediadevelopers,sounddesigners,musiciansandaudioengineers,basedontheyearsofexperienceinaudiotechnology.Italsoaimshigh-topushtheboundariesofaudioimplementationforgamesandthelikewhileatthesametimeusingminimalresourcesandbeingscalable.
Someofthemostexcitingfeatures,whicharedescribedinmoredetaillaterare:
SuiteofbuiltinDSPspecialeffectswhichdonotrelyonanyplatformoroperatingsystem.(fora100%crossplatformaudioexperience).IncludeshighqualityI3DL2compatiblereverb!Next-genconsolesupport.PS3,Xbox360andWiiarefullysupported.Sounddesignerfocusandtool.Thenewsuiteoftoolsandfunctionality
meansFMODisusablebysounddesignersandmusiciansandnotjustprogrammers.Soundauthorswillhavetheabilitytocreatecomplexaudiomodelsandtweaktheminreal-timeoverthenetwork(oreveninternet)whilethegame/applicationisstillrunning!Full3Dsoundsupportincludinglinear/nonlinear/customrolloffmodels,
multiplelistenersupport,occlusionandobstruction,soundcones,andsupportforstereoormultichannelsamplesbeingplayedin3d!.Geometryocclusionengine.YoucansupplyFMODwithapolygonscene
anditwillautomaticallyoccludeandobstructdirectpathandreverbsignalsforyou!Virtualvoicestoallowagametoplaythousandsofsoundsatonceonlimited
hardwarewithoutworryingabouthandlingthelogictoswitchsoundsoffandonthemselves.Supportforover20fileformats.Advancedstreamingenginesupportinggaplessstitching/sentencingof
sounds,lowcpuoverhead,multiplestreamsupport,over-ridablefilecallbacksandmore.Compressedsampleplayback.ADPCM,MPEGandXMAareabletobe
storedinmemorywithoutdecompressingorstreamingthem,asiftheywerenormalstaticsamples!
Submixingandchannelgroups.2D/3Dsoundmorphing.Setupausersupplied5.1or7.12Dmix,and
morphbetweenitanddirectional3Dsound!Greatforenteringandleavingvolumetricsoundsources.Advanced'DSPnetwork'basedsoftwareenginetorivalthemostcomplex
softwaresynthesizerpackages,allperformedinreal-timewhilethegame/applicationisrunning!Matrixpanningallowssoundchannelstobemappedtoanyspeakerinanycombination.ObjectorientedAPIsupportingC,C++andC#.Plug-insupportforultimateflexibility.FMODandVSTpluginsare
supported.EverythinginFMODExhasbeendesignedwithfutureexpansioninmind.SIMDoptimized(ieSSE,VMX,VFPU,ALTIVEC)mixingandfilter
routinesforlowcpuoverhead.ItisfastertouseFMOD'ssoftwaremixerthangothroughthedriveroverheadofDirectSound!
Platformsupport
FMODExsupportsthefollowinghardwareplatforms.Nootheraudiosystemavailablesupportsthismanyplatforms.
MicrosoftWindows32/64bit.Linux32/64bit.MacintoshOSX32/64bit.SonyPlayStation2,Playstation3,PlaystationPortable,PlayStationVitaMicrosoftXbox360.NintendoWii,3DS,WiiU.AppleiOSdevices(iPhone,iPodTouch,iPad).AndroidGoogleNativeClient
That's14platformswithmorecoming!Noothergameaudiolibrarycanclaimtomatchanywherenearthatmanyplatforms!
Featurelist
UnifiedAPI.
Samples,streams,musicandCDaccessareaccessedviaa'Sound'classAlltypesofsounds,includingmods,midifiles,wavs,oggs,samples,streams,cdtracksandfsbfilescanbeaccessedseamlesslythroughtheoneAPI.
VirtualChannels
Virtualchannelsallowthousandsofchannelstoplayonlimited
hardware/software.Voicesareswappedinandoutaccordingto3ddistanceandpriority.
Plug-inSystem
Newfileformats,outputmodes,andencoderscanbeaddedordownloadedbytheuserasDLLs.VSTandWinampDSPplug-insupportforeffectsisincluded.
DigitalCDPlayback
DigitalCDDAplaybackallowsdspeffects/spectrumanalysis,rippingetcjustasifitwasanormalPCMfilebeingplayedback.
C++API
InFMODEx,aC++APIisavailableaswellasastandardCAPI.AllFMODAPIfeaturesareaccessiblethroughsimpleclasstypes,suchasthesystemclass,soundclass,channelclass,DSPclass.C/C++headersnamingconventionscloselymapped.Forexample-FMOD::System::init()intheC++headerwouldbecomeFMOD_System_Init()intheCheader.
C#andVisualBasicAPI
FMODExhasfullsupportformanagedC#andVisualBasicinterfaces
Multiplesimultaneoussoundcardsupport
FMOD3waslimitedbyonlysupporting1soundcardatatime,soifyouwantedtooutputtomultiplecardsatonceyouwouldhavetoinstancefmod.dllmultipletimes.Multipleoutputatoncesupportissimplydonebyinitializingmultiple'System'objects.
Multi-speakeroutputsupport
NowFMODhasafullmultichannelmixer,even2Dsoundscanbeplayedin5.1(or7.1!).Soundscanevenswaptheirchannelassignmentsaroundsoleftand
rightofastereosoundareswappedaround,mixedorallplacedintherearleftspeakerforexample.ThewaythisisavailableisFMODsupportspanmatrices.Anyinputsoundchannelcanberedirectedtoanyoutputspeaker,andontopofthispercentages/fractionallevelsaresupported,sotherearenoabsolutespeakerassignments.
ViaASIO,FMODExnowalsosupportsfullmultichanneloutputaccesstoupto16outputchannelsforhighendsounddevices.
Multi-speakerinputsupport
Multichannelwavs,oggsandFSBfilesaresupportedfor5.1musicforexample.
Lowlatencyrecordingsupport
FMODExsupportssuperlowlatencyrecording,processingandoutput.ViaASIOtherecording->DSP->playbacklatencycanbeaslowas1-3ms!Thisisgreatforrealtimeprocessingandplaybackofrecordedaudio.
EnhancedInternetfeatures
Internetaudiostreaming.Custominternetstreamingcodeisincluded,whichallowsforseamlessSHOUTcast,Icecastandhttpstreamingsupport.
Downloadcapability.AsideeffectoftheFMOD™modularfilesystemwhichsupportsnetworkfiles,evenstaticsamplescanbeloadedofftheinternet.InfactyoucanusetheFMOD™APItowriteanarbitraryfiledownloader!
Fileformatsupport
FMODcurrentlysupportsawiderangeofaudiofileformats.AIFF-(AudioInterchangeFileFormat)ASF-(AdvancedStreamingformat,includessupportfortheaudiotracksin
videostreams)ASX-(playlistformat-containslinkstootheraudiofiles.Toaccesscontents,
theFMODExtagAPIisused)DLS-(DownLoadableSoundformatformidiplayback.Canalsobeusedasa
standalonecontainerformatinFMOD)FLAC-(Losslesscompressioncodec)FSB-(FMODsamplebankformatgeneratedbyFSBankandFMODdesigner
tool)IT-(Impulsetrackersequencedmodformat.FMODExalsofullysupports
resonantfiltersin.ITfiles,andtheperchannelorperinstrumentechoeffectsend,thatcanbeenabledinModPlugTracker.ThisiscrossplatformeffectsupportanddoesnotrequireDirectXlikeotherlibrariesdo.)M3U-(playlistformat-containslinkstootheraudiofiles.Toaccesscontents,
theFMODExtagAPIisused)MID-MIDIusingoperatingsystemorcustomDLSpatches.MOD-(Protracker/Fasttrackerandotherssequencedmodformat)MP2-(MPEGI/IILayer2)MP3-(MPEGI/IILayer3,includingVBRsupport)OGG-(OggVorbisformat)PLS-(playlistformat-containslinkstootheraudiofiles.Toaccesscontents,
theFMODExtagAPIisused)RAW-(Rawfileformatsupport.Theusercanspecifythenumberofchannels,
bitdepth,formatetc)S3M-(ScreamTracker3sequencedmodformat)VAG-(PS2/PSPformat,playableonallplatforms!)WAV-(MicrosoftWavefiles,inlcludingcompressedwavs.PCM,MP3and
IMAADPCMcompressedwavfilesaresupportedacrossallplatformsinFMODEx,andothercompressionformatsaresupportedviawindowscodecsonthatplatform).WAX-(playlistformat-containslinkstootheraudiofiles.Toaccess
contents,theFMODExtagAPIisused)WMA-(WindowsMediaAudioformat)XM-(FastTracker2sequencedformat)XMA-(Xbox360only)XWMA-(Xbox360only)AudioQueue-(AppleiOSdevicesonly,supportsAAC,ALACandMP3
decodinginsoftwareandhardware)
Fileformatpluginsarealsosupportedsothenumberofformatssupportedislimitless!NoteAACisnotincludedinFMODExbecausetheonlyreferencesourceforthisisGPLandFMODExdoesnotcontainGPLprotectedcode.Tosupportthisausermayaddtheirownplugintosupportitexternally.
WavWriteroutput
Alloutputcanbewrittentoawavfile,andwithencoderplug-ins,itcanevenbeencodedinreal-timetoMP3orotherfileformats!
Sampleaccurateseeking
Mostsystemsseektoacompressionblockboundarysuchasmp3whichdecodesinblocksof1152samplesatatime.FMODExsupportssampleaccurateseekinganddecoding.Forexampleyoucouldseektosampleoffset1,000,000exactly,andextract1sampleofaudio.ThisaccuracyisgoodforDJtypeprogramsthatneedtosyncstreamsproperly.
Enhancedstreamingengine
Alowlatencystreamdecoderspreadsthedecodeburdenovertimeinsteadofdoingitinchunks(cpuspikes!)isincluded.Thismeanssmootherframe-ratesingame.
Enhancedsampleformatsupport
24bit,32bitintegerand32bitIEEEfloatsamplesupportisincluded.Alongsidestandardmono/stereosamplesupport,nowmulti-channelsamplesupportisincluded!Wav,oggandusercreatedsoundsareexamplesofsoundformatsthatsupportmulti-channelsound.
Advancedmixingengine
EnhancedoutputchannelsupportMostsystemsonlyallowmixingtomonoorstereooutput.FMODExallowsmixingtoanynumberofoutputchannels,forexample6channeloutput(withpanning)toallowfor5.1orDolbydigitaloutputinreal-timefor3dsound!Stereoand5.1areoptimizedasaspecialcasefast-pathforextraspeed.FullDSPdataflownetworkbasedmixingengine.
Newmixingroutineswithseparateresample/mix/effectsstages.Thisisanodebasedmultipleinput/outputDSPenginewhichisextremely
flexibleandallowssubmixing,splittingandadvancedspeakerlocationandselection.Highqualitymixing
Allmixingisfloatingpointwithfull32bitinterpolation.ResamplingmodessupportedareoNointerpolationoLinearinterpolationoCubicinterpolationo5pointsplineinterpolation!Allresamplingisdonewithtrue32bitprecisionusinga32bitfractional,itisnotdownscaledorcompromisedinanyway.MatrixPanning
Soundscanhavetheirinputchannelsmappedtoanyoutputchannelthroughasimple2Dmatrix.Forexampletheleftandrightpartsofastereosoundcanbepositionedanywhereina5.1speakerarray,inanycombination,inonespeaker,orallspeakers.Itistotallyflexible.Volumeramping
Linearvolumerampsbetweenpan/volumechangesareincludedasstandard.Thisremovesclicksinsoundthatchangespanorvolumefrequently.
3DSoundenhancements
Rolloffmodels.Logarithmic,linear,orcustomrolloffmodelssupported(pervoice).GeometryAPI.
ArevolutionarystepupinaudiorealismissupportedwithFMODEx'scustomgeometryengine.ThisallowspolygonscenestobeaddedtoFMODsothatitcanautomaticallycalculateobstruction/occlusionastheusermovesaroundtheworld.Multiplelistenersupport.
Multiple3dlistenersforsplitscreensupportaresupported.Soundconesupport.
Soundconesaresupportedtogivesoundsdirection.Stereo/multichannelsoundsupport.
Stereosamplesorevenmultichannelsamplescanbepositionedin3D,withtheircomponentchannels(ieleft/rightpartsofastereosound)positionedin3Dspace,configurablebytheuser.3D/2Dmorphing.
Nowsoundscanmorphbetweenbeingtotally3ddirectionalpointsources,and
descrete2Dsourceswithspeakerlevelssetbytheuser!Thisisgreatforenteringandleavingavolumetricsoundsource.Asanexample,astereo3Dsoundcanmorphbetweenbeingadirectionalpointsource,toastereo2Dsoundthatenvelopesyou,thenbackagain.
Userdelayonsoundplayback
Anew'setDelay'functionisavailablesoasoundcanbespecifiedtostartafteracertainperiodoftime(samplesorms)-canbecalledbetweeninitandstartonachannel
MIDISupport
FMODExincludesitsownsoftwaremidiplayback,sothatmidiplaybackworkscrossplatform.Patchsets/DLSbankshavetocurrentlybeprovidedwiththesong,orFMODExwilltakeadvantageofanyfoundintheoperatingsystem.
Stitching/sentencing
Seamlessstitching,forsoundsallowsonesoundtoendthenanotherstartsimmediatelyafterwardswithoutgaps.Thisisgreatforcommentaryorinteractivemusic.
Builtinsoftwarebasedspecialeffects.
FMODExhostsawholesuiteofspecialeffectssurpassinganysystemavailableconsideringitwillworkoneveryplatformFMODsupports.Herearesomeoftheeffectsthataresupportedasdefault.Morecanbeaddedthroughplugins.
Oscillators-sine,square,sawup,sawdown,triangleandnoisewaveoscillators.3Low-passwithvaryingspeed/quality.High-pass.2Echofilters.Flange.Distortion.Normalizer.
Compressor.Tremolo.Delay.ParametricEQ.Realtimepitchshifter(changespitchnotplaybackspeed)Chorus.Freeverbsimplereverb.SFXhighqualityI3DL2compatiblereverb.
Channelgroups,andsubmixing.
Multiplechannelgroupscanbecreatedandchannelsassignedtothesegroups.Fromthereavarietyofcommandscanbeissuedonagroupsuchasvolume,mute,frequency,pauseandmore.Mastervolumecanbecontrolledthroughtheuseofachannelgroup,andmultiplechannelgroupscanbeusedformultiplemastervolumeassignments,whichisveryusefulforthingslikerelativevolumeofGUIsoundsvsingamesoundsforexample,ormusicvsspecialeffectsvolume.Thisallowsgreaterflexibilityincontrollingaudiolevels.
Submixingallowseffectstobeplacedongroupsofchannels,withoutaffectingotherchannels.ThisisanadvancedfeaturewhichisreallyusefulforsavingCPUusageorkeepingsomesoundsdrywhileothersareaffectedbyDSPeffectsforexample.
Enhancedcallbacksupport
'latencyadjusted'or'real-time'flagforcallbacks.Thismeansyoucangetacallbackatmixtime,oraudibletime(the2aredifferent,bythelengthoftimedeterminedbythemixer'sbuffersize)sampleaccurateusertimercallbacks(msorsamplebased)forglobalorper
channel
Memoryandfilesystemoverrides
FMODExofcourseallowstheusertooverrideFMOD'sfileandmemorysystemthroughcallbacks.
FMODDesignertoolandAPI
SoundDesignerTool
Thiseasytouseandflexiblesounddesignertoolallowssimpleorcomplexmulti-layer/effect/envelopebasedsoundeventstobemodeledandcreatedbythesounddesigner.Thecapabilitieswouldincludesuchthingsaslayering,effects,randombehaviour,andstitchingofsounds.
Theaimisforasounddesignertototallydesigntheingameaudiofromanexternaltool,andsimplysupplytheprogrammerwithassetsandaneventlisttoimplement.Iftheaudiobehaviourneedstobechangedwithinthegame,itshouldbeuptothesounddesignernottheprogrammertodothis.
Thelayeringscreenallowsforcomplexaudiomodels(suchasacarenginewithmultiplecrossfadingchannels,soundsandeffects)tobetotallycontrolledbytheauthor,thenalltheprogrammerhastodoiscallthepreviouslydefinedsetofsimplecommands,suchasSendEventandUpdateParameter.Inthecarmodelcast,the‘parameter’inUpdateParametermightjustbe‘revs’or‘torque’orsomeotherEnglishtypevalue,ratherthanavaluedefinedbyaprogrammer.
FMODEventAPIThisisanAPIforprogrammerstointerfacetothedataproducedbytheFMODDesignertool.ThisAPIconsistsofverysimplecommandssuchas:
oInitoCloseoLoadoGetEvent/StartoUpdateParameterAlleventbehaviourisspecifiedbytheFMODDesignertool,nottheprogrammer,tomakeittotallydatadriven.
Networktweakingfeatures
Aspartofthesounddesignertool,theusercantweaktheaudioparametersinagameoverthenetworkwhilethegameisrunning!Asounddesigner
nowgetsevenmorecontrolovertheoutcomeoftheaudiomixbybeingabletoaltersoundparameterssuchasvolume/frequency/randomizationetcwhilethegameisrunning.Thiswillsavehoursoftimeinsteadoftheusualroutineoftesting,quitting,tweaking,recompiling,running.Evenwiththatoldmethoditcanleadtomistakeswhichtakeseveralattemptstoperfect.Usingthenetworktweakingtoolthesounddesignercangetitrightfirsttime.
FirelightTechnologiesFMODEx
TERMINOLOGY/BASICCONCEPTS.Introduction
ThroughoutFMODdocumentationcertaintermsandconceptswillbeused.Thissectionwillexplainsomeofthesetoalleviateconfusion.
ItisrecommendedwhenyouseeanAPIfunctionhighlightedasalink,thatyouchecktheAPIreferenceformoredetail.
Samplesvsbytesvsmilliseconds
WithinFMODfunctionsyouwillseereferencestoPCMsamples,bytesandmilliseconds.TounderstandwhatthedifferenceisadiagramhasbeenprovidedtoshowhowrawPCMsampledataisstoredinFMODbuffers.
Inthisdiagramyouwillseethatastereosoundhasitsleft/rightdatainterleavedoneaftertheother.
Aleft/rightpair(asoundwith2channels)iscalledasample.Becausethisismadeupof16bitdata,1sample=4bytes.Ifthesamplerate,orplaybackrateis44.1khz,or44100samplespersecond,
then1sampleis1/44100thofasecond,or1/44thofamillisecond.Therefore44100samples=1secondor1000msworthofdata.
Toconvertbetweenthedifferentterminologies,thefollowingformulascanbeused.
ms=samples*1000/samplerate.samples=ms*samplerate/1000.samplerate=samples*1000/ms.bytes=samples*bits*channels/8.samples=bytes*8/bits/channels.
SomefunctionslikeSound::getLengthprovidethelengthinmilliseconds,bytesandsamplestoavoidneedingtodothesecalculations.
Sounds.Samplesvscompressedsamplesvsstreams.
Whenasoundisloaded,itiseitherdecompressedasastaticsampleintomemoryasPCM(samples),loadedintomemoryinitsnativeformatanddecompressedatruntime(compressedsamples),orstreamedanddecodedinrealtime(inchunks)fromanexternalmediasuchasaharddiskorCD(streams).
"Samples"aregoodforsmallsoundsthatneedtobeplayedmorethanonceatatime,forexamplesoundeffects.ThesegenerallyuselittleornoCPUtoplaybackandcanbehardwareaccelerated.SeeFMOD_CREATESAMPLE."Streams"aregoodforlargesoundsthataretoolargetofitintomemoryand
needtobestreamedfromdiskintoasmallringbufferthatFMODmanages.ThesetakeasmallamountofCPUanddiskbandwidthbasedonthefileformat.Forexamplemp3takesmorecpupowertodecodeinreal-timethanaPCMdecompressedwavfiledoes.Astreamingsoundcanonlybeplayedonce,notmultipletimesduetoitonlyhaving1filehandleperstreamand1ringbuffertodecodeinto.SeeFMOD_CREATESTREAM."Compressedsamples"areanewadvancedoptionthatallowstheuserto
loadacertaincompressedfileformat(suchasIMAADPCM,MP2,MP3andXMAformatscurrently),andleavethemcompressedinmemorywithoutdecompressingthem.TheyaresoftwaremixedontheCPUanddon'thavethe'onceonly'limitationofstreams.TheytakemorecputhanastandardPCMsample,butactuallylessthanastreamduetonotdoinganydiskaccessandmuchsmallermemorybuffers.SeeFMOD_CREATECOMPRESSEDSAMPLE.
Youmaynotice"Sample"and"Stream"terminologyisusedherebutthereisnoclassnamewiththisterminologyinthem.ThatisbecauseallFMODAPIsarenowconsolidatedintoone"Sound"type.BydefaultSystem::createSoundwillwanttodecodethewholesoundfullyintomemory(ie,asadecompressedsample).
Tohaveitstreaminrealtimeandsavememory,usetheFMOD_CREATESTREAMflagwhencreatingasound,orusethehelperfunctionSystem::createStreamwhichisessentiallythesameasSystem::createSoundbutjusthastheFMOD_CREATESTREAMflagaddedinautomaticallyforyou.TomakeacompressedsampleuseSystem::createSoundwithFMOD_CREATECOMPRESSEDSAMPLE.
HardwarevsSoftware
FMODExhasitssupportforeitherhardwareacceleratedsoundplayback,viaDirectSoundorconsolehardwareAPI's,butFMODalsohasitsownfallbacksoftwaremixingmechanism.Note:OnlyWindowswithahighspecsoundcard,PS2,PSP,andWiisupportFMOD_HARDWARE.Withhardwareandsoftwarebasedsoundscomescertainfeaturesandtrade-offswhentheyareused.Hardwaresounds(createdwithFMOD_HARDWAREusuallyhavelowerCPUimpact,havelowerlatency,andcangetaccesstohardwarereverblikeEAX4forexample.Hardwaresoundsarealsolimitedinsomeways,forexampleduetoDirectSoundlimitationsonWindowsforexample,arbitrarylooppointsarenotsupportedwithstaticsamples(itiseitherloopthewholesound,ordon'tloopthesample),andnonreverbeffectscannotbeplayedonthem(iechorus,distortion,lowpassetc).
Softwaresounds(createdwithFMOD_SOFTWAREsometimeshavehigherCPUimpact,butcandomuchmore,forexamplecomplexlooping,realtimeanalysis,effectsandsampleaccuratesynchronization.
HardwarevsSoftware.
HardwarePros.
Usuallylowerlatency.(AlthoughonconsolesorASIOoutputinwindows,usingFMOD_SOFTWAREcanhaveextremelylowlatencyaslowas2-5ms)
LessCPUtime.(AlthoughonWindowssoftwareisalotfasterduetobadhardwaresoundcarddriverdesign,andinefficienciesintheDirectSoundAPI).OnWindows,accesstoEAX2,EAX3,EAX4,I3DL2reverbpervoice.
(FMODExhasitsownhighqualityI3DL2reverbsolutioninsoftware,butmaynotbeasflexibleorhavethequalityofEAX4forexample.).Freehardwareobstruction/occlusion(thisisusuallyequivalenttoalowpass
filterorreverbattenuationwhichcanalsobeperformedinsoftwareatsomeexpensetotheCPU),butonlyonEAXcompatiblesoundcardsonWindows.FMOD_SOFTWAREiscrossplatform.OnPS2,PSP,XBox,GameCube,Wii,hardwarevoicescanplaybackADPCM
compressedsounddatawithnocpuhit.Onalimitednumberofsoundcards,hardware3dsoundswillberealtime
encodedintoanAC3DolbyDigitalstreamviaadigital/opticaloutputonthecardsoanamplifiercanplayitin3Dsurroundsound.FMODsoftwaremixingnowsupports5.1and7.1mixingatslightlyhigherCPUexpense,andwillworkviaanalogoutputssuchassoundcardswith3stereojackstoruntoa5.1speakersetup.
HardwareCons.
Nopointtopointloopingonwin32.XBoxandGameCubeallowpointtopointloopingandPS2onlyallowsloopstart,sothereforecrossplatformcompatibilitycannotbeassured.Noaccesstohardwareeffectspervoice.MostPCsoundcardsandconsolesdo
notsupporthardwareacceleratedeffectssuchaslowpass,distortion,flange,chorusetc.Noloopcountcontrol.Asoundcanonlybeloopedinfinitelyornotatall.Inconsistentfeaturesupport,forexampleaPS2doesnotsupportEAXreverb,
and3dsoundimplementationsalwayssounddifferent.SometimesalotslowerthanFMODsoftwaremixingonWindows.Virtual
voicesthatmakealotofstatechangeswhenswappinginandoutcanbeveryexpensiveinhardware(noticableframeratedrops),butforfreeinsoftware.
SoftwarePros.
Consistentsoundoneveryplatform,thereisnovariationinplayback.Sampleaccuratesynchronizationcallbacksandevents.Compressedsampleplaybacksupportwithoutusingstreams.Crossplatformreverb.
Complexloopingandloopcounts.Reversesampleplayback.Spectrumanalysis.Filtersperchannelorfortheglobalmix,toperformeffectssuchaslowpass,
distortion,flange,chorusetc.ComplexDSPnetworkconstructionforrealtimesoundsynthesis.Accesstofinalmixbuffertoallowanalyzing,drawingtoscreen,orsavingto
file.
SoftwareCons.
Latencyonsomesounddevices(suchaswin32waveoutoutput)canbehigh.Memoryusageishigherduetoallocationofmixunitsandmixbuffers,or
simplythefactofhavingtostoresoundsinmainramratherthansoundram.(becominglessrelevantthesedays).
Channelsandsounds.
Whenyouhaveloadedyoursounds,youwillwanttoplaythem.WhenyouplaythemyouwilluseSystem::playSound,whichwillreturnyouapointertoa
Channel/FMOD_CHANNELhandle.TheindexthatSystem::playSoundrequiresisgenerallyrecommendedtoalwaysbeFMOD_CHANNEL_FREE.ThiswillmeanFMODwillchooseanonplayingchannelforyoutoplayon.
2Dvs3D.
A3Dsoundsourceisachannelthathasapositionandavelocity.Whena3Dchannelisplaying,itsvolume,speakerplacementandpitchwillbeaffected
automaticallybasedontherelationtothelistener.Alisteneristheplayer,orthegamecamera.Ithasaposition,velocitylikeasoundsource,butitalsohasanorientation.
Thelistenerandthesourcedistancefromeachotherdeterminethevolume.Thelistenerandthesourcerelativevelocitydeterminesthepitch(dopplereffect).Theorientationofthelistenertothesourcedeterminesthepanorspeakerplacement.
A2Dsoundissimplydifferentinthatitisnotaffectedbythe3Dsoundlistener,anddoesnothavedopplerorattenuationorspeakerplacementaffectedbyit.A2DsoundcancallChannel::setSpeakerMix,Channel::setSpeakerLevelsorChannel::setPan,whereasa3Dsoundcannot.A3Dsoundcancallanyfunctionwiththeword3Dinthefunctionname,whereasa2Dsoundcannot.
Foramoredetaileddescriptionof3Dsound,readthetutorialinthedocumentationon3Dsound.
FirelightTechnologiesFMODEx
GETTINGSTARTED.Introduction
TheFMODExAPIhasbeendesignedtobeintuitiveandflexible.Inthistutorialanintroductiontousingtheengineaswellasthekeyissuesinvolvedinusingiteffectivelywillbeexplained.
Setup.Whattoincludeandwhattolink.
See"Platformspecificissues"inthisdocumentationtoseewhatfilestolinkintoyourprojecttomakeFMODExfunctionforeachplatform.
InC/C++,include"fmod.h"ifyouwanttousetheCinterfaceonly.Include"fmod.hpp"ifyouwanttousetheC++interface.Notethattheconstants,callbacks,definesandenumsarestoredwithinfmod.h,sofmod.hppincludesfmod.h.IfyouareusingC++youwillbeinterchangingbetweenboth.
ForDelphi,C#andVisualBasic,youwillseeequivalentheaderstouseinyourapplication.
Initialization.
ThesimplestwaytoinitializefmodistosimplycallSystem::init.Thatsit.FMODwillsetupthesoundcardandotherfactorsusingdefaultparameters.
WhenlookingatthedocumentationforSystem::init,rememberthatthemaxchannelsparameteristhenumberofsimultaneousvoicesyouwouldliketobeplayedinyourgameatonce.Thisisnothingtodowithhowmanyhardwarevoicesthesoundcardmayhave,orhowmanysoftwaremixedvoicestheremaybeavailable.
Thesevoicesarevirtualvoices.Thismeansyoucanplayasmanysoundsasyouwantatonceandnotworryabouttheissueofhardwareorsoftwareresourcesavailable.YoucansafelyplayEVERYsoundinyourgamesimultanouslywithoutfearofSystem::playSoundrunningoutofvoicesorstealingotherplayingvoices,andforthisreason,itisacceptabletosetmaxchannelstoahighnumber.1,100,200,1000.Itisuptoyouandyourtypeoftitle.Note1000voicesplayingatoncedoesnotnegativelyimpactperformancebecausethemajorityofthosewillnotbeaudible(nonaudiblevoicesare'virtualized').ThereisonlyasmallcostinsortingandswappingthosevoicesastheFMODExvirtualvoicemanagercontrolswhichvoicesareheardandwhicharen't.Let'shavealookatanexampleofinitializingFMODEx.
FMOD_RESULTresult;
FMOD::System*system;
result=FMOD::System_Create(&system;); //Createthemainsystemobject.
if(result!=FMOD_OK)
{
printf("FMODerror!(%d)%s\n",result,FMOD_ErrorString(result));
exit(-1);
}
result=system->init(100,FMOD_INIT_NORMAL,0); //InitializeFMOD.
if(result!=FMOD_OK)
{
printf("FMODerror!(%d)%s\n",result,FMOD_ErrorString(result));
exit(-1);
}
HerewehavethemostbasicsetupoftheFMODengine.Itwilluse100virtualvoices.Notethatmod/s3m/xm/it/midiformatsuse1voicewhenplaying.Donotextendthevoicecountherethinkingitwillgivemorevoicestothesefileformatswhenplaying,becausetheywon't.Theseformatshavetheirowninternalpoolvoicesthattheyuse.
Configurationoptions
Theoutputhardware,FMOD'sresourceusage,andothertypesofconfigurationoptionscanbesetifyoudesirebehaviourdifferingfromthedefault.ThesearegenerallycalledbeforeSystem::init.Themainonesare.
System::setOutput-Tochooseanalternativeoutputmethod.ForexampleyoucanchoosebetweenDirectSound,WinMM,ASIO,no-sound,wave-writeroranumberofotheroutputoptionsinwindows.Eachplatformwillhavetheirownoutputchoices.Don'tcallthisunlessyouneedto.Youdon'tneedtocallitespeciallyifallyouaredoingissettingthedefault.Thatwouldbepointless.System::setDriver-Tochooseanalternativesoundcarddriverforaparticular
outputmode.Thisisusefulifyouhavemultiplesoundcardsandwanttochooseonebesidethedefault.Again,don'tbothercallingthisifallyouaredoingissettingittothedefault.YoushouldenumeratedeviceswithSystem::getNumDriversandSystem::getDriverInfoifyouwanttogivetheuserthechoice.System::setHardwareChannels-Callthisifyouwanttolimitthenumberof
audiblehardwarevoices,orrequestthataminimumnumberofhardwarevoicesbeavailablebeforerevertingto100%softwaremixedvoicesupport.The'minimum'optionistoguaranteeacertainnumberofvoicesareaudibleatonce.System::setSoftwareChannels-Callthisifyouwanttosetadifferentnumber
ofaudiblesoftwaremixedvoicesusedbyFMODChannels.ThiswillbepurelyforpolyphonyreasonsorCPU/memoryresourceusagereasons.Donotadjustthisthinkingitwillgivemorevoicestomod/s3m/xm/it/midiformats.Theydonotusethischannelpoolandhavetheirowninternally.System::setSoftwareFormat-CallthistochangesettingsintheFMOD
softwaremixer.Thisincludessamplerate,outputformat(ieintegervsfloat),outputchannelcount(ieformulti-outputchannelasiodevicesforexample),memoryusageandmixingquality.System::setDSPBufferSize-Callthisonlyifthereareissueswithstutteringon
slowmachinesorbadsoundcarddrivers.Thiswillaffectsoftwaremixinglatency,andcanhaveadverseeffectsifmisused.Sometitlesmaywanttolettheuserselectbetween'lowlatency'and'compatible'modes,sotheycantradeofflatencytoaudiblestabilitybyadjustingthebuffersize.System::setSpeakerMode-Callthistosettheoutputspeakermode.Thisonly
affectstheFMODsoftwaremixingengine.Thedefaultisstereo(5.1onxboxandxbox360and7.1onps3),andcanbechangedifdesired.Notespeakermodeswithhigherchannelcountsleadstohighermemoryusage.
HereisanexampleofinitializingFMODwithsomeconfigurationoptions.Remembertheseoptionsarejustthat.Optional!Donotcalltheseifyoudon'tneedtoanddon'tjustcutandpastethiscodewithoutknowingwhatitdoes!Forexampleyoucan'tjustgosettingthespeakermodeto5.1iftheuserdoesn'thavea5.1speakersystem!
FMOD_RESULTresult;
FMOD::System*system;
result=FMOD::System_Create(&system;); //Createthemainsystemobject.
ERRCHECK(result);
result=system->setSpeakerMode(FMOD_SPEAKERMODE_5POINT1); //Settheoutputto5.1.
ERRCHECK(result);
result=system->setSoftwareChannels(100); //Allow100softwaremixedvoicestobeaudibleatonce.
ERRCHECK(result);
result=system->setHardwareChannels(32,64,32,64); //Requirethesoundcardtohaveatleast322Dand3Dhardwarevoices,andclampittousing64ifithasmorethanthis.
ERRCHECK(result);
result=system->init(200,FMOD_INIT_NORMAL,0); //InitializeFMODwith200virtualvoices.
ERRCHECK(result);
Loadingandplaying.
Toplaythesoundsyoumustloadthemfirst!Todothis,useSystem::createSoundorSystem::createStream.Asoundbydefaultwilltrytodecompressthewholesoundintomemory(ifSystem::createSoundisused),thatiswhyifthesoundislarge,itisbettertostreamit(byusingSystem::createStream)whichmeansitwilldecodeatruntime,withasmallfixedsizememorybuffer,andnotusethememoryasamplewould.FormoreonthisseetheTerminology/BasicConceptstutorial.
Hereisanexampleofloadinganmp3file.BydefaultSystem::createSoundwilldecompressthewholeMP3into16bitPCM.Thiscouldmeantheamountofmemoryusedismanytimesmorethanthesizeofthefile.
FMOD::Sound*sound;
result=system->createSound("../media/wave.mp3",FMOD_DEFAULT,0,&sound;);
ERRCHECK(result);
Hereisanexampleofopeninganmp3filetobestreamed.System::createStreamwillopenthefile,andpre-bufferasmallamountofdatasothatitwillbeabletoplayinstantlywhenSystem::playSoundiscalled.
FMOD::Sound*sound;
result=system->createStream("../media/wave.mp3",FMOD_DEFAULT,0,&sound;);
ERRCHECK(result);
Tospecificallymakeasoundsoftwaremixed,youmustuseFMOD_SOFTWARE.ThisisnecessaryifyouwanttousethingssuchasDSPeffects,spectrumanalysis,getwavedata,pointtopointloopingandothermoreadvancedtechniques.
FMOD::Sound*sound;
result=system->createSound("../media/wave.mp3",FMOD_SOFTWARE,0,&sound;);
ERRCHECK(result);
Hereisanexampleofloadinganmp3fileintomemoryasasample,butnotdecompressingitwhenitloads,usingtheuseFMOD_CREATECOMPRESSEDSAMPLEflag.ThiswillautomaticallymakethesoundsoftwaremixedifFMOD_HARDWAREorFMOD_SOFTWAREisnotspecified.HardwaresoundplaybackcannotsupportthisflagunlesstheformatisADPCMonXbox,VAGonPS2/PSPandGCADPCMonGamecube/Wii.PlatformslikePS3andXbox360arealldoneonethecpu(usuallyadifferentcoretothemaincpusoitdoesnotaffectperformance).
FMOD::Sound*sound;
result=system->createSound("../media/wave.mp3",FMOD_CREATECOMPRESSEDSAMPLE
ERRCHECK(result);
Warning!Thismodeistobeusedwithcare.ItactsjustlikeaPCMsample,butincursaheavierCPUcostatruntime.FMODdecodesthesoundfromitscompressedformatasitplaysit.
Nowtoplaythesoundorstream.ThisisassimpleascallingSystem::playSound.
FMOD::Channel*channel;
result=system->playSound(FMOD_CHANNEL_FREE,sound,false,&channel;);
ERRCHECK(result);
Thissoundisnowplayinginthebackground!Yourappwillcontinueonfromthispoint.ThingstonoteaboutplaySound.Youdonotneedtostorethechannelhandleifyoudonotwantto.That
parametercanbe0orNULL.Thisisusefulifyoudon'tcareaboutupdatingthatinstanceofthesound,andifitisaoneshotsound(ieitdoesnotloop).Forexample
FMOD::Channel*channel;
result=system->playSound(FMOD_CHANNEL_FREE,sound,false,0);
ERRCHECK(result);
Youcanstartthesoundpaused,soyoucanupdateitsattributeswithoutthechangebeingaudible.Thatiswhatthe'paused'parameterisusedfor.Forexample,ifyousetittotrue,setthevolumeto0.5,thenunpausedit,thesound
wouldplayathalfvolume.Ifyouhadsetthepausedflagtofalseandexecutedthesamelogic,youmayhearthesoundplayatfullvolumeforafractionofasecond.Thiscanbeundesirable.
FMOD::Channel*channel;
result=system->playSound(FMOD_CHANNEL_FREE,sound,true,&channel;);
ERRCHECK(result);
result=channel->setVolume(0.5f); //Setthevolumewhileitispaused.
ERRCHECK(result);
result=channel->setPaused(false); //Thisiswherethesoundreallystarts.
ERRCHECK(result);
A'channel'isaninstanceofasound.Youcanplayasoundmanytimesatonce,andeachtimeyouplayasoundyouwillgetanewchannelhandle.Notethatthisisonlyifitisnotastream.Streamscanonlybeplayedonceatatime,andifyouattempttoplayitmultipletimes,itwillsimplyrestarttheexistingstreamandreturnthesamehandlethatitwasusingbefore.Thisisbecausestreamsonlyhave1streambuffer,and1filehandle.Toplayastreamtwiceatonce,openandplayittwice.AlwaysuseFMOD_CHANNEL_FREE.ThisletsFMODpickthechannelsforyou,meaningthatitusesFMOD'schannelmanagertopickanonplayingchannel.FMOD_CHANNEL_REUSEcanbeusedifthedesiredeffectistopassinanexistingchannelhandleandusethatfortheplaysound.ItcanbeusedtostopasoundspawninganewinstanceeverytimeSystem::playSoundiscalled,andonlyplayonceatatime.Youdonothaveto'free'or'release'achannelhandle.ChannelscomefromapoolwhichyoucreatedbyspecifyingachannelcountinSystem::init.Channelhandlesgetre-usedifoldsoundshavestoppedonthem.Ifallchannelsareplaying,thenoneoftheexistingchannelswillgetstolenbasedonthelowestprioritysound.MakesurethisdoesnthappenbysimplyincreasingthechannelcountinSystem::init.Achannelbecomesinvalidonceitisfinishedplaying.Thismeansyoucan'tupdateit,anddoingsowouldbepointlessanywaybecuaseitisn'tgoingtostartagain.ReferencingastoppedchannelwillmostlikelyresultinanFMOD_ERR_INVALID_HANDLE.
Update.(Thisisimportant!)
ItisimportantthatSystem::updatebecalledonceperframe.Donotcallthismorethanonceperframe,asthisisnotnecessaryandisjustinefficient.ThisfunctionupdatesthefollowingaspectsofFMODEx.PlatformspecificroutinessuchastheonceaframecommandpacketsendtotheIOPonthePlayStation2.Withouttheupdatenosoundwouldbeaudibleonthisplatform.Virtualvoiceemulation.Withoutupdatebeingcalled,virtualvoiceswouldpause.3Dvoicecalculation.Ifupdateisnotcalled,soundswillnotaudiblymovein3Deventhoughthechannelorlistenerhasbeenhadits3Dattributesset.Geometryengine.TheFMODpolygon/geometryengineisupdatedfromthisfunction.Withoutit,theocclusion/obstructionpropertiesdefinedbytheuserwillnotbeaudible.Nonrealtimeoutput.FMOD_OUTPUTTYPE_NOSOUND_NRTandFMOD_OUTPUTTYPE_WAVWRITER_NRTneedthisfunctiontobecalledtoupdatetotheoutput.(iewritetothefileinFMOD_OUTPUTTYPE_WAVWRITER_NRT).Streamingengine,ifFMOD_INIT_STREAM_FROM_UPDATEisspecified.Iftheuserhasdecidedtodrivethestreamingenginethemselvesfromthemainthread,thenupdatemustbecalledregularlyorthestreamerwillstutterandcausebufferunderrun.
Shutdown.
CallSystem::releasetoclosetheoutputdeviceandfreeallmemoryassociatedwiththatobject.Channelsarestopped,butsoundsarenotreleased.Youwillhavetofreethemfirst.Youdonothavetostopchannelsyourself.Youcanofcoursedoitifyouwant,itisjustredundant,butreleasingsoundsisgoodprogrammingpracticeanyway.YoudonothavetocallSystem::closeifyouarereleasingthesystemobject.System::releaseinternallycallsSystem::closeanyway.
Resourceusageconfiguration.
Inapplicationdevelopment,somedeveloperswillwanttohavealldiskormemoryaccessgoingthroughtheirownfunctionsratherthanusingthedefaultsystem.InFMODEx,youcanconfiguretheFMODfilesystemtouseyourownfileroutineswithSystem::setFileSystem.
TomakeFMODuseyourmemorysystem,ortoconfineFMODto1blockofmemorythatitwillnotallocateoutsideof,useMemory_Initialize.
FirelightTechnologiesFMODEx
TRANSITIONINGBETWEENFMOD3ANDFMODEX.APIDIFFERENCESIntroduction
ThissectionwilldescribesomeofthedifferencesbetweenFMOD3andFMODEx,ifyouareusedtotheoldAPIandhavedifficultyunderstandingthedifferencebetweenthe2APIs.Itwillanswersomeofthemorecommonquestionsusuallybeginningwith"Whathappenedto.."
FMOD3hadstreams,sampleandmusicAPIs,nowwhat?
AllcombinedintotheoneclassSound.ThisleadstoamuchleanerandstreamlinedAPI.TocreateastreamjustuseSystem::createStreamorFMOD_CREATESTREAMflagwithSystem::createSound.Musicfilesloadedwiththeoldmusicapiwouldjustbeopenedasastream.Asyoucouldnowloadthesetypesofsoundsasastaticsample(yesyoucandecodeawholemodintomemoryasPCM)itwouldpossiblytakehundredsofmegabytesofram,soevenifyouspecifySystem::createSoundtoloadamod/s3m/xm/itfile,itwillstillopenitasastream.Toforceittoasample(notusedasoften)simplyuseFMOD_CREATESAMPLEflaginSystem::createSound.Theold'music'formats(mod/s3m/xm/it/midi)nowbeingstreamsmeansyoucanalsodocoolthingslikeplaceeffectsonmusicformats(Channel::addDSP),ortreatthemlikeanormalchannelwithChannel::setVolume/Channel::setFrequencyetcandthereforecaneven3dpositionthem!.
Channelsarenowobjectsinsteadofjustintegerhandles
FMODExnowtakesamoreobjectorientedapproachthanFMOD3.Channelobjectsarestillreferencecountedthough!Soifthechannelhandleyouhaveisstolen,FMODExwillstillknownottoupdatethenewlyplayingchannelwithcommandsissuedfromtheoldchannelhandle.Channelstealingshouldbelessprevalentnowthankstovirtualchannels.Youcannowallocateapoolofmanyhundredsoreventhousandsofchannelswhichwillneverrunout,andtheyallsucceedwhenyoutrytoplaythemallatonce.ThisisthankstoFMODEx'snewvirtualvoicesystem.
Volumeandpan
FMOD3usedvolume0-255(silenttofullvolume)andpan0-255(lefttoright),butnowFMODExtakesafloatingpointnumberforeach.FMODExnowuses0.0to1.0forvolume(silenttofull),and-1.0to+1.0forpan(lefttoright,0.0=center).
Frequency
FMOD3usedintegerfrequencies.FMODExnowusesfloatingpointfrequencies.Nowyoucangetfargreateraccuracyforsoundplayback(ieyoucannowset44100.5insteadofhavingtochoosebetween44100and44101)whichisimportantwhentryingtodoexactplaybacksynchronizationbetween2streamsofdifferentbpmforexample.
FSOUND_GetErrorisgone
FMOD3usedaglobalerrorcodefordeterminingwhatanerrorwas.Thiswasaprettybaddesignchoice,asinternalandmultithreadedFMODcallscouldcontaminatetheglobalerrorcode.FMODExnowusesamuchcleanererrorreturncodeforeverysinglefunction.Thisisnotaffectedbythepreviouslymentionedissues.
WhathappenedtoFSOUND_SetSFXMasterVolume?orHowdoIperformmastervolume?
FMOD3usedthisfunctiontoscaleallnonmusicorientedchannelvolumes.FMODExnowuses'ChannelGroups'whicharefarmorepowerful,andtoscaleallchannelsbyamastervolume,justuseSystem::getMasterChannelGroupthenChannelGroup::setVolume.UsingChannelGroupsyoucannowhavemultiplemastervolumegroups,andotherexcitingfeaturessuchasDSPsubmixing.
MOD/S3M/XM/ITchannelsusedtotakeupchannelsinFMOD3'smainchannelpoolsoIhadtoadjustFSOUND_Init,doIhavetodothiswithSystem::init?
No.MOD/S3M/XM/IT(andnowMIDI)havetheirownchannelpoolsthatdonotaffectthenumberinSystem::init.JustselectanumberofchannelsthatYOUaregoingtouse,don'tworryaboutwhatFMODExisdoinginternally.ToyouplayingaMOD/S3M/XM/IT/MIDuses1channel.
WhereisFSOUND_SetHWND?
FMODExisglobalfocus,orwindowlessbydefault.IfyoureallyneedtofocustheaudioonaparticularwindowinFMOD_OUTPUTTYPE_DSOUNDmodeonwin32/win64,passthehwndastheextradriverdataparameterinSystem::init
WhereisFSOUND_GetCurrentLevels?
UseSystem::getWaveDataorChannel::getWaveData.Itisfarmoreflexible.
FSOUND_UpdateisnowSystem::update.
CallSystem::updateonceaframeinyourgameloop.ThisisnescessarytoupdatevariousaspectsofFMODEx.
FirelightTechnologiesFMODEx
CHANNELMANAGEMENTANDVIRTUALVOICES.Introduction
FMODExnowincludesanefficientvirtualvoicemanagementsystem.Thistutorialwillexplainhowitworksandwhatistheadvantageofusingvirtualvoices.
Whatarevirtualvoices?
Whatisavirtualvoiceandhowisthisdifferenttoahardwareorsoftwarevoice?
NoticethisscreenshotoftheFMODExvirtualvoicesexample.Itisplaying50soundsatonce,butonly10areaudible.Onlimitedsoundhardware,whichgenerallyonlyhas32to64voices,itcanbechallengingtomanageyourwholegame'saudiovoiceallocationwhenyouwanttohavehundredsoreventhousandsofsoundsplayingatonceinworld(forexampleinadungeontheremightbe200torchesburningonwallsinvariousplacesallplayingacracklingburnnoise).
FMODExnowallowstheusertoplayasmanysoundsastheyrequire,andwillautomaticallyallocatethelimitednumberofhardwareorsoftwarevoicestothemostimportantsoundstothelistener.
Thiscouldmeaninasintheaboveexample,ina3Dworldthe10closestsoundsareaudibleandtherestbecome'virtual'.Noticeintheabovescreenshotredsoundsareaudible,andthebluesoundsareinaudibleand'virtual'.Accordingtotheuserthough,thereareactually50soundsplayingatonce.
'Virtual'voicesarenotallocatedtoahardwareorsoftwarevoice,andareusuallytheleastimportantsoundstothelistener.Theseare'emulated'voices.Theywillupdatetheirplaycursorsandseemtobeplayinglikeanormalsound,butwillnotbeaudible.Astheusermovesaroundtheworld,ora'virtual'voicesuddenlybecomesmoreimportantthanonethatisactuallyaudible,FMOD'svirtualvoicemanagerwillswapthetwovoices,andthesoundthatwaspreviouslyvirtualwillnowbecomeaudibleatitscorrectpositionintime.
AvoicecanbequeriedifitisvirtualornotbyusingtheChannel::isVirtualfunction.Thisisusuallyonlyforinformationalpurposes.
Whatifsomesoundsaremoreimportantthanothers?
Firstwewilltakethecaseof2Dsoundsthatareallplayingatthesamevolume.Howdoyoumakesureonesoundstaysaudibleandtheotherspossiblybecomevirtualiftoomanysoundsareplaying?TheansweristousetheChannel::setPriorityorSound::setDefaultsfunction.
Bymakingonesoundhaveahigherprioritythananother,itwillbegivenprioritytobeaudiblewhileitscompetitorwillbeswappedoutandbecomevirtual.Forexampleiftherewere10soundsplayingandonly10realvoices,andan11thvoicewantstobeplayed.Ifthenewsoundhasahigherprioritythanthevoicesplaying,itwillbeplayedasaudibleandoneoftheoriginal10willbecomevirtual,becausethenewsoundismoreimportant.Importantsoundsshouldhavehigherpriorityanditisuptotheusertodecideifsomesoundsshouldbemoreimportantthanothers.Anexampleofanimportantsoundmightbea2DmenuorGUIsoundorbeepthatneedstobeheardaboveallothersounds.
Volumeofasoundisasecondarydeterminingfactorbetweensoundsofequalpriority.Ifagroupofsoundshavethesamepriority,theloudestsoundwillbethemostimportant.Ina3dworldthisusuallymeanstheclosestsoundswillbemoreimportantandthefurtherawaysounds,orthequietersoundswillbelessimportantandwillpossiblybecomevirtual.
WhatifIrunoutofvirtualvoices?
Ifyoutrytoplaymoresoundsthantherearevirtualvoices,thenFMODExchannelmanagerwilltrytofindtheleastimportantsoundandreplaceitwiththenewsound.Thismeansthechannelthathasbeenreplacedwillstopandbecomeinvalid.
Ifachannelhandlethathasbeenkickedoutbyanewchannelbecomesinvalid,anycommandsthatareusedonthatchannelhandlewillreturnFMOD_ERR_INVALID_HANDLE.
HowdoIsetthenumberofrealvoicesandvirtualvoices?
TosetthenumberofvirtualvoicesFMODExwilluse,callSystem::initwiththenumberofvirtualvoicesspecifiedinthemaxchannelsparameter.
Forhardwarevoices,generallyyoudon'tsetthenumberoftheseavailableonasounddevice,suchasonaconsoleorsoundcard.Usuallyyouareprovidedwithanumberofhardwarechannelstouse.Forexample,PlayStation2alwayshas48hardwarevoices.Onasoundcard,thisisvariabledependingonthemanufacturer.YoucanfindoutthenumberofavailablehardwarechannelswithSystem::getHardwareChannels.Ifyouwanttolimitthenumberofhardwarechannelsbelowitscapacity,youcanuseSystem::setHardwareChannels.ThistypeofvoiceisusedifthesoundiscreatedwithFMOD_HARDWAREflag.
Tosetthenumberofsoftwaremixedchannelsavailable,useSystem::setSoftwareChannels.Youcansetthisto0ifyoudon'twantanysoftwaremixedvoices.ThistypeofvoiceisusedifthesoundiscreatedwithFMOD_SOFTWAREflag.
HowmanyvirtualvoicesshouldIset?
Howmanysoundsareyoutryingtoplayatoncewithoutlosingcontrolofthechannelhandles?Thisfigureisuptoyou,butrememberthatmorechannels=moreCPUandmemoryusage.
Ifyouhave32realhardwareorsoftwarechannelsavailabletoyouanddon'twanttoplaymorethanthisatonce,thenyoumightonlyneed32virtualvoices.Thiswillmeana1to1relationshipbetweenrealvoicesandvirtualvoicesandsoundswillneverbecomeemulatedandbeswappedout.Insteadifyouplaymorethanthespecifiedamountofchannels,itwill'kickout'otherlowerprioritychannels.
Ifyouhave32realhardwareorsoftwarechannelsavailableandyouwanttobeabletosafelyplay100atonce,or1000atonce,thensetitto100or1000atonce.Figuresaroundthe1000markplayingatoncemightstarttoshownonnegligibleamountsofCPUandmemoryusagesobewaryofthis.UseSystem::getCPUUsageandFMOD::Memory_GetStatstodeterminethis.
CanImakesilentsoundsgovirtual?
Yes.TodothisenabletheFMOD_INIT_VOL0_BECOMES_VIRTUALflaginSystem::init.
Toconfigurethisevenfurther,youcanchangeitfromvolume0,toahighervolume,between0and1.Forexampleifyousetthelevelforvoicestogovirtualat0.1,everythingbelowthisaudibilitywouldgovirtual.Warningifthisissettoohigh,soundsmayappearto'cutout'beforetheyaresilent.UseSystem::setAdvancedSettings,andthe'vol0virtualvol'memberofFMOD_ADVANCEDSETTINGS.
HowdoItellifaChannelisvirtualornot?
SeeChannel::isVirtual
WhatifIdon'tlikethesoundofavoicegoingfromvirtualtorealandplayinghalfwaythroughthesound,orneartheendofthesound?(soundslikeabug!)
YoucaneitheruseSoundorChannelprioritiestostopitgoingvirtualinthefirstplace,oryouhavetheoptiontohaveavoicestartafromthebeginninginsteadofhalfwaythrough,byusingtheFMOD_VIRTUAL_PLAYFROMSTARTflagwithSystem::createSound,System::createStream,Sound::setModeorChannel::setMode.Asdescribedabove,onlythequietest,leastimportantsoundsshouldbeswappinginandout,soyoushouldn'tnoticesounds'swappingin',butifyouhavealownumberofrealvoices,andtheyareallloud,thenthisbehaviourcouldbecomemorenoticableandmaysoundbad.AnotheroptionistosimplycallChannel::isVirtualandstopthesound,butdon'tdothisuntilafteraSystem::update!Afterplaysound,thevirtualvoicesortingneedstobedoneinSystem::updatetoprocesswhatisreallyvirtualandwhatisn't.
FirelightTechnologiesFMODEx
3DSOUNDIntroduction.
Thissectionwillintroduceyoutousing3DsoundwithFMODEx.Withityoucaneasilyimplementinteractive3Daudioandhaveaccesstofeaturessuchas5.1or7.1speakeroutput,andautomaticattenuation,dopplerandmoreadvancedpsychoacoustic3Daudiotechniques.
Loadingsoundsas'3D'.
Whenloadingasoundorsoundbank,thesoundmustbecreatedwithSystem::createSoundorSystem::createStreamusingtheFMOD_3Dflag.ie.
result=system->createSound("../media/drumloop.wav",FMOD_3D,0,&sound;);
if(result!=FMOD_OK)
{
HandleError(result);
}
Thiswilltryandallocateasoundusinghardwaremixingbydefault.Ifthereisnohardwaremixingavailable,itwillusesoftwaremixingasfallback.TospecificallyloadasoundinhardwareorsoftwaresimplyaddFMOD_HARDWAREorFMOD_SOFTWAREie.
result=system->createSound("../media/drumloop.wav",(FMOD_MODE)(FMOD_HARDWARE|FMOD_3D),0,&sound;);
if(result!=FMOD_OK)
{
HandleError(result);
}
Notethatoncethesoundisloaded,onWin32andFMOD_OUTPUTTYPE_DSOUNDoutput(thedefaultonWin32),youcan'tchangethemodefromFMOD_3DtoFMOD_2Dandviceversa.ThisisalimitationofDirectSound.UsingFMOD_SOFTWAREinsteadofFMOD_HARDWAREalleviatesthisissue,andotherplatformsthatsupporthardware(ieXbox,PS2,Gamecube)allowswitchingbetween2Dand3D.
Itisgenerallybestnottotryandswitchbetween3Dand2Datall,ifyouwantthough,youcanchangethesoundorchannel'smodetoFMOD_3D_HEADRELATIVEatruntimewhichplacesthesoundalwaysrelativetothelistener,effectivelysounding2Dasitwillalwaysfollowthelistenerasthelistenermovesaround.
Distancemodelsandlinearrolloffvslogarithmic.
Logarithmic
ThisisthedefaultFMOD3Ddistancemodel.Allsoundsnaturallyattenuate(fadeout)intherealworldusingalogarithmicattenuation.TheflagtosettothismodeisFMOD_3D_LOGROLLOFFbutifyou'reloadingasoundyoudon'tneedtosetthisbecauseitisthedefault.ItismoreforthepurposeorresettingthemodebacktotheoriginalifyousetittoFMOD_3D_LINEARROLLOFFatsomelaterstage.
WhenFMODusesthismodel,'mindistance'ofasound/channel,isthedistancethatthesoundstartstoattenuatefrom.Thiscansimulatethesoundbeingsmallerorlarger.Bydefault,foreverydoublingofthismindistance,thesoundvolumewillhalve.ThisrolloffratecanbechangedwithSystem::set3DSettings.
Asanexampleofrelativesoundsizes,wecancompareabeeandajumbojet.Atonlyameteror2awayfromabeewewillprobablynothearitanymore.Incontrast,ajetwillbeheardfromhundredsofmetersaway.Inthiscasewemightsetthebee'smindistanceto0.1meters.Afterafewmetersitshouldfallsilent.Thejumbojet'smindistancecouldbesetto50meters.Thiscouldtakemanyhundredsofmetersofdistancebetweenlistenerandsoundbeforeitfallssilent.Inthiscasewenowhaveamorerealisticrepresentationoftheloudnessofthesound,eventhougheachwavefilehasafullynormalized16bitwaveformwithin.(ieifyouplayedthemin2Dtheywouldbothbethesamevolume).
The'maxdistance'doesnotaffecttherateofrolloff,itsimplymeansthedistancewherethesoundstopsattenuating.Don'tsetthemaxdistancetoalownumberunlessyouwantittoartificiallystopattenuating.Thisisusuallynotwanted.Leaveitatitsdefaultof10000.0.
Linear
ThisisanalternativedistancemodelthatFMODhasintroduced.ItissupportedbyaddingtheFMOD_3D_LINEARROLLOFFflagtoSystem::createSoundor
Sound::setMode/Channel::setMode.Thisisamorefake,butusuallymoregameprogrammerfriendlymethodofattenuation.Itallowsthe'mindistance'and'maxdistance'settingstochangetheattenuationbehaviourtofadinglinearlybetweenthetwodistances.Effectivelythemindistanceisthesameasthelogarithmicmethod(ietheminimumdistancebeforethesoundstartstoattenuate,otherwiseitisfullvolume),butthemaxdistancenowbecomesthepointwherethevolume=0dueto3Ddistance.Theattenuationinbetweenthose2pointsislinear.
Someglobal3Dsettings.
The3mainconfigurablesettingsinFMODExthataffectall3Dsoundsare:
Dopplerfactor.Thisisjustawaytoexaggerateorminimizethedopplereffect.Distancefactor.ThisallowstheusertosetFMODtouseunitsthatmatchtheir
own(iecentimeters,meters,feet)Rolloffscale.Affects3dsoundsthatuseFMOD_3D_LOGROLLOFF.
Controlshowfastallsoundsattenuateusingthismode.
All3settingscanbesetwithSystem::set3DSettings.Generallytheuserwillnotwanttosetthese.
Velocityandkeepingitframerateindependent.
Velocityisonlyrequiredifyouwantdopplereffects.Otherwiseyoucanpass0orNULLtobothSystem::set3DListenerAttributesandChannel::set3DAttributesforthevelocityparameter,andnodopplereffectwillbeheard.
Thismustbestressedagain.ItisimportantthatthevelocitypassedtoFMODExismeterspersecondandnotmetersperframe.Noticethedifference.Togetthecorrectvelocityvector,usevectorsfromphysicscodeetc,anddon'tjustsubtractlastframespositionfromthecurrentposition.Thisisaffectedbyframerate.Thehighertheframeratethesmallerthepositiondeltas,andthereforesmallerdopplereffects,whichisincorrect.
Iftheonlywayyoucangetthevelocityistosubtractthisandlastframe'spositionvectors,thenremembertotimeadjustthemfrommetersperframebackuptometerspersecond.Thisisdonesimplybyscalingthedifferencevectorobtainedbysubtractingthe2positionvectors,byoneovertheframetimedelta.
Hereisanexample.
velx=(posx-lastposx)*1000/timedelta;
velz=(posy-lastposy)*1000/timedelta;
velz=(posz-lastposz)*1000/timedelta;
timedeltaisthetimesincethelastframeinmilliseconds.ThiscanbeobtainedwithfunctionssuchastimeGetTime().Soat60fps,thetimedeltawouldbe16.67ms.ifthesourcemoved0.1metersinthistime,theactualvelocityinmeterspersecondwouldbe:
vel=0.1*1000/16.67=6meterspersecond.
Similarly,ifweonlyhavehalftheframerateof30fps,thensubtractingpositiondeltaswillgivesustwicethedistancethatitwouldat60fps(soitwouldhavemoved0.2metersthistime).
vel=0.2*1000/33.33=6meterspersecond.
Orientationandleft-handedvsright-handedcoordinatesystems.
Gettingthecorrectorientationsetupisessentialifyouwantthesourcetomovearoundyouin3dspace.FMODUsesalefthandedcoordinatesystembydefault,(+X=right,+Y=up,+Z=forwards),whichisthesameasDirectSound3DandA3D.
Ifyouuseadifferentcoordinatesystem,thenyouwillneedtoflipcertainaxisorevenswapthemaroundinsidethecalltoSystem::set3DListenerAttributesandChannel::set3DAttributes.Taketherighthandedcoordinatesystem,where+X=right,+Y=up,+Z=backwardsortowardsyou.ToconvertthistoFMODcoordinatesystemsimplynegateallinstancesoftheZcoordinateforlistenerandsoundpositionandvelocity,aswellaslistenerupandforwardvectorZcomponents.
Tomakethingseasierforpeopleusingtherighthandedcoordinatesystem,youcaninitializeFMODExusingFMOD_INIT_3D_RIGHTHANDEDinSystem::initandnotdoanyconversion.FMODwillautomaticallyconvertitsinternal3Dcalculationstoberighthandedinsteadoflefthanded.
Atypicalgameloop.
3DsoundandtheFMODchannelmanagementsystemneedtobeupdatedonceperframe.TodothisuseSystem::updateThiswouldbeatypicalexampleofagameaudioloop.
do
{
UpdateGame();//herethegameisupdatedandthesourceswouldbemovedwithchannel->set3DAttibutes.
system->set3DListenerAttributes(0,&listener;_pos,&listener;_vel,&listener;_forward,&listener;_up);//
system->update();//neededtoupdate3dengine,onceperframe.
}while(gamerunning);
Mostgamesusuallytaketheposition,velocityandorientationfromthecamera'svectorsandmatrix.
Stereoandmultichannelsoundscanbe3D!
Astereosoundwhenplayedas3d,willbesplitinto2monovoicesinternallywhichareseparately3dpositionable.Multi-channelsoundsarealsosupported,soan8channelsoundforexamplewillallocate8monovoicesinternallyinFMOD.Torotatetheleftandrightpartofthestereo3dsoundin3Dspace,usetheChannel::set3DSpreadfunction.Bydefaultthesubchannelspositionthemselvesinthesameplace,thereforesounding'mono'.
Splitscreen/multiplelisteners.
Insomegames,theremaybeasplitscreenmode.Whenitcomestoaudio,thismeansthatFMODExhastoknowabouthavingmorethan1listeneronthescreenatonce.ThisiseasilyhandledviaSystem::set3DNumListenersandSystem::set3DListenerAttributes.
Ifyouhave2playersplitscreen,thenforeach'camera'or'listener'simplycallSystem::set3DListenerAttributeswith0asthelistenernumberofthefirstcamera,and1forthelistenernumberofthesecondcamera.System::set3DNumListenerswouldbesetto2.That'sallthereistoit.Youmaynoticeanaudibledifference,becausefmoddoesafewthingstoavoidconfusionwiththesamesoundbeingviewedfromdifferentviewpoints.1.Itturnsoffalldoppler.Thisisbecauseonelistenermightbegoingtowards
thesound,andanotherlistenermightbegoingawayfromthesound.Toavoidconfusion,thedopplerissimplyturnedoff.2.Allaudioismono.Iftoonelistenerthesoundshouldbecomingoutofthe
leftspeaker,andtoanotherlisteneritshouldbecomingoutoftherightspeaker,therewillbeaconflict,andmoreconfusion,soallsoundsaresimplypannedtothemiddle.Thisremovesconfusion.3.Eachsoundisplayedonlyonceasitwouldwithasingleplayergame,
savingvoiceandcpuresources.Thismeansthesound'seffectiveaudibilityisdeterminedbytheclosestlistenertothesound.Thismakessenseasthesoundshouldbetheloudesttothenearestlistener.Anylistenersthatarefurtherawaywouldn'thaveanyimpactonthevolumeatthispoint.
Speakermodes/output.
Toget5.1soundiseasy.Ifthesoundcardsupportsit,thenanysoundusingFMOD_3DandFMOD_HARDWAREwillautomaticallypositionitselfinasurroundspeakersystem,andonlytheuserhastobesurethatthespeakersettingsintheoperatingsystemarecorrectsothatthesounddevicecanoutputtheaudioin5.1or7.1.YoudonotneedtocallSystem::setSpeakerMode!.ThisfunctionisonlyusedtoconfigureFMODEx'ssoftwaremixingengine.Seethenextparagraphonthis.
ForsoundscreatedwithFMOD_SOFTWARE,bydefaultsoundisemulatedthroughasimplestereooutput.Thisinvolvespanningandvolumeattenuation.ToenableFMODsoftwaremixingtouse5.1output,youcanuseSystem::setSpeakerMode.Butnote!ThisfunctionincreasestheCPUmixingburdenslightlyasitnowhastosoftwaremixintoa6or8channelbufferinsteadofastereobuffer.
FirelightTechnologiesFMODEx
3DReverbTutorialIntroduction
Itiscommonforenvironmentstoexhibitdifferentreverberationcharacteristicsindifferentlocations.Ideallyasthelistenermovesthroughoutthevirtualenvironment,thesoundofthereverberationshouldchangeaccordingly.ThischangeinreverberationpropertiescanbemodeledinFMODExbyusingthebuiltin3DReverbAPI.Note:Thistechniqueappliestosoftwarechannels.
3DReverbs
The3Dreverbsystemworksbyallowingyoutoplacemultiplevirtualreverbswithinthe3Dworld.Eachreverbdefines:
Itspositionwithinthe3DworldThearea,orsphereofinfluenceaffectedbythereverb(withminimumandmaximumdistances)Thereverberationpropertiesofthearea
Atruntime,FMODExinterpolates(ormorphs)betweenthecharacteristicsof3Dreverbsaccordingtothelistener'sproximityandthepositionandoverlapofthereverbs.ThismethodallowsFMODExtouseasinglereverbDSPunittoprovideadynamicreverberationwithinthe3Dworld.Thisprocessisillustratedintheimagebelow.
Whenthelisteneriswithinthesphereofeffectofoneormore3Dreverbs,the
listenerhearsaweightedcombinationoftheaffectingreverbs.Whenthelistenerisoutsidethecoverageofall3Dreverbs,thereverbrevertstothedefaultambientreverbsetting.Itisimportanttonotethatthistechniquewillonlyplaceaddreverbto3Dsounds.Toplacereverbeffectson2Dsounds,youwillneedtomakeanadditionaltocallSystem::setReverbProperties(whichwillincurasmallCPUandmemoryhit).
Theinterpolationof3Dreverbsisonlyanestimationofhowthemultiplereverberationswithintheenvironmentmaysound.Insomecases,greaterrealismisrequired.Inthesesituationswesuggestusingmultiplephysicalreverbsasdescribedinthetutorial''Usingmultiplereverbs'.
Setthedefaultambientreverb
Inthissectionwillwelookatsettingthedefaultambientreverbsettings.Thisisimportant,asFMODExwillusethesesettingswhenthelistenerisnotstandingwithinanareaaffectedbyanyofthe3Dreverbs.Inthisexample,wewillusethereverbpresentFMOD_PRESET_OFF.
FMOD_REVERB_PROPERTIESprop1=FMOD_PRESET_OFF;
system->setReverbAmbientProperties(&prop1;);
Createa3DReverb
Wewillnowcreateavirtualreverb,usingthecallSystem::createReverb,thensetthecharacteristicsofthereverbusingReverb::setProperties.
FMOD::Reverb *reverb;
result=system->createReverb(&reverb);
FMOD_REVERB_PROPERTIESprop2=FMOD_PRESET_CONCERTHALL;
reverb->setProperties(&prop2);
Set3DAttributes
The3Dattributesofthereverbmustnowbeset.ThemethodReverb::set3DAttributesallowsustosettheoriginposition,aswellastheareaofcoverageusingtheminimumdistanceandmaximumdistance.
FMOD_VECTORpos={-10.0f,0.0f,0.0f};
floatmindist=10.0f;
floatmaxdist=20.0f;
reverb->set3DAttributes(&pos,mindist,maxdist);
Asthe3Dreverbusesthepositionofthelistenerinitsweightingcalculation,wealsoneedtoensurethatthelocationofthelistenerissetusingSystem::set3dListenerAtrributes.
FMOD_VECTORlistenerpos={0.0f,0.0f,-1.0f};
system->set3DListenerAttributes(0,&listenerpos,0,0,0);
FirelightTechnologiesFMODEx
FMOD_NONBLOCKINGflagandasynchronouslyloadingdataIntroduction
FMOD_NONBLOCKINGflagisusedsothatsoundscanbeloadedwithoutaffectingtheframerateoftheapplication.Normallyloadingoperationscantakealargeorsignificantamountoftime,butwiththisfeature,soundscanbeloadedinthebackgroundwithouttheapplicationskippingabeat.
Creatingthesound.
SimplycreatethesoundasyounormallywouldbutaddtheFMOD_NONBLOCKINGflag.
FMOD::Sound*sound;
result=system->createStream("../media/wave.mp3",FMOD_NONBLOCKING,0,&sound;);
ERRCHECK(result);
Nowthesoundwillopeninthebackground,andyouwillgetahandletothesoundimmediately.YoucannotdoanythingwiththissoundhandleexceptcallSound::getOpenState.AnyotherattemptstousethissoundhandlewillresultinthefunctionreturningFMOD_ERR_NOTREADY.
Gettingacallbackwhenthesoundloads.
Whenthesoundloadsorthestreamopens,youcanspecifyacallbackusingthenonblockcallbackmemberoftheFMOD_CREATESOUNDEXINFOstructurethatiscalledwhentheoperationiscompleted.Firstlythecallbackdefinition.
FMOD_RESULTF_CALLBACKnonblockcallback(FMOD_SOUND*sound,FMOD_RESULTresult)
{
FMOD::Sound*snd=(FMOD::Sound*)sound;
printf("Soundloaded!(%d)%s\n",result,FMOD_ErrorString(result));
returnFMOD_OK;
}
AndthenthecreateSoundcall.
FMOD_RESULTresult;
FMOD::Sound*sound;
FMOD_CREATESOUNDEXINFOexinfo;
memset(&exinfo;,0,sizeof(FMOD_CREATESOUNDEXINFO));
exinfo.cbsize=sizeof(FMOD_CREATESOUNDEXINFO);
exinfo.nonblockcallback=nonblockcallback;
result=system->createStream("../media/wave.mp3",FMOD_NONBLOCKING,&exinfo;,&sound;);
ERRCHECK(result);
Waitingforthesoundtobereadyandusingit.
Asmentioned,youwillhavetocallSound::getOpenStatetowaitforthesoundtoloadinthebackground.Youcoulddothis,orjustcontinuallytrytocallthefunctionyouwanttocall(ieSystem::playSound)untilitsucceeds.Hereisanexampleofpollingthesounduntilitisready,thenplayingit.
FMOD_RESULTresult;
FMOD::Sound*sound;
result=system->createStream("../media/wave.mp3",FMOD_NONBLOCKING,0,&sound;);
ERRCHECK(result);
do
{
FMOD_OPENSTATEstate;
result=tmpsnd->getOpenState(&state;,0,0);
ERRCHECK(result);
if(state==FMOD_OPENSTATE_READY&&!channel)
{
result=system->playSound(FMOD_CHANNEL_FREE,sound,false,&channel;);
ERRCHECK(result);
}
GameCode();
}while(1)
or
do
{
if(!channel)
{
result=system->playSound(FMOD_CHANNEL_FREE,sound,false,&channel;);
if(result!=FMOD_ERR_NOTREADY)
{
ERRCHECK(result);
}
}
GameCode();
}while(1)
Thesecondloopwillsimplyretryplaysounduntilitsucceeds.
CreatingthesoundasastreamedFSBfile.
AnFSBfilewillhavesubsoundsinit,soifyouopenitasastream,youmaynotwantFMODseekingtothefirstsubsoundandwastingtime.YoucanusetheinitialsubsoundmemberoftheFMOD_CREATESOUNDEXINFOstructuretomakethenon-blockingopenseektothesubsoundofyourchoice.
FMOD_RESULTresult;
FMOD::Sound*sound;
FMOD_CREATESOUNDEXINFOexinfo;
memset(&exinfo;,0,sizeof(FMOD_CREATESOUNDEXINFO));
exinfo.cbsize=sizeof(FMOD_CREATESOUNDEXINFO);
exinfo.initialsubsound=1;
result=system->createStream("../media/sounds.fsb",FMOD_NONBLOCKING,&exinfo;,&sound;);
ERRCHECK(result);
ThengetthesubsoundyouwantedwithSound::getSubSound.
Gettingasubsound.
Sound::getSubSoundisafreefunctioncallnormally,allitdoesisreturnapointertothesubsound,whetheritbeasampleorastream.Itdoesnotexecuteanyspecialcodebesidesthis.Whatitwouldcauseifitwasablockingstreamthough,isSystem::playSoundstallingseveralmillisecondsormorewhileitseeksandreflushesthestreambuffer.Timetakencandependonthefileformatandmedia.
IftheparentsoundwasopenedusingFMOD_NONBLOCKING,thenitwillsetthesubsoundtobeFMOD_OPENSTATE_SEEKINGanditwillbecomenotreadyagainuntiltheseekandstreambufferflushhascompleted.WhenthestreamisreadyandSystem::playSoundiscalled,thentheplaysoundwillnotstallandwillexecuteimmediatelybecausethestreamhasbeenflushed.
FirelightTechnologiesFMODEx
MEMORYMANAGEMENTANDCONSERVATIONTUTORIALIntroduction
ThissectionwillgivesomepointersonhowtouseandsavememoryinFMODExbydescribingthingsthatmaynotbesoobviousuponfirstlookingattheAPI.
Usingafixedsizememorypool.
TomakeFMODstayinsideafixedsizememorypool,andnotdoanyexternalallocs,youcanusetheFMOD::Memory_Initializefunction.i.e.
result=FMOD::Memory_Initialize(malloc(4*1024*1024),4*1024*1024,0,0,0); //allocate4mbandpassittoFMODExtouse.
ERRCHECK(result);
Notethatthisusesmalloc.OnXbox360andXboxyoumustuseadifferentoperatingsystemallocsuchasXPhysicalAllocotherwiseFMODmaynotbehavecorrectly.See"Platformspecificissues"tutorialsformoreinformationonthis.
Notethatthisfunctionallowsyoutospecifyyourowncallbacksforallocandfree.InthiscasethememorypoolpointerandlengthmustbeNULL.The2featuresaremutuallyexclusive.
Loweringsoundinstanceoverhead.
TheFMOD_LOWMEMflagisusedforuserswantingtoshavesomememoryusageoffofthesoundclass.Thisflagremovesmemoryallocationforcertainfeatureslikethe'name'fieldwhichisn'tusedofteningames.Whenthishappens,Sound::getNamewillreturn"(null)".MorememorywillbestrippedfromthesoundclassinfutureversionsofFMODExwhenthisflagisused.Currentlythe'name'fieldisthebiggestuserofmemoryinthesoundclasssothishasbeenremovedfirst.
Usingcompressedsamples.
TotradeCPUusagevsMemory,FMODExhasafeaturetoplayADPCM,XMAandMP2/MP3datacompressed,withoutneedingtodecompressittoPCMfirst.Thiscansavealargeamountofmemory.OnXBox360,usingthisforXMAfilesincursnexttonoextraCPUusage,astheXbox360XMAhardwaredecoderdoesthedatadecompressioninrealtime.ToenablethisusetheFMOD_CREATECOMPRESSEDSAMPLEflag.Ifthisflagisusedforformatsotherthantheonesspecifiedabove,itwillbeignored.
WiththeexceptionofXMAonXbox360andADPCMonXbox,ifFMOD_CREATECOMPRESSEDSAMPLEisusedwithanFMOD_HARDWAREbufferitwillgenerateanFMOD_ERR_NEEDSSOFTWAREerror.
Note!IfyouuseFMOD_CREATECOMPRESSEDSAMPLEtherewillbea'oneoff'memoryoverheadtoallocatetheappropriatepoolofcodecsdependingontheformatbeingloaded.Seethenextsectiononhowtocontrolthispool.
Controllingmemoryusagewithsettings.
System::setSoftwareFormat'maxinputchannels'isdefaultto6toallowupto6channelwavfilestobeplayedthroughFMOD'ssoftwareengine.Settingthistoalowernumberwillsavememoryacrosstheboard.Ifthehighestchannelcountinasoundyouaregoingtouseisstereo,thensetthisto2.ForsoundscreatedwithFMOD_CREATECOMPRESSEDSAMPLE,
System::setAdvancedSettingsallowstheusertoreducethenumberofsimultaneousXMA/ADPCMorMPEGsoundsplayedatonce,tosavememory.Thedefaultsarespecifiedinthedocumentationforthisfunction.Loweringthemwillreducememory.Notethepoolofcodecsforeachcodectypeisonlyallocatedwhenthefirstsoundofthattypeisloaded.ReducingXMAto0whenXMAisneverusedwillnotsaveanymemory.Forstreams,settingSystem::setStreamBufferSizewillcontrolthememory
usageforthestreambufferusedbyFMODforeachstream.Loweringthesizeinthisfunctionwillreducememory,butmayalsoleadtostutteringstreams.ThisispurelybasedonthetypeofmediatheFMODstreamerisreadingfrom(ieCDROMisslowerthanharddisk),soitistobeexperimentedwithbasedonthis.Reducingthenumberofchannelsusedwillreducememory.System::initand
System::setSoftwareChannelsgivecontrolovermaximumnumberofvirtualvoicesandsoftwarevoicesused.Youwillneedtomakesureyouspecifyenoughvoicesthoughtoavoidchannelstealing.
TrackingFMODmemoryusage.
UsingFMOD::Memory_GetStatsisagoodwaytotrackFMODmemoryusage,andalsofindthehighestamountofmemoryallocatedatanytime,soyoucanadjustthefixmemorypoolsizeforthenexttime.
FirelightTechnologiesFMODEx
TheFMODDSPNetworkIntroduction
ThissectionwillintroduceyoutotheFMODExadvancedDSPsystem.Withthissystemyoucanimplementcustomfiltersorcomplicatedsignalchainstocreatehighqualityanddynamicsoundingaudio.TheFMODExDSPsystemisanincrediblyflexiblemixingenginethatgoesfarbeyondFMOD3'scapabilities.Itsemphasisonquality,flexibilityandefficiencymakesitanextremelypowerfulsystemwhenusedtoitsfullpotential.
ThefigurebelowshowsarepresentationofwhataverybasicFMODDSPnetworklookslike.
Audiodataflowsfromtherighttotheleft,untilitfinallyarrivesatthesoundcard,fullymixedandprocessed.
TheaboveimagewastakenusingtheFMODProfilertool.YoucanprofileyourownDSPnetworkaslongasyouspecify'FMOD_INIT_ENABLE_PROFILE'wheninitializingtheFMODExengine.Thetoolislocatedinthe/toolsdirectoryoftheSDK.
FMODDesigneralsoprovidesabuiltinprofiler.Youdon'tneedtoloadaprojectorevenusetheeventsystem.Youcanjustusethe'Profiler'tabwithinFMODDesignerasastandaloneapplication.
DataflowandSignalchain
WhenFMODplaysasoundonachannel(usingSystem::playSound),itcreatesasmallsub-networkconsistingofaChannelDSPHeadandaWavetableUnit.WhenFMODplaysaDSPonachannel(System::playDSP),itcreatesasmallsub-networkconsistingofaChannelDSPHeadandaResamplerUnit.TheDSPthatwasspecifiedbytheuseristhenattachedtothisasaninput.
Thissectionwilldescribetheunitsinmoredetail,fromtheoriginofthedatathroughtothesoundcard,fromrighttoleft.
WavetableUnitThisunitreadsrawPCMdatafromthesoundbufferandresamplesittothesamerateasthesoundcard.AWavetableUnitisonlyconnectedwhentheusercallsSystem::playSound.Onceresampled,theaudiodataisthenprocessed(orflows)attherateofthesoundcard.Thisis48khzbydefault.
ChannelDSPHeadThisunitprovidesaplaceforextraDSPeffectstobeconnectto,betweentheWavetableUnit(ifSystem::playSoundwasused),orauserspecifiedDSPunit(ifSystem::playDSPwasused),andtheChannelGroupUnitthatitbelongsto.
BydefaultallchannelsconnecttotheMasterChannelGroupanditisthispointwherethechannelvolumeandpangetsapplied.AChannelDSPHeadunitincursnoCPUpenalty.Thedataissimplypassedstraighttoitsoutputs.
ChannelGroupDSPHeadsTheMasterChannelGroupisthedefaulttargetforChannelDSPheads,andisownedbytheSystemobject.WhenmultipleChannelDSPHeadsareconnectedtoachannelgroup,theyaremixedtogether.
ThisisthecaseforanyDSPunitwithmultipleinputs.Otherchannelgroupsmayalsobecreatedbytheuser,whichmeanschannelsmaytargettheminstead.ThishappenswhentheusercallsChannel::setChannelGroup.Channelgroupsarethereforsub-mixing.Effectscanbeplacedafterthis
pointbetweenitandtheChannelGroupTargetUnit.
ChannelGroupTargetUnitThisisthetargetDSPunitforallChannelGroupscreatedbytheuser(withSystem::createChannelGroup)andtheSystemChannelGroup.
CodeExamples
InthissectionwewilllookatsomebasictechniquesthatcanbeusedtomanipulateDSPnetwork.Weshallstartwiththemostbasicsignalchain(asshownintheimagebelow)andidentifythechangesthatoccurtotheDSPnetworkwiththeprovidedcode.
ConnectingaDSPeffecttoachannel
InthisexampleweshalladdaneffecttoasoundbyconnectingaDSPeffectunittothechannel.Thecodebelowstartsbyplayingasound,thencreatesaDSPunitwithSystem::createDSPByTypeandaddsittotheDSPnetworkusingChannel::addDSP.
result=system->playSound(FMOD_CHANNEL_FREE,sound,false,&c;hannel);
result=channel->setVolume(volume);
result=system->createDSPByType(FMOD_DSP_TYPE_ECHO,&d;sp);
result=channel->addDSP(dsp,0);
ThefigurebelowshowstheFMODEchoeffectinsertedintotheDSPnetworkbetweentheWaveTableunitandFMODChannelDSPHead.
ConnectingaDSPeffecttoachannelgroup
Inthisexampleweshalladdaneffecttoachannelgroup.TheadvantageofthisismultiplechannelscanbetreatedwithasingleDSPeffect(thereforeismoreresourcefriendlythanaddingthesameaffecttoeveryindividualWaveTableunit).ThecodebelowgetstheMasterChannelGroupandattachedanechoeffecttoit.
result=system->playSound(FMOD_CHANNEL_FREE,sound,false,&c;hannel);
result=channel->setVolume(volume);
result=system->createDSPByType(FMOD_DSP_TYPE_ECHO,&d;sp);
result=system->getMasterChannelGroup(&c;hannelgroup);
result=channelgroup->addDSP(dsp,0);
ThefigurebelowshowstheFMODEchoeffectattachedtotheChannelGroup:FMODmastergroup.Note:TheChannelGroup:FMODmastergroupontherightisusedtosubmixallthechannelsenteringthechannelgroup.
ConnectingaDSPeffectonthesystem
InthisexampleweshalladdaneffectonthefinalpointoftheDSPnetworkbeforethesoundcard.Thismeansallsoundswithinthenetworkwillbeaffected.ThisisdonebycreatingaDSPwithSystem::createDSPByTypeandaddingittheDSPnetworkusingSystem::addDSP.
result=system->playSound(FMOD_CHANNEL_FREE,sound,false,&c;hannel);
result=channel->setVolume(volume);
result=system->createDSPByType(FMOD_DSP_TYPE_ECHO,&d;sp);
result=system->addDSP(dsp,0);
ThefigurebelowshowstheFMODEchoeffectinsertedintotheDSPnetworkbetweentheChannelGroupTargetunit(thefinalsystembus)andsoundcard.
Creatingawet/pathforachannelgroup
Thisexampledemonstratesamorecomplexscenario,inwhichweshallcreateawet/drypathforachannelgroup.Thisisverysimilartousinga'sendeffect'signalchainonahardwaremixer.Thefirststepistoaddachannelgroup,whichweshallcall'mychannelgroup'.
result=system->playSound(FMOD_CHANNEL_FREE,sound,false,&c;hannel);
result=channel->setVolume(volume);
result=system->createChannelGroup("mychannelgroup",&c;hannelgroup);
Inthefigurebelowwecanseethenewchannelgroup'ChannelGroup:mychannelgroup'isnowincludedinDSPnetwork.Itisimportanttonotethatthischannelgrouprunsseparatelyfromthemastergroup,anddoesnotpassthroughit.
NowwewilladdanechoDSPeffectto'mychannelgroup'.
result=system->createDSPByType(FMOD_DSP_TYPE_ECHO,&dsp;);
result=channelgroup->addDSP(dsp,0);
Thisisreflectedinthefigurebelow.
Inthisstepweshallcreateanewpathfromtheoriginalchannelsignalpathtothepaththatincludestheechoeffect.TodothiswemusttakethechannelDSPunitheadnodeandconnectittotheheadnodeofthe'mychannelgroup'channelgroupusingthemethodsDSP::getInputandDSP::addInput.
FMOD::DSP*channeldsphead;
FMOD::DSP*channelgroupdsphead;
result=channel->getDSPHead(&c;hanneldsphead);
result=channelgroup->getDSPHead(&c;hannelgroupdsphead);
result=channelgroupdsphead->getInput(0,&c;hannelgroupdsphead,0);
result=channelgroupdsphead->addInput(channeldsphead,0);
YoucanseeinthefigurebelowthereisnowaconnectionfromthechannelDSPheadtoboththechannelgroups'FMODmastergroup'(dry)and'mychannelgroup'(wet).
Disableaneffect
TodisableaneffectsimplyusethesetBypassmethod.Thecodebelowplaysasound,addsaneffectthenbypassesit.
result=system->playSound(FMOD_CHANNEL_FREE,sound,false,&c;hannel);
result=channel->setVolume(volume);
result=system->createDSPByType(FMOD_DSP_TYPE_ECHO,&d;sp);
result=channel->addDSP(dsp,0);
result=dsp->setBypass(true);
PlayingDSPOscillators
WithinFMODExtheDSPunitscanbeusedtogeneratesignals.Thefollowingexamplegenerateas440Hzsinewave(whichisthedefaultsignalsettings).
result=system->createDSPByType(FMOD_DSP_TYPE_OSCILLATOR,&d;sp);
result=system->playDSP(FMOD_CHANNEL_FREE,dsp,false,&c;hannel);
result=channel->setVolume(volume);
ThefigurebelowshowsanOscillatorunitintheDSPnetwork.TheResamplerUnitisagenericbufferedresamplerthatisusuallyusedtoconnectOscillatorunittoitschannel.
AlookatamorecomplexDSPNetwork
InthissectionwewillworkthroughamorecomplexDSPNetwork.Usetheiconsandtermsinboldtofindtheappropriatereferencepointswithintheexampleimage.
Submix-seetheicon .Whenmultipleinputsconvergeintooneunit,theyaremixedtogether.Thisiscalleda'submix'.
FMODChannelDSPHeadUnit-seetheicon .AnytimeSystem::playSoundorSystem::playDSPiscalled,anFMODChannelDSPHeadUnitisattachedtothenetwork.Whenitisstopped,itisdisconnectedfromthenetwork.
TotherightofeachDSPHeadUnit,thereiseitheranFMODWaveTableUnit,anFMODDSPCodecoranFMODResamplerUnit.
AWaveTableunitisaunitthatplaysstandardPCMdata(ieastandardwavfile).ADSPCodecisacompressedrealtimesample,createdbyFMOD_CREATECOMPRESSEDSAMPLE(inthiscaseanmp3).ResamplerUnitisagenericbufferedresamplerthatisusuallyusedwhenconnectinggenericDSPunitstoachannel(wavetableandDSPcodecusuallyhaveabuiltinresampler,standardDSPunitsdonotsoonehastobeinsertedifitistobeplayedonachannel,soChannel::setFrequencycanwork).
ThesethingsfeeddataintoaChannelDSPHeadUnit,thenitfeedsthedata
ontoitsparentandsoon.
The3channelsthathaveanFMODWaveTableUnit,areplayingapcmwavefile,andhavebeenconnectedtoachannelgroup.ChannelGroup:B.ThiswasdonewithChannel::setChannelGroup
The3channelsthathaveanFMODDSPCodecUnit,areplayinganmp3fileandareconnectedtoachannelgroup.ChannelGroupA.ThiswasdonewithChannel::setChannelGroup
ThechannelthathasUNITAattachedtoitisnotattachedtoausercreatedChannelGroup.ItisconnectedtothedefaultsystemChannelGroupcalledthe"masterchannelgroup"whichistheChannelGroupallchannelsareplayedonifnootherisspecified.YoucangetahandletothischannelgroupwithSystem::getMasterChannelGroup.
TheUNITAunitwascreatedbytheuserwithSystem::createDSPandwasplayedwithSystem::playDSP.Itdoesnothingbutactasasubmixtarget,sotheuserhasadded3oscillatorsbycreatingthemwithSystem::createDSPByType,andaddingthemtoUNITAwithDSP::addInput.
YoumaynoticethatChannelGroup:BisalsoconnectedtoChannelGroup:Aasaninput.ThismeanstheresultofthesubmixofChannelGroup:BisfedintoChannelGroup:A.TheconnectionofBtoAwasdonewithChannelGroup::addGroup
ChannelGroupAandChannelGroupBhave2boxeseach.ThisisbecausetheybothhaveaDSPeffectappliedtothem.WithoutaDSPeffectadded,itjusthasonebox,foroptimizationreasons(lessmemory,lesscpuusage).Thefirstboxontheleftistheheadnode,thesecondboxontherightwiththesamenameisthemixtargetforthechannels.InbetweenisanFMODEchoDSP(FMOD_DSP_TYPE_ECHO)effectonChannelGroup:B,andaFMODLowpassSimple(FMOD_DSP_TYPE_LOWPASS_SIMPLE)effectonChannelGroup:A.ThesewereaddedwithChannelGroup::addDSP
ReverbhasbeenenabledwithSystem::setReverbPropertiesandcanbeseenasaDSPnodecalledSFXReverb.NoticeallchannelbasedDSPunitshaveaconnectiongoingtoit.Thisisthewetpath-seetheicon .TheotherpathsgodirectlytothesoundcardandbypasstheSFXReverbunit,thereforeitisthedrypath-seetheicon .Tocontrolthewet/drymixyoucanusethe
Channel::setReverbProperties.InternallythisfunctionjustcallsDSPConnection::setMix.Onlychannelsareinterestedinthisunit.Thingslikechannelgroupsandotherunitsdonotneedtoconnecttothisunit.
Iftherewasnoreverbenabled,thesecondarylinks/outputs(ontheFMODWaveTableUnit/FMODDSPCodec/FMODResamplerUnitunits)wouldbeabsent.
Attheendofthemix,ChannelGroup:FMODmastergroup,ChannelGroup:AandSFXReverballgetsubmixedintotheFMODChannelGroupTargetUnit
FinallytheresultofthatsubmixgetssenttotheFMODSoundCardUnitwhichisthefinaldestination.
IfaDSPeffectwastobeaddedwithSystem::addDSP,itwouldbeinsertedbetweenFMODSoundCardUnitandFMODChannelGroupTargetUnit.YoucouldseewhyinthatcaseitwouldaffectallsoundintheDSPnetwork.
IfaDSPeffectwastobeaddedwithChannel::addDSP,itwouldbeinsertedtotherightoftheFMODChannelDSPHeadUnit.IfthishappenedyoushouldbeabletoseewhyonlythechannelwouldbeaffectedbytheDSPeffect.
FirelightTechnologiesFMODEx
FMODDESIGNERAPIPROGRAMMER'STUTORIALIntroduction.
ThissectionprovidesmoretechnicalinformationonhowtousetheFMODdesignerAPI,andhowresourceallocationishandledtoallowtheprogrammertoaccountforperformanceandmemoryissues.Justtoprovidesomebackgroundinformation,thewholeFMODdesignerAPIsitsontopofthelowlevelFMODAPI.ThismeansitcontainsanFMOD::SystemobjectandusesallofthelowlevelfunctionsoftheFMODapitoachieveitsfunctionality.
Filesshouldyoureceivefromthesounddesigner.
Whenthesounddesignerprovidesyouwithaproject,theymustprovideyouwiththefollowingfiles.
1.FEVfile.AnFEVfileisthecompiledsounddesignerprojectwhichyouwillloadwithEventSystem::load.1ormore.FSBfiles.Thesefilesarerawaudiodata.Theydonotcontainany
eventorsounddesignerdata.Optionally,aprojectreportprojectname.txt.Thisisafilethatdescribesthe
eventstotheprogrammerandanyassociatednotes,alongwiththeparametersforeacheventandtheirmin/maxvalues.Otherfilesareworkingfiles(suchas.cache),donotshipthese.
Theprogrammermustworkwiththesounddesignertoorganizebanksandeventgroupstoconservememory!
Eventgroupsshouldbeusedtocontrolloadingstrategies,theyarenotjustforaestheticpurposes,theyareforloadingpurposes.Thebranchesofaneventtreearewhatyouusetoloadwheninthegamecode.Seethe"Eventtreegroupstrategiesandloading/memoryallocationissues"sectionbelowforveryimportantissuesrelatedtoloadingandmemoryusage.
CreatingandinitializingtheEventSystemobject.
Hereisatypicalbitofinitializationcodethatyouwouldcallatthestartofyourproject.
FMOD::EventSystem*eventsystem=0;
result=FMOD::EventSystem_Create(&eventsystem;);
ERRCHECK(result);
result=eventsystem->init(256,FMOD_INIT_NORMAL,0);
ERRCHECK(result);
IfyouwanttoconfigurethelowerlevelFMODenginebeforeinitializingtheeventsystem(ieselectsoundcarddriver,setspeakermodeetc),thencallEventSystem::getSystemObject.
FMOD::EventSystem*eventsystem=0;
FMOD::System*system=0;
result=FMOD::EventSystem_Create(&eventsystem;);
ERRCHECK(result);
result=eventsystem->getSystemObject(&system;);
ERRCHECK(result);
(..UseSystemAPIherefromfmod.hpp..)
result=eventsystem->init(256,FMOD_INIT_NORMAL,0);
ERRCHECK(result);
DonotcreateyourownFMOD::SystemobjectusingFMOD::System_Create.
Thiswillcause2systemobjectstobeactive(theoneyoujustcreatedplustheonewithintheEventSystem),whichmeansitwilltrytoopenthesounddevicetwice.Italsomeans2softwaremixerswouldbespawned.ThisisABadThing.
AlsodonottrytocreatemultipleEventSystemobjects.Ifyouwanttoloadmultipleprojects,simplyloadthemfromtheoneEventSystem.
Importantmemorymanagementissueforconsoles(Xbox,Xbox360,PlayStation2,GameCube,PlayaStationPortable,PlayStation3):
Memorymanagementisaconsiderationthatmustbetakennoteof.Oncertainmachinesthedefaultmemoryallocationisinefficient(iethepagesizeiswaytoobigonXbox360meaningmegabytesoflostmemory),orcertainFMODfeaturesjustwontworkwithoutamemorypool(ieXboxmusthaveonesingleblockofcontiguousmemoryforaudiobuffers,andonXbox360XMAbuffersMUSTresidewithinmemoryallocatedwithXPhysicalAlloc,otherwisethesystemwillcrash).
Beforecallinganyfmodfunctions,firstallocateablockofmemoryandpassittoFMOD.Fromthenonitwillnotallocateanymorememoryitself.
result=FMOD::Memory_Initialize(memblock,MEMSIZE,0,0,0);
ERRCHECK(result);
OnXbox360useXPhysicalAlloc.
NotethatisthememoryFMODusesforallaudiodataincludingwavedata,unlessitisamachinewithdedicatedsoundramsuchasPlayStation2andGameCube.Ingeneralitisusuallyagoodideatostartoffwithalargememoryblock,thenuseFMOD::Memory_GetStatstofindoutthemaximummemoryusagebyFMODduringtheprogressofthegame.FMOD_ERR_MEMORYwillbereturnedfromFMODfunctionsifitrunsoutofmemory.
VirtualVoices.ThevalueyoupasstoEventSystem::Initforthenumberof'channels'shouldbeahighnumberresemblingthehighestnumberofvoicesyouwanttohaveplayingatonce(notaudible!thereisadifference).
Thehardwaremayonlyhave32hardwarevoices,butthisnumbercanbe64,128,256or1000,becauseFMODhasaVirtualVoiceSystem.Ifyoudonotgivethisahighnumber,thenvoicestealingwilltakeeffect,andvoiceswilldropoutseeminglyatrandom.Thatisbecausenew,moreimportantsoundswillbeplayed,kickingoutolder
voices.
Withahighenoughnumberofvirtualvoices,novoiceswillbestolen,andFMODwillautomaticallyswapvoicesinandoutbasedondistanceandpriority.Seethevirtualvoicetutorialinthetutorialformoreinformationonthis.
Loadtheproject.
LoadtheFEVfilewithEventSystem::load.Thisonlyallocatesmemoryfortheeventtreestructure.Itdoesnotallocatememoryforsampledata/wavebankdataoreventhememoryfortheeveninstances,whicharethethingsyouusetoplayandcontroltheeventslaterinthecode.Atthispointthememoryusageshouldbelowandthememoryallocatedisforthelowlevelsoftwaremixingengineandlowlevelchannelstructuresetc.YoucanloadmultipleFEVfileswiththisfunctionintoEventProjects.
Traversingtheeventtreeandgettingevents.
TotraverseatreeyoustartattherootbycallingEventProject::getGrouporEventProject::getGroupByIndexbyspecifyinganeventgroupattherootofthetree(ie'examples'inthiscase).FromthereyoucancallEventGroup::getGroup/EventGroup::getGroupByIndextoentersubgroupswithinthetree.AfullpathcanbeenteredwithintheGetGroupfunction,sothatyoudon'thavetomanuallytraverseityourselfoneatatime.FinallyyougetahandletoaneventwithEventGroup::getEvent/EventGroup::getEventByIndex.
Thesefunctionshaveloading(diskaccess)andmemoryallocationissues,whichneedtobeconsideredinthenextsection.
Eventtreegroupstrategiesandloading/memoryallocationissues.(Important!)
Terminology.
event-Theleafnodeinthetree.Thethingyouwillobtainahandletosothatyoucanplayit(andupdateitsparameters).eventgroup-'Folders'thatcontaineventsandothereventgroups.Theseareusedfororganizationalandloadingpurposes.wavebanks-The.FSBfilestobeloaded.Whenmemoryallocationoccursforthese,itmeansallocationfortherawPCMorcompressedaudiodata.eventinstancememory-Memoryrequiredtoplaytheevent(s).Ifaneventhasa'maxplaybacks'valuesetinthedesignertool,FMODwillallocatememoryforthatmanyinstances,sothattheycanplaysimultaneously.GenerallythememoryfootprintforthisissmallunlessthesounddesignerhasspecifiedmemoryintensiveDSPeffectssuchasreverb,echo,chorusorflange.OthertypesofDSPeffectsgenerallydonotallocateanymemory(IIReffectssuchaslowpassfilter,distortion).
Organizationofeventhierarchyandbanks.
Theeventtreeshouldbesetupbygroupingeventsintologicalgroupsthatwillbeloadedorusedtogether,forexamplelevelsinagame,andcommondata.Thereasonforthisisthatyoucanloadanentirebranch'saudiodatawithEventGroup::loadEventData.Thisdatainparticularisthe(usually)largerwavebankdata.ThismeansitwillloadthewavesfromtheFSBfilesreferencedbytheeventsinthetree.IfithasalreadyloadedsoundsfromthesameFSBreferencedfromanothereventgroup,itwillofcoursenottrytore-loadthem.
Note:SoundsareeitherloadedselectivelyfromanFSB,meaningyoucanprettymuchputeverysoundinto1wavebank,oryou,asaprogrammermayprefertopreloadawholewavebankatonce(ieEventSystem::preloadFSB)whichmeansyoumaywanttosplitwavesintologicalwavebankgroups.
Loading/Allocationoverview:EventSystem::loadloadstheFEVfile,andonlyallocatesasmallamountof
memorytoholdtheeventtreestructure.
EventGroup::loadEventDataloadsallofthewavesfromtheFSBfiles,necessaryforthespecifiedgroupanditssubgroups.Thisfunctionisrecursiveandtraversesallsubgroups.IfyoudonotcallEventGroup::loadEventData,FMODloadstheevent'swave
data,whenitneedstowhenyoucallEventGroup::getEvent/EventGroup::getEventByIndex.IfyoudocallEventGroup::loadEventDatathiswon'thappen.Callingthegeteventfunctionwithoutloadingthedatafirstwillmeanastalloccursasitloads.Thisisusuallyundesirable.
EventSystem::getGroup/EventGroup::getGroup/EventGroup::getGroupByIndexallocatetheeventinstancememory(includinganyDSPeffectallocations)fortheeventsinthatgrouponly,EVENT_CACHEEVENTSflagisused.ThisfunctionisnotrecursiveanddoesNOTtraverseintosubgroups.Ifcachevents=falsewhengettingagroup,thenFMODwillsimplyallocate
thememoryfortheeventwhenyoutrytogetit.ThismeansEventGroup::getEvent/EventGroup::getEventByIndexdoestheallocation.EventGroup::freeEventDataunloadsanywavedataANDfreeseventinstance
memoryforthatgroupandallgroupsbelowit.ThisfunctionisrecursiveandDOEStraverseintosubgroups.
EventGroup::getEvent/EventGroup::getEventByIndexwillnotdoanydiskaccessifEventGroup::loadEventDatawascalled,orallocateanymemoryifyouhaveprecacheditwithaGetGroupfunctionwithcacheevents=true.
Justrememberthesethings:1.Loadyourdataattheloadingphaseofthegame,withEventGroup::loadEventDatafromtherootofatree,generallyforstaticbanks.2.Beselectivewhenitcomestoeventsusingstreamingbanksthatareingroups.Ifyouonlywanted1streamtoplayoutof10inagroup(ieallthetracksinyourmusicgroup),thendon'tcallEventGroup::loadEventDataonthegroup,justcallEventGroup::getEvent/EventGroup::getEventByIndexwithouthavingcalledEventGroup::loadEventDataonthegroup,orusingcacheevents=trueonaGetGroupfunction.3.EventGroup::freeEventDatafreesallmemoryrelatedtoagroupanditschildren,includingwavebankdataandtheeventinstancememory.Ifyoucallthisthenitwillhavetore-loadandreallocatethedataifyoutrytousethatgroupagain.
FMODeventsystemCPUusage.
Nowthattheprogrammerhaslesscontroloverthecontentofaudiointhetitle,itmaybeeasiertoaccidentallyusemoreCPUthandesired.ItisgenerallyeasytofindoutFMODcpuusagebyusingthelowlevelfunctionalityofFMODwithEventSystem::getSystemObjectandSystem::getCPUUsage.IfthesounddesignerisusingtoomanyDSPeffects,thenthe'dsp'valuewillbehigh.
BydefaultFMODDesignerputsallsoundsinhardware,unlessthereisaDSPeffectappliedtotheevent.IfthereisthenFMODwillloaditintomainram,andmixtheeventontheCPUinsteadofintheaudiochip.
NoteallFMODDSPeffectsaregraduallybeingoptimizedusingwhateverSIMDcapabilitiesareavailableonthemachine.Ifaneffectseemsslowerthanitshouldbe,itmaypossiblynotbeoptimized,andrequestthroughsupport@fmod.orgtohaveitdone.Thereare12effectsand11platformstooptimize,whichmeans132routineshavetobeoptimized,andtheyalsohavetobeoptimizedformono/stereoandmultichannelpurposessothatis396loopstowrite,soasyoucanseethemostimportanteffectsandplatformswillbetargetedfirstaswemakeourwaythroughthem.
FirelightTechnologiesFMODEx
FMODDESIGNERNETWORKAPIPROGRAMMER'STUTORIALIntroduction.
ThissectionprovidesinstructionsonhowtousetheFMODDesignerNetworkAPI.ByusingtheFMODDesignerNetworkAPI,itispossibletousetheFMODDesignertooltoconnecttoyourgameasitisrunningandtweakthepropertiesofeventsasthey'replaying.Thisisusefulforsounddesignersastheycan,forexample,playthegameandadjustvolumelevelsofeventsinrealtimeastheyhearthem.
UsingtheNetEventSystemfunctions.
TousetheFMODDesignerNetworkAPIallyouneedtodois:
CallNetEventSystem_InitandpassitapointertoyourEventSystemobject.
CallNetEventSystem_UpdatejustaftereachcallyoumaketoEventSystem::update.
CallNetEventSystem_ShutdownafteryoucallEventSystem::release.
Linkwithfmod_event_net.libaswellasfmod_event.lib.
ConnectingtoyourgameusingFMODDesigner.
WhenyourgameisupandrunningusingtheFMODDesignerNetworkAPI,youcanusetheFMODDesignertooltoconnecttoitatanytime.Toconnecttoyourgame:
Select"Audition->ManageConnections..."fromthemenu.
Addanewconnectionandfillintherelevantdetails.Youcanusetheloopbackaddress127.0.0.1ifyouwanttorunyourgameandFMODDesigneronthesamemachine.
Click"Connect".
Loadaprojectcontainingsomeoralloftheeventsthatwillplayinthegame.Note:FMODDesignercan'ttriggerneweventswithinyourgame.Ifyouwanttoheartheresultsofyourtweaking,youmusttotriggertherelevanteventsfromthegameside.
Nowyoucanadjustthepropertiesofeventusingtheeventpropertysheetintheeventview,andenvelopes/settingsineventeditorview.
SaveyourchangesinFMODDesignerusing"File->Save"atanytime.Note:Youmustbuildtheprojectagainbeforethesechangesaremadepermanentinthe.FEVfile.
FirelightTechnologiesFMODEx
FMODExandmovieplayersIntroduction
ThissectiondescribeshowtohaveFMODhappilycoexistwithvariousmovieplaybacksystemsavailable.
Windows
IfyouneedtogetahandletoFMOD'sinternalDirectSoundpointer,youcanshareitbycallingSystem::getOutputHandleandcastingittotheappropriatepointertype.Windowsallowsmultipledirectsoundinterfacestobecreated,sothismaynotbenecessary.
XBox360
IfyouneedtogetahandletoFMOD'sinternalXAudio2pointertopasstoamovieplayer,youcanshareitbycallingSystem::getOutputHandleandcastingittotheappropriatepointertype.IfthemovieplayerhasalreadyinitializedXAudio2,youcanstopFMODfrominitializingXAudio2byusingFMOD_360_EXTRADRIVERDATAinfmodxbox360.h,andpasstheexistingXAudio2handleto'xaudio2instance'.
Playstation3
AmovieplayercangenerallycreateitsownlibaudiooutputportanditwillrunalongsideFMOD.IfitdoesnotworkwhensharingaSPURSinstance,itmaybebecauseoftheSPURSmodeFMODisrunningin.Bydefault,FMODusesonlyoneSPURStaskforboththemixerandstreamdecoding.ThisSPURStaskiscreatedwithnocontext,socannotswapout.Ifyoulookinfmodps3.h,youwillseetheFMOD_PS3_SPURSMODEenumerations.YoucanusethesetosettheSPURSbehaviourinFMOD_PS3_EXTRADRIVERDATA.
Therearethreemodes,
FMOD_PS3_SPURSMODE_NOCONTEXT-describedabove,whichisthedefault.FMOD_PS3_SPURSMODE_CREATECONTEXT-sameasabove,but
createdwithacontext,sohencecanbeswappedout.FMOD_PS3_SPURSMODE_TWOTASKS-Modethatusedtobeusedin
4.26andbelowbydefault.Thisuses2SPURStasks,oneformpegstreamdecodingandoneformixing.
IfthemovieplayerhasinitializedlibAudio,gotofmodps3.hagainandsetcell_audio_initializedfromtheFMOD_PS3_EXTRADRIVERDATAstructuretoTRUE.ThiswillstopFMODfromtryingtoreinitializeit.Youthendefinetheaudioportnumberusedwiththecell_audio_portmemberoftheFMOD_PS3_EXTRADRIVERDATAstructure.
Wii
IfthemovieplayerhasinitializedAX,gotofmodwii.handsetaudiolibsinitializedfromtheFMOD_PS3_EXTRADRIVERDATAstructuretoTRUE.ThiswillstopFMODfromtryingtoreinitializeit.OtherwisethemovieplayermustnotinitializeAI/AX/MIXifFMODhasalreadydonesofirst.
PlayStation2.
ThissectiondescribeshowtohaveFMODhappilycoexistwithvariousmovieplaybacksystemsavailable.ThemaincausesonconflictsbetweenothermiddlewarethatusesaudioortheIOP,andFMODare:
ConflictbetweentheSPU2DMAchannels.Thereare2ofthese.DMAchannel0andDMAchannel1.BydefaultFMODusesSPU2DMAchannel0forsoftwaremixing,andDMAcore1foruploadingsampledataandforstreamingto.ThismeansDMAcore1isusedwhenSystem::createSoundisbeingexecutedtoloadaPS2FSBfile,orstreamingusingSystem::createStream.Toworkaroundthisissueseethefollowingtips.TurnofftheFMODsoftwaremixer.Thisisalreadydoneifyouareusingthe
_reducedversionofthelibrary.ThiswillfreeupDMAChannel0.MostofthetimeyouarenotgoingtoneedtheFMODsoftwaremixer.YoucandothisbyusingSystem::initwiththeFMOD_INIT_DISABLESOFTWAREflag.SwapFMOD'smixer/uploadchannelusagearound.Ifthe3rdparty
softwarestillusesDMAChannel1(thechannelFMODusesforbankuploadsandstreaming),youcaneitherchangeyour3rdpartysoftwaretouseDMAChannel0insteadofDMAChannel1,ortellFMODtoswapitsusagearoundbyspecifyingFMOD_INIT_PS2_SWAPDMACHANNELS.Ifyoudidn'tturnthesoftwaremixeroff,thiswouldmakeFMODuseDMAChannel0forstreamsandsamplebankuploads,andDMAChannel1forthesoftwaremixer.
ConflictontheSIFCMDports.IfyourmiddlewareoryourowncodeisusingtheSIFCMDsonylibrarytocommunicatewiththeIOP,thenifyoudonttakecaretosharetheSIFCMDbuffersandportswithFMOD,messageswillgetlostandunexpectedbehaviourwilloccurinFMODandyour3rdpartysoftware.Ifyouwanttoinitializeyour3rdpartysoftwareafterFMOD.Usethis
informationifthecodehasawaytosetupitsSIFCMDusage.NotethatFMODusesSIFCMDport0,1and2,andhasabuffersizeof16.Ifyouwanttoinitializeyour3rdpartysoftwarebeforeFMOD.IfFMOD
isinitializedfirst,callSystem::initanduseFMOD_PS2_EXTRADRIVERDATAstructurefromfmodps2.h.AlsoloadyourFMODEX.IRXorFMODEXD.IRX
withcommandlineparameterstoallowtheIOPsidetogetthesameinformation.FormoredetailedinformationonthisseethecommentabovetheFMOD_PS2_EXTRADRIVERDATAdeclarationinfmodps2.h.
SPU2ramusageandSPU2hardwarevoiceusage.BecauseFMODandthemiddlewaremightnotknowabouteachother,theymightallocatememoryoruseSPU2voiceswithoutanyregardfortheother.UseFMOD_SPU2_Alloc/FMOD_SPU2_GetRawAddress/
FMOD_SPU2_Free.UsethesefunctionstosetasideSPU2ramforothermiddlewareusage.UseFMOD_SPU2_ReserveVoice.UsethisfunctiontosetasideanSPU2
voiceforothermiddlewareusage.
BinkonPS2
HereisaquickwaytogetFMODPS2andBinktoco-exist.
InitializeFMODfirst.
FMOD_System_Init(system,numchannels,FMOD_INIT_PS2_SWAPDMACHANNELS,NULL);
InitializeBink
MovieBuffer=sceSifAllocIopHeap(RAD_IOPMemoryAmount(RAD_IOP_NEED_CORE1));
RAD_IOPMemoryAmount(RAD_IOP_NEED_CORE1)));
if(!RAD_IOPStartUp(1,3,MovieBuffer,RAD_IOP_NEED_CORE1|RAD_IOP_NO_INIT_LIBSD))
{
sceSifFreeIopHeap(MovieBuffer);
//error
}
RAD_IOPHardwareVolumes(1,0x3fff,0x3fff,0x3fff,0x3fff);
BinkSoundUseRAD_IOP(1);
PlaystationPortable
Inordertoco-existwithmovieplayers,libWaveneedstobeusedforaudiooutput.ThisoutputmodeisnotasefficientastheSimpleAudiooutputmode(defaultinFMOD).
WhatyoucandoisswitchFMODtouselibWaveontheflywhenamovieneedstobeplayed,andafterthemoveisfinished,switchFMODbacktoSimpleAudio.ThiscanbedoneusingtheFMOD_PSP_ChangeOutputModefunctiondeclaredinfmodpsp.h.
Xbox1(Obsolete)
ThemaincausesonconflictsbetweenothermiddlewarethatusesaudioontheXBox,andFMODare:
"DSOUND:CMcpxAPU::AllocateVoices:Error:Notenoughfreehardwarevoices".BydefaultFMODassumesitisintotalcontroloftheaudio,soitallocateseveryXBoxaudiovoice.Ifanother3rdpartysoftwareapplicationtriestoallocateahardwarevoiceitwillfail.UseSystem::setHardwareChannels.Togetaroundthisissuejustcall
System::setHardwareChannelstoreducethecount.XBoxhasaround192HW2Dvoicessoyoucouldreducethisandstillhaveplentyofvoicesfree.DSPImageincorrect.FMODhasaninternalMCPDSPimagethatitloads.It
isstrippeddowntosavememory,(hundredsofkilobytes)byremovingunnescessaryfeatures.Thismayconflictwithother3rdpartysoftwarethatreliesonastandardDSPimagesuchasMicrosoft'sdsstdfx.bin.UseFMOD_SpecifyEffectsImage.Thisfunctionalityisnotavailableatthis
time.Contactsupport.MaketheothersoftwareuseFMOD'simage.Thisfunctionalityisnot
availableatthistime.Contactsupport.NeedsaccesstotheXBoxLPDIRECTSOUNDhandle.Ifthe3rdparty
softwareisinitializedsecond,itmaywanttousetheXBoxLPDIRECTSOUNDhandle.UseSystem::getOutputHandle.IfyouneedtogetahandletoFMOD's
internalDirectSoundpointer,youcanshareitbycallingSystem::getOutputHandleandcastingittotheappropriatepointertype.
FirelightTechnologiesFMODEx
THREADSANDTHREADSAFETYIntroduction
ThissectionwilltalkaboutthethreadsFMODcreates,andthreadsafety.
FMODthreadstypes.
FMODhas4mainthreads,and2ofwhicharecreatedatthetimeofSystem::init,and2ofwhicharecreatedonlywhenyouusecertainflags.Theyare
Mixerthread.Softwaremixingthread,createdatSystem::init.Streamthread.Threadusedfordecodingstreams.Createdthefirsttimea
soundisloadedasastreaminSystem::createSoundwithFMOD_CREATESTREAM.orSystem::createStream.Asyncloadingthread.Createdthefirsttimeasoundisloadedwiththe
FMOD_NONBLOCKINGflaginSystem::createSound.Filereadingthread.Threadusedforreadingfromdiskforstreams,tothenbe
decoded(decompressed)bytheStreamthread.CreatedthefirsttimeasoundisloadedasastreaminSystem::createSoundwithFMOD_CREATESTREAM.orSystem::createStream.
Exceptions.
IfFMOD_INIT_STREAM_FROM_UPDATEisused,thenthestreamthreadwillnotbecreated.IfFMOD_OUTPUTTYPE_WAVWRITER_NRTorFMOD_OUTPUTTYPE_NOSOUND_NRTareused,thenthemixerthreadwillnotbecreated.
Everythingelseisrunfromthemain/gamethread,includingSystem::updatecalculations.
FMODthreadsprioritiesperplatform.
Forreference,foryourownthreadcode,herearethethreadprioritiesusedinFMODperplatform.
Threadprioritytable.Platform Mixerthread StreamthreadWin32/Win64(SetThreadPriority) THREAD_PRIORITY_TIME_CRITICAL THREAD_PRIORITY_HIGHEST
Linux/Linux64(pthread_setschedparam) 99
Mac/Mac86(MPSetTaskWeight) 10000
PS2(EE,CreateThread) 1PSP(sceKernelCreateThread) 8
PS3(sys_ppu_thread_create) 0
Xbox(SetThreadPriority) THREAD_PRIORITY_TIME_CRITICAL THREAD_PRIORITY_HIGHEST
Xbox360(HWThread4,SetThreadPriority) THREAD_PRIORITY_TIME_CRITICAL THREAD_PRIORITY_HIGHEST
Gamecube(OSCreateThread) 0
Wii(OSCreateThread) 0
FMODcallbacks
FMODFileandmemorycallbackscanpossiblybecalledfromanFMODthread.Rememberthatifyouspecifyfileormemorycallbackswithfmod,tomakesurethattheyarethreadsafe.FMODmaycallthesecallbacksfromthestreamthread,orFMOD_NONBLOCKINGthreadatanytime.
CallingFMODcommandsfromdifferentthreads.
DonotcallFMODcommandsfromdifferentthreads!Thiswillleadtoinstability,corruptionandpossiblecrashes.
SomepeoplearetemptedtoputSystem::updateintoaseparatethread,Onlydothisifyoucriticalsectionthisandallothercallstofmod..TomakeFMODthreadsafewouldinvolvewrappingeveryFMODfunctioninacriticalsection,whichaddsunnecessaryoverhead,soatthistimeFMODExisremaining'notthreadsafe'forthetimebeing.
FirelightTechnologiesFMODEx
REVERBNOTESIntroduction
ThissectionwilldiscussFMOD'sreverbparametersfocusingonthesoftware(SFX)implementation.
ThefieldsofFMOD_REVERB_PROPERTIES(foundin'fmod.h')controlbothhardwareandsoftwareinstancesofreverb.Hardwarereverbshaveafewparametersthatthesoftwareeffectdoesn'tuse,soyoucanignoretheseforthepurposeofthisdiscussion.Forexample,EnvDiffusionisNOTusedbythesoftwarereverbbecauseitisonlymeaningfultoWii.
FMOD'ssoftwarereverbDSPiscontrolledbyparametersdefinedintheI3DL2guidelines,whichdescribethereverberantenvironmentofthelistener.
Here'salistofthefieldsofFMOD_REVERB_PROPERTIESthatcurrentlyhaveaneffectandadescriptionofwhattheydowithinthecontextofthesoftwarereverb.Thedescriptionsaremuchthesameasin'fmod.h'.
Environment Turnsthereverboffifsetto-1
Room Roomeffectlevelatmidfrequencies
RoomHFRelativeroomeffectlevelathighfrequencies
RoomLFRelativeroomeffectlevelatlowfrequencies
DecayTimeReverberationdecaytimeatmidfrequencies
DecayHFRatioHigh-frequencytomid-frequencydecaytimeratio
Reflections Earlyreflectionslevelrelativetoroomeffect
ReflectionsDelay Initialreflectiondelaytime
ReverbLatereverberationlevelrelativetoroomeffect
ReverbDelayLatereverberationdelaytimerelativetoinitialreflection
HFReferenceReferencehighfrequency(Hz)[seeRoomHF]
LFReferenceReferencelowfrequency(Hz)[seeRoomLF]
Diffusion Echodensityinthelatereverberationdecay
DensityModaldensityinthelatereverberationdecay
Pleasenote:
RoomRolloffFactorisapartofI3DL2,buthasnoeffectwithinFMOD.
Aswithmostreverberationmodels,theresponseissplitintosections.Thisimplementationhasearlyreflectionsandlatereverberation,eachofwhicharecomposedofsetsofdelaylineshavingdifferentdelayanddecaycharacteristics.
Thereareafewthingstonotehere:
1)Room,RoomHF,RoomLF,ReflectionsandReverbareallmeasuredinmilliBels,i.e.100thofadeciBel,andthey'reallintegers.2)Roomistheinputgain3)Reflectionsisagainontheoutputoftheearlyreflectionssubsystem4)Reverbisagainontheoutputofthelatereverbsubsystem5)RoomLFandLFReferencecontrolalowfrequencyshelvingfilterontheinput6)RoomHFandHFReferencecontrolahighfrequencyshelvingfilterontheinput7)DiffusionandDensitycontrolthecorrelationamongdelaylinesinthereverbsubsystem
TheFMOD_PRESET_*presetscanbeusefulasexamplesofhowtheseparameterschangethenatureofthereverb.Theygivequiteawidescopeforrepresentingdifferentenvironments.
Onemorething-it'simportanttodistinguishbetweenFMOD_REVERB_PROPERTIESandFMOD_REVERB_CHANNELPROPERTIES.Thelatterisjustusedforcontrollingtheachannel'sinputgaintothereverb,anddoesn'taffectthecharacteristicsofthereverbunititself.
FirelightTechnologiesFMODEx
COMPRESSIONQUALITY,MULTICHANNELANDLOOPINGWITHLOSSYAUDIOFORMATS.QualityandBitrate.
Whatistherelationshipbetweenbitrateandthe'compressionquality'property?
WithinFMODDesigner,thecompressionqualitypropertyisfoundinthewavebankpropertypanel.InFSBankExthequalitypropertyisintheformatoptions.Therelationshipbetweenbitrateandthecompressionqualityproperty(whendealingwithconstantbitratecompression),isappropriately:
bitrate=quality*3.2
ThisisthecaseforMP2/MP3butmaydifferforXMAandotherbitratebasedformats.
BitratesandsampleratesforMPEGdata
ThefollowingtableshowstheavailablebitratesandsampleratesavailableforMPEGdatawithinFMOD:
Note!ThisistheMPEGversion,notthe'layer'version.Layer2and3arecommonlyknownasMP2/MP3.MP3forexamplecouldbeMPEG1or2,butisstill'layer3'BothMP2supportandMP3supportsharethesameMPEGversionsandbitrate/sampleratecapabilities.
MPEG1Bitrates(kbps)
MPEG1Samplerates(kHz)
MPEG2Bitrates(kbps)
MPEG2Samplerates(kHz)
32 32 8* 8*48 44.1 16 11.025*56 48 24 12*64 32 1680 40 22.0596 48 24112 56128 64160 80192 96224 112256 128320 144384 160
*NotethatthecrossedoutvaluesarenotsupportedbyFSBankExeventhoughtheyarespecifiedaspartoftheMPEGformatspecification.
Shouldtheuserattempttouseasampleratenotlisted,FMODwillautomatically
resamplethefile(upwards)tothenextvalidsamplerate.Forexample,afilewithasamplerateof15kHzwillberesampledto16hHz.
Multi-channelMPEGEncoding
FMODisabletocreateMPEGfileswithupto16channels(eightstereopairs).Todothis,thebuildprocess:EncodeseachstereopairintofixedsizedMPEGframes.Thesizeofthe
framesisdeterminedbythebitrate.Thesizeoftheframemustbeamultipleof16bytes.Toinsurethis,apadof0to15bytesisplacedattheendofeachframe.Interleavesaframefromeachstereopairintoamulti-channelframe.
Thisprocessisillustratedinthefigurebelow.
Figure1:Encodingamulti-channelMPEGfile
Forexample,let'sconsiderasix-channelMPEGfileusingaconstantbitrateof128kbps.Thesixchannelsareencodedintothreestereopairs.EachframeofstereoMPEGdatais432bytes(includinga14bytebuffer).FMODinterleavesthestereoframesevery432bytesintoamulti-channelMPEGframe.Thesizeofthemulti-channelMPEGframecanbecalculatedasframesize*Numberofstereopairs.Inthisexample,themulti-channelMPEGframeis432*3,giving864bytes.
Encodingmp3filesforseamlesslooping
Typicallywhenanmp3fileislooped,anaudiblegapcanbeheardwhenplaybackloopsbacktothestart.Thisgapisobviouswhenthelooprequiresasampleaccuratestitchingfromthelastsampletothefirst.Thisoccursforanumberofreasons,thetwomajorfactorsbeing:MPEG1layer3encodestheaudiodataintoframesof1152samples.Ifthe
audiodatadoesn'tfillaframe(mostimportantlythelastframe),theencoderwillpadtheframewithsilentsamples(someencoderwilladdanentiresilentframe!)Thedecodingofanmp3frameisdependentonthepreviousframe.Whena
loopoccurs,thedecoderwillrequiredatafromthelastframetosmoothlyloopbacktothefirstframe.
Withoutspecialencoding,itisnotpossibleformp3datatoloopseamlessly-fortunatelyFMODdoesprovideamethodtodojustthat!TheFMODmp3encodercanbeaccessedviaFMODDesignerorFSBankEx.ForDesignerusers,thespecialencoderisautomaticallyusedifthesounddefinitioninstanceissettoloopandthewavebankcompressionpropertyto'MP3'.Note:ifthesounddefinitioninstanceissetto'one-shot'thestandardmp3encodingisused.UsersofthelowerlevelAPIcanspecifytheFSBankExtoencodemp3dataforseamlesslooping.
SowhatdoesFMODdotoprovideseamlessloopofmp3data?
Firstly,FMOD'sencoderwillresampleandstretchthelastframetoensurethatall1152samplesoftheframeareused.Thiswillensuretheframeisnotpaddedwithsilentsamples.
Whenusedonsomesources,thisprocessmaycauseaslightlyaudiblepitchchangeartifact.Ifthisisthecase,userareencouragedtorepeattheaudiowithinthefiletoincreasethefilesize,sothetimestretchdistancebecomeslesssignificant.Usersmayalsoresizethelengthoftheiraudiotoamultipleoftheframesize.Thetablebelowliststheframesizeforvariousformats.
Format Framesize(samples)
MPEG1 1152MPEG2(2.5) 576XMA 2048VAG 28GCADPCM 36
Withtheremovalofanypaddingwithinthelastframe,FMOD'sencodermustthenprimethefirstframewithdatafromthelastframe.Thelastframeisthenremoved.ThisallowsFMOD'sdecodertoavoidissuesofframedependencybetweenthefirstandlastframeandprovideaseamlessloop.
InmostsituationsFMOD'sencoderanddecoderwillperformperfectloopingofmp3content.Howeversomeaudibleartifactscanbeintroduced,thisisillustratedbelow.
Figure2:EncodingMPEGframesforseamlesslooping
Whenthefirstframecontainssilenceandthelastframecontainsanaudiblesignal,theinterpolationusedinprimingthefirstframewillresultinanaudible'pop'.Shouldusersrequiresilenceinthefirstframeoftheirloop,theyshould:
makesuretheoriginalwaveloopsproperly,orpadtheendofthefilewithaframeofsilence.
XMAQualityandCompression
Asspecified(inpart)intheXboxSDKdocumentation:
TheXMAencoderallowstheSoundDesignertospecifyaqualitysettingbetween1and100,where:
1providesthehighestcompressionlevelandthelowestquality,and100providesthelowestcompressionlevelandthehighestquality.
XMA'svariablebitratecompressioniscontentdependent,meaningcompressionratioscanvarygreatlybetweenpiecesofcontent.Thismeansthequalitysettingsdonottranslatedirectlytospecific
compressionratios.TheXbox360DevelopmentKitsuggestsacompressionratebetween8:1and
15:1willprovideadequatequalityformostgameaudioassets.
FirelightTechnologiesFMODEx
UsingmultiplereverbsIntroduction
Insomesituations,multiplestylesofreverberationswithinasingleenvironmentmustbemodeled.Forexample,imaginealargechurchhallwithatunneldownintothecatacombs.Thereverbappliedtotheplayer'sfootstepswithinthechurchhall(suchasFMOD_PRESET_STONEROOM)couldbequitedifferenttothatofthemonstersoundsemittingfromthetunnel(whichmaybeappliedwithbothFMOD_PRESET_SEWERPIPEandFMOD_PRESET_STONEROOM).Tohandlethissituation,multipleinstancesofthereverbDSParerequired.AsmanyasfourinstancesofthereverbDSPcanbeaddedtotheFMODExDSPNetwork(atacostofmoreCPUtimeandmemoryusage).
Note:Shouldyouwanttomodelmultiplereverbstypeswithinanenvironmentwithouttheextraresourceexpenseofmultiplephysicalreverbs,seethe3Dreverbtutorial,whichcoversautomated3Dreverbzonesusingsinglereverbinstance.
Inthissectionwewilllookatexamplesof:
AddingphysicalreverbsusingthelowlevelAPI(withsomeadditionalsuggestionsfortheEventSystem)Queryinganinstance'sreverbpropertiesControllingthewet/drymixofeachreverbinstanceperchannel
Settingupthereverbs
Belowisanexampleofsettingupfourreverbinstances.Youdonotneedtoexplicitlytheextrareverbinstances-theFMODExenginecreatesthemandconnectsthemtotheDSPNetworkwhenyoureferencethem.
InthefollowingexamplewewilluseSystem::setReverbPropertiestospecifyfourdifferentreverbeffects.Ifusingtheeventsystem,youcansimplysubstitutetheSystem::setReverbPropertiesmethodcallforEventSystem::setReverbProperties.
FirstwedefinefourdifferentFMOD_REVERB_PROPERTIESstructures.Theexamplebelowusespresets.Youcandefineyourownreverbsettingsbutpresetsmakeiteasiertogetsomecommonreverbsworking.
FMOD_REVERB_PROPERTIESprop1=FMOD_PRESET_HALLWAY;
FMOD_REVERB_PROPERTIESprop2=FMOD_PRESET_SEWERPIPE;
FMOD_REVERB_PROPERTIESprop3=FMOD_PRESET_PARKINGLOT;
FMOD_REVERB_PROPERTIESprop4=FMOD_PRESET_CONCERTHALL;
Wethenchangethe'Instance'membertosetwhichreverbDSPunitwillbeusedforeachpreset,thencalltheSystem::setReverbPropertiesfunction.
prop1.Instance=0;
result=system->setReverbProperties(&prop1);
prop2.Instance=1;
result=system->setReverbProperties(&prop2);
prop3.Instance=2;
result=system->setReverbProperties(&prop3);
prop4.Instance=3;
result=system->setReverbProperties(&prop4);
GettingtheREVERBproperties
ShouldyouwishtogetthecurrentSystemreverbproperties,youmustfirstsettheInstancememberbeforecallingSystem::getReverbProperties.InthisexamplewewillgetthepropertiesforInstance3.
FMOD_REVERB_PROPERTIESprop={0};
prop.Instance=3;
result=system->getReverbProperties(&prop);
Settingthewet/drymixperChannel
EachchanneloftheFMODExmixercansettheirwet/drymixforeachreverbwithChannel::setReverbProperties.Inthenextexampleweshallsetboththewetanddryvaluesofall4instancesofreverbforagivenchannel.Bydefaultachannelwillsendtoallinstances.Thisexamplesetstheinstance1sendvalueto-10000mb(off).
FMOD_REVERB_CHANNELPROPERTIESprop={0};
Getthesettingsforthischannelforreverbinstance1.Notethatallothermembersare0,onlytheinstanceflagisreadwhenbeingpassedtothe'get'function.Everythingelsewillbeoverwritten.
prop.Flags|=FMOD_REVERB_CHANNELFLAGS_INSTANCE1;
result=channel->getReverbProperties(&prop);
Nowchangetheroomsettingto-10,000dbtomakethewetmixforthischannelsilent.
prop.Room=-10000;
result=channel->setReverbProperties(&prop);
Hereisanalternateversion,turningallsendvaluesforall4reverbinstancesto-10000mb(alloff).
FMOD_REVERB_CHANNELPROPERTIESprop={0};
Passinginanullfilledstructurewillmeanthesettingsforinstance0willbereturned.
result=channel->getReverbProperties(&prop);
Nowusethesamestructure,andchangetheroomvalueto-10,000db.Leavingothermembersintactwillmakethewetconnectionsilent.
prop.Room=-10000;
prop.Flags|=FMOD_REVERB_CHANNELFLAGS_INSTANCE0;
prop.Flags|=FMOD_REVERB_CHANNELFLAGS_INSTANCE1;
prop.Flags|=FMOD_REVERB_CHANNELFLAGS_INSTANCE2;
prop.Flags|=FMOD_REVERB_CHANNELFLAGS_INSTANCE3;
result=channel->setReverbProperties(&prop);
Tocontinuetheaboveexample,thesendvaluestoreverbs1and3willbeswitchedbackon:
FMOD_REVERB_CHANNELPROPERTIESprop={0};
Firstgetthechannelpropertiesforeventinstance1sothatwecanuseittocallwiththesetfunction.Notethatifyousetanyinstanceflags,theinstancesettingsforthefirstwillbereturned.
prop.Flags=FMOD_REVERB_CHANNELFLAGS_INSTANCE1;
result=channel->getReverbProperties(&prop);
Nowchangetheroomsettingto0dbandtellthesetfunctionwewanttoset2reverbinstancesatoncebyspecifyingtheflagsforinstance1and3.Instance1flagdoesnotneedtoberesetagainbutitishereforclarity.
prop.Room=0;
prop.Flags|=FMOD_REVERB_CHANNELFLAGS_INSTANCE1;
prop.Flags|=FMOD_REVERB_CHANNELFLAGS_INSTANCE3;
result=channel->setReverbProperties(&prop);
FirelightTechnologiesFMODEx
AsynchronousI/OanddeferredfilereadingIntroduction
ThistutorialwilldescribehowtodeferfilereadinginFMODsothatyoudon'thavetoimmediatelysatisfyFMOD'srequestsfordata.Thissortofbehaviorishighlydesirableingamestreamingenginesthatdonothaveaccesstothedatayet,orforwhenaccessingdataoutoforderorinanonsequentialfashionwouldgreatlydegradeperformance.FMOD'sasynchronousI/OcallbackswillallowyoutoreceiveanFMODreadrequestanddeferittoalatertimewhenthegameisready.FMODwilluseprioritiestonotifythegameenginehowurgentthereadrequestis,assometimesdeferringamusicstreamreadforexamplecouldresultinstutteringaudio.
Setup:OverrideFMOD'sfilesystemwithcallbacks
TheideaisthatyouarewantingtooverridethefileI/OthatFMODnormallyperformsinternally.YoumayhavedonethisbeforewiththeSystem::setFileSystembyoverridingthefollowingcallbacks:
FMOD_FILE_OPENCALLBACKuseropen
FMOD_FILE_CLOSECALLBACKuserclose
FMOD_FILE_READCALLBACKuserread
FMOD_FILE_SEEKCALLBACKuserseek
ThenormalbehaviorhereisthatyouwouldneedtosatisfyFMOD'sreadandseekrequestsimmediatelyinablockingfashion.Intheopencallback,youopenyourinternalfilehandleandreturnittoFMOD,alongwiththefilesize.Youwouldhavetosetallcallbacksorfilesystemoverridewouldnotwork.AnycallbackthatisnullintheabovecallbacklistwillcauseFMODtousethedefaultinternalsystemandignoreyourcallbacks.Allcallbacksmustbeset.
WithasyncI/O,thereare2newcallbackswhichyoucanusetoreplacethe'userread'and'userseek'callbacks:
FMOD_FILE_ASYNCREADCALLBACKuserasyncread
FMOD_FILE_ASYNCCANCELCALLBACKuserasynccancel
Ifthesecallbacksareset,the'userread'and'userseek'callbacksaremaderedundant.Youcanofcoursekeep'userread'and'userseek'definedifyouwanttoswitchbetweenthe2systemsforsomereason,butwhen'userasyncread'isdefined,thenormalread/seekcallbackswillneverbecalled.
Definingthebasics-openingandclosingthefilehandle.
Beforewestart,we'lljustdefinetheopenandclosecallback.Averysimpleimplementationusingstdioisprovidedbelow:
FMOD_RESULTF_CALLBACKmyopen(constchar*name,intunicode,unsignedint*filesize,void**handle,void**userdata)
{
if(name)
{
FILE*fp;
fp=fopen(name,"rb");
if(!fp)
{
returnFMOD_ERR_FILE_NOTFOUND;
}
fseek(fp,0,SEEK_END);
*filesize=ftell(fp);
fseek(fp,0,SEEK_SET);
*userdata=(void*)0x12345678;
*handle=fp;
}
returnFMOD_OK;
}
FMOD_RESULTF_CALLBACKmyclose(void*handle,void*userdata)
{
if(!handle)
{
returnFMOD_ERR_INVALID_PARAM;
}
fclose((FILE*)handle);
returnFMOD_OK;
}
Defining'userasyncread'
Theideaforasynchronousreading,isthatFMODwillrequestdata(note,possiblyfromanythread-sobewaryofthreadsafetyinyourcode!),butyoudon'thavetogivethedatatoFMODimmediately.YoucanreturnfromthecallbackwithoutgivingFMODanydata.ThisisdeferredI/O.
Forexample,hereisadefinitionofanasyncreadcallback:
FMOD_RESULTF_CALLBACKmyasyncread(FMOD_ASYNCREADINFO*info,void*userdata)
{
returnPutReadRequestOntoQueue(info);
}
Notethatwedidntactuallydoanyreadhere.YoucanreturnimmediatelyandFMODwillinternallywaituntilthereadrequestissatisfied.NotethatifFMODdecidestowaitfromthemainthread(whichitwilldooften),thenyoucannotsatisfythequeuefromthemainthread,youwillgetadeadlock.Justputtherequestontoaqueue.We'lldiscusshowtoletFMODknowthatthedataisreadyinthenextsection.
Thereareafewthingstoconsiderhere:ThecallbackcouldcomefromanythreadinsideFMOD'ssystem.Usuallythis
meansFMOD'sstreamingthread,FMOD'sfileI/Othread,themainthread,ortheFMOD_NONBLOCKINGthread.Bethreadsafe!Usecriticalsectionsaroundlinkedlist/queueoperationstoavoidcorruptionofdata.Returncode.Thisisusuallyafatal,nondiskrelatederrorsuchasnotbeing
abletoaddtothequeue.Thiscouldbeanoutofmemoryerrorforexample.UseFMOD_ERR_MEMORYasthereturnvalueifthisisthecase.ReturnFMOD_OKinnormalcases.Itnormallywon'tbeareturncoderelatedtoadiskerror.Youhavetosetthe'result'codeintheFMOD_ASYNCREADINFOstructuretoletFMODknowaboutafilebasederror.Bewarythatyourqueuedcommandmayneedtobecancellediftheuser
decidestoreleasetheFMODresourcethatisusingthatfile,suchasasound.Seethenextsectionaboutmyasynccancelinthatcase.TheFMOD_ASYNCREADINFOstructureiswhereyoufillinthedata
requestedbyFMOD.Seebelowforamoredetaileddescriptionofthisstructureandwhatisrequiredtocompletetheread.
Defining'userasynccancel'
Ifyouhavequeuedupalotofreadrequests,andhavenotsatisfiedthemyet,thenitispossiblethattheusermaywanttoreleaseasoundbeforetherequesthasbeenfulfilled(ieSound::releaseiscalled).InthatcaseFMODwillcalltheasynccancelcallbacktoletyoucancelanyoperationsyoumayhavepending,thatarerelatedtothisfile.
FMOD_RESULTF_CALLBACKmyasynccancel(void*handle,void*userdata)
{
returnSearchQueueForFileHandleAndRemove(info);
}
Notethattheabovecallbackimplementationwillsearchthroughourinternallinkedlist(inathreadsafefashion),removinganyrequestsfromthequeuesothattheydon'tgetprocessedaftertheSoundisreleased.Ifitisinthemiddleofreading,thenthecallbackwillwaituntilthereadisfinishedandthenreturn.Donotreturnwhileareadishappening,orbeforeareadhappens,asthememoryforthereaddestinationwillbefreedandthedeferredreadwillreadintoaninvalidpointer.
FillingouttheFMOD_ASYNCREADINFOstructurewhenperformingadeferredread
TheFMOD_ASYNCREADINFOisthestructureyouwillpasstoyourdeferredI/Osystem,andwillbethestructurethatyoureadandfilloutwhenfulfillingtherequests.
Thestructureexposesthefeaturesoftheasyncreadsystem.Theseare:Priorityissupported.FMODwilllettheuserknowifthereadisnotimportant,
mildlyimportant,orextremelyimportant.Thiswillallowtheusertoreshufflethequeuetomakeimportantreadshappenbeforenonimportantreads.Readcompletionissignalledbysimplysettingthe'result'codeof
FMOD_ASYNCREADINFO.Memorydoesnotneedtobecopiedanywhere,youcanreaddirectlyinto
FMOD'spointerswhichpointdirectlytotheinternalfilebuffers.YoudonothavetogiveFMODallofthedata,youcangiveapartialread
resulttothecallbackandFMODwillmostlikelyjustissueanotherreadrequestlaterwithasmallerbytevalue.
typedefstruct{
void*handle;
unsignedintoffset;
unsignedintsizebytes;
intpriority;
void*buffer;
unsignedintbytesread;
FMOD_RESULTresult;
void*userdata;
}FMOD_ASYNCREADINFO;
Thefirst4members(handle,offset,sizebytes,priority)arereadonlyvalues,whichtellyouaboutthefilehandleinquestion,whereinthefileitwantstoreadfrom(sonoseekcallbacksrequired!)andhowmanybytesitwants.Thepriorityvaluetellsyouhowimportantthereadisasdiscussedpreviously.
Thenext3members(buffer,bytesreadandresult)arevaluesyouwillfillin,andtoletFMODknowthatyouhavereadthedata.
Readyourfiledataintobuffer.sizebytesishowmuchyoushouldbereading.bytesreadishowmuchyouactuallyread(thiscouldbelessthansizebytes).Ifyouhitthe'endoffile'conditionandneedtoreturnlessbytesthanwererequested-setbytesreadtolessthansizebytes,andthensettheresulttoFMOD_ERR_FILE_EOF.
Settheresultlast!
Note!Donotsettheresultbeforesettingthebytesreadvalueandreadingthedataintobuffer.Theinitialvalueforresult,isgoingtobeFMOD_ERR_NOTREADY.WhenyousetthevaluetoFMOD_OK(orappropriateerrorcode)theninternallyFMODwillimmediatelyseethisasanindicationtocontinue,soifthebytesreadorbuffercontentsarenotready,youwillgetcorruption,errorsorunexpectedbehaviour.Sotosummarize,thelastthingyouwilldobeforefinishingyourqueueprocessistosetresult.Youwillnotsetitbeforesettingbytesreadorfillinginbuffer.
Threadingissues&readpriorities
Asmentionedearlierinthistutorial,FMODcancallthereadcallbackfromvariousdifferentthreads,soitiscommonsensetoprotectyourI/Osystemfromoperationshappeningsimultaneouslyfromdifferentthreads.
AsystemthatwoulduseFMOD'sasyncI/Ofeaturewouldmostlikelyberunninginitsownthread.ThisissotheblockingwaitloopsinFMOD'sloadingcallsarenotforeverwaitingfordatabecausetheusercan'tprovideittoFMOD.Ifthesystemrunsinanotherthread,itcandetectthequeueinsert,andprocessthedatawhileFMODiswaiting.
Itisactuallypossibletocompletethereadasifitwasn'tdeferred,anddoadirectfilereadintothebufferandsetsizebytes/resultvaluesfromtheFMODasyncreadcallback.ThisisapossiblewaytoreducedelaysforextremelyurgentFMODreads.Currentlythereare3differentcategoriesofreadpriority.0=lowpriority.Thesereadsareusuallyblockingstylereadsthatcomefroma
userloadcommand,andtherearenorealnegativesideeffectsofdelayingthereadexceptthattheloadfunctiontakeslonger.ThesereadsaregoingtobeissuedfromaSystem::createSoundcall,oraEventSystem::loadcallforexample.50=mediumpriority.Thesereadsareimportant,andusuallycomefromthe
FMODstreamsystem.Theycanbedelayed,butnotfortoolong.Ifthedelayistoolong,thenaudiostreamswillstarve,andpossiblystutter.Ifyouneedtodelaythereadlonger,theFMODfilebuffersizecanbeincreasedwithSystem::setStreamBufferSize100=highpriority.CurrentlythehighestpriorityreadissuedbyFMODis
whenanaudiostreamloops.Itmustinternallyflushthestreambufferafteraseektoloopstart,anddosobeforethestream'decodebuffer'(thePCMdouble-bufferthatthestreamdecoderdecodesinto)loopsaroundandstartsstuttering(thisisadifferentbuffertothepreviouslymentionedstreambuffer.Thatonecontainscompressedfiledata.ThedecodebuffercontainsdecompressedPCMdata).Thedecodebufferisusuallysmallsoitisimportanttogetthereaddonefast,buttheusercanalsoincreasethesebufferswithFMOD_CREATESOUNDEXINFO::decodebuffersize.FMOD_ADVANCEDSETTINGS::defaultDecodeBufferSizecanalsobeusedto
setallfuturedecodebuffersizesforallstreamswithouthavingtosetiteverytime,andisgoingtobeusedfortheEventSystembecausedecodebuffersizeisnotsomethingyoucansetforeventsindividually.
FirelightTechnologiesFMODEx
SRSSurroundsoundHowtoenableSRS5.1SurroundSoundencodinginFMOD
Toenable5.1surroundthroughastereoanalogoutputfordecodingwithPrologicandSRScompatiblehardware,useSystem::setSpeakerModewithFMOD_SPEAKERMODE_SRS5_1_MATRIXastheparameter,beforeinit.
LicenseforSRS5.1SurroundSoundEncodertoCustomers
1.AboutSRS5.1SurroundSoundEncoder
TheSRS5.1SurroundSoundEncoderforFMODfeaturesSRS’advancedmatrixsurroundsoundprocessingengine.TheSRSsurroundengineisahighlyversatilemultichannelaudioencodesystemcapableofsupportingawiderangeofsurroundsoundcreationandplaybackapplications.WithSRS5.1SurroundSound,surroundsoundismadeavailablewithoutsacrificingthe2-channelreachandexperience.
2.OverviewofSRS5.1SurroundSound
SRS5.1SurroundSoundEncoderprovidesthecapabilitytoencodeupto6.1channelsofaudiofortransmissionorstorageovertwooutputchannelsorstandardtwo-channelcarriers.SRS5.1SurroundSoundEncodercanbelistenedtoinstereoordecodedTVs,PCs,receivers,mobilephonesandotherCEdeviceswithSRStechnologies.SRS5.1SurroundSoundisalsobackwardcompatiblewithallmatrixdecoders,suchasDolbyProLogic®andDolbyProLogicIl®,withplaybackperformancesubjecttothelimitationsofthespecificdecoder.
FormoreinformationonproducingcontentinSRS5.1SurroundSound,pleasevisittheSRSwebsiteat:http://surround.srslabs.com/
FortechnicalquestionsonproducingcontentinSRS5.1SurroundSound,[email protected]
3.RightstoUseoftheSRS5.1SurroundSoundEncoderandLogo
Pleasenotethat,tousetheSRS5.1SurroundSoundEncoderincludedbyFMOD,youarerequiredtoregisterwithSRSathttp://surround.srslabs.com/.ToregisterwithSRS,youwillberequiredtoprovideyourcompanyname,contactinformationandtitle(s)ofgamesdevelopedusingtheSRS5.1SurroundSound
Encoderifavailable.YourinformationwillenableSRStobettersupportyourtechnicalrequirementsasneededandifapplicable,refertoyourgametitle(s)inSRS’marketingmaterials.
Inthesameregistrationwebpage,youwillfindatrademarklicenseagreementforyourrighttousetheSRS5.1SurroundSoundLogo.YoumustacceptthetrademarklicenseagreementpriortousingtheSRS5.1SurroundSoundLogo
FirelightTechnologiesFMODEx
WINDOWSSPECIFICISSUES/FEATURESForWindows-specificinformation,pleasesee"GettingstartedwithFMODforWindows.pdf"inthedocumentationdirectory.
FirelightTechnologiesFMODEx
LINUXSPECIFICISSUES/FEATURESForLinux-specificinformation,pleasesee"GettingstartedwithFMODforLinux.pdf"inthedocumentationdirectory.
FirelightTechnologiesFMODEx
MACSPECIFICISSUES/FEATURESForMac-specificinformation,pleasesee"GettingstartedwithFMODforMac.pdf"inthedocumentationdirectory.
FirelightTechnologiesFMODEx
PLAYSTATION2SPECIFICISSUES/FEATURESForPlayStation2-specificinformation,pleasesee"GettingstartedwithFMODforPlayStation2.pdf"inthedocumentationdirectory.
FirelightTechnologiesFMODEx
PLAYSTATION3SPECIFICISSUES/FEATURESForPlayStation3-specificinformation,pleasesee"GettingstartedwithFMODforPlayStation3.pdf"inthedocumentationdirectory.
FirelightTechnologiesFMODEx
PLAYSTATIONPORTABLESPECIFICISSUES/FEATURESForPlayStationPortable-specificinformation,pleasesee"GettingstartedwithFMODforPlayStationPortable.pdf"inthedocumentationdirectory.
FirelightTechnologiesFMODEx
XBOX360SPECIFICISSUES/FEATURESForXbox360-specificinformation,pleasesee"GettingstartedwithFMODforXbox360.pdf"inthedocumentationdirectory.
FirelightTechnologiesFMODEx
WiiSPECIFICISSUES/FEATURESForWii-specificinformation,pleasesee"GettingstartedwithFMODforWii.pdf"inthedocumentationdirectory.
FirelightTechnologiesFMODEx
IPHONESPECIFICISSUES/FEATURESForiPhone/iPad-specificinformation,pleasesee"GettingstartedwithFMODforiPhone.pdf"inthedocumentationdirectory.
FirelightTechnologiesFMODEx
3DSSPECIFICISSUES/FEATURESFor3DSspecificinformation,pleasesee"GettingstartedwithFMODfor3DS.pdf"inthedocumentationdirectory.
FirelightTechnologiesFMODEx
APIReferenceFMODExAPIReferenceFMODDesignerAPIReferenceFMODDesignerNetworkAPIReference
FirelightTechnologiesFMODEx
C++ReferenceInterfacesFunctionsCallbacksStructuresDefinesEnumerations
FirelightTechnologiesFMODEx
InterfacesSystemSoundChannelChannelGroupSoundGroupDSPDSPConnectionGeometryReverb
FirelightTechnologiesFMODEx
SystemInterfaceSystem::addDSPSystem::attachFileSystemSystem::closeSystem::createChannelGroupSystem::createDSPSystem::createDSPByPluginSystem::createDSPByTypeSystem::createGeometrySystem::createReverbSystem::createSoundSystem::createSoundGroupSystem::createStreamSystem::get3DListenerAttributesSystem::get3DNumListenersSystem::get3DSettingsSystem::get3DSpeakerPositionSystem::getAdvancedSettingsSystem::getCDROMDriveNameSystem::getCPUUsageSystem::getChannelSystem::getChannelsPlayingSystem::getDSPBufferSizeSystem::getDSPClockSystem::getDSPHeadSystem::getDriverSystem::getDriverCapsSystem::getDriverInfoSystem::getDriverInfoWSystem::getGeometryOcclusionSystem::getGeometrySettingsSystem::getHardwareChannelsSystem::getMasterChannelGroupSystem::getMasterSoundGroupSystem::getMemoryInfoSystem::getNetworkProxy
System::getNetworkTimeoutSystem::getNumCDROMDrivesSystem::getNumDriversSystem::getNumPluginsSystem::getOutputSystem::getOutputByPluginSystem::getOutputHandleSystem::getPluginHandleSystem::getPluginInfoSystem::getRecordDriverCapsSystem::getRecordDriverInfoSystem::getRecordDriverInfoWSystem::getRecordNumDriversSystem::getRecordPositionSystem::getReverbAmbientPropertiesSystem::getReverbPropertiesSystem::getSoftwareChannelsSystem::getSoftwareFormatSystem::getSoundRAMSystem::getSpeakerModeSystem::getSpectrumSystem::getStreamBufferSizeSystem::getUserDataSystem::getVersionSystem::getWaveDataSystem::initSystem::isRecordingSystem::loadGeometrySystem::loadPluginSystem::lockDSPSystem::playDSPSystem::playSoundSystem::recordStartSystem::recordStopSystem::registerCodecSystem::registerDSPSystem::releaseSystem::set3DListenerAttributesSystem::set3DNumListeners
System::set3DRolloffCallbackSystem::set3DSettingsSystem::set3DSpeakerPositionSystem::setAdvancedSettingsSystem::setCallbackSystem::setDSPBufferSizeSystem::setDriverSystem::setFileSystemSystem::setGeometrySettingsSystem::setHardwareChannelsSystem::setNetworkProxySystem::setNetworkTimeoutSystem::setOutputSystem::setOutputByPluginSystem::setPluginPathSystem::setReverbAmbientPropertiesSystem::setReverbPropertiesSystem::setSoftwareChannelsSystem::setSoftwareFormatSystem::setSpeakerModeSystem::setStreamBufferSizeSystem::setUserDataSystem::unloadPluginSystem::unlockDSPSystem::update
FirelightTechnologiesFMODEx
System::addDSPThisfunctionaddsapre-createdDSPunitoreffecttotheheadoftheSystemDSPchain.
C++Syntax
FMOD_RESULTSystem::addDSP(
FMOD::DSP*dsp,
FMOD::DSPConnection**connection
);
CSyntax
FMOD_RESULTFMOD_System_AddDSP(
FMOD_SYSTEM*system,
FMOD_DSP*dsp,
FMOD_DSPCONNECTION**connection
);
Parameters
dsp
Apointertoapre-createdDSPunittobeinsertedattheheadoftheSystemDSPchain.
connection
ApointertotheconnectioninvolvedbetweentheSystemDSPheadandthespecifieddspunit.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctionisawrapperfunctiontoinsertaDSPunitatthetopoftheSystemDSPchain.Itdisconnectstheheadunitfromitsinput,theninsertstheunitattheheadandreconnectsthepreviouslydisconnectedinputbackasasaninputtothenewunit.
Note:Theconnectionpointerretrievedherewillbecomeinvalidifyoudisconnectthe2dspunitsthatuseit.
SeeAlso
System::getDSPHeadSystem::createDSPSystem::createDSPByTypeSystem::createDSPByPluginChannel::addDSPChannelGroup::addDSPDSP::remove
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::attachFileSystemFunctiontoallowauserto'piggyback'onFMOD'sfilereadingroutines.ThisallowsuserstocapturedataasFMODreadsit,whichmaybeusefulforrippingtherawdatathatFMODreadsforhardtosupportsources(forexampleinternetstreamsorcddastreams).
C++Syntax
FMOD_RESULTSystem::attachFileSystem(
FMOD_FILE_OPENCALLBACKuseropen,
FMOD_FILE_CLOSECALLBACKuserclose,
FMOD_FILE_READCALLBACKuserread,
FMOD_FILE_SEEKCALLBACKuserseek
);
CSyntax
FMOD_RESULTFMOD_System_AttachFileSystem(
FMOD_SYSTEM*system,
FMOD_FILE_OPENCALLBACKuseropen,
FMOD_FILE_CLOSECALLBACKuserclose,
FMOD_FILE_READCALLBACKuserread,
FMOD_FILE_SEEKCALLBACKuserseek
);
Parameters
useropen
PointertoanopencallbackwhichiscalledafterafileisopenedbyFMOD.
userclose
PointertoaclosecallbackwhichiscalledafterafileisclosedbyFMOD.
userread
PointertoareadcallbackwhichiscalledafterafileisreadbyFMOD.
userseek
PointertoaseekcallbackwhichiscalledafterafileisseekedintobyFMOD.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
NOTE!Donotusethisto'override'FMOD'sfilesystem!ThatiswhatsetFileSystemisfor.Thisfunctionispurelyfor'snooping'andlettingFMODdoitsownfileaccess,butifyouwanttocapturewhatFMODisreadingyoucandoitwiththisfunction.
SeeAlso
System::setFileSystemFMOD_FILE_OPENCALLBACKFMOD_FILE_CLOSECALLBACKFMOD_FILE_READCALLBACKFMOD_FILE_SEEKCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::closeClosesthesystemobjectwithoutfreeingtheobject'smemory,sothesystemhandlewillstillbevalid.Closingtheoutputrendersobjectscreatedwiththissystemobjectinvalid.Makesureanysounds,channelgroups,geometryanddspobjectsarereleasedbeforeclosingthesystemobject.
C++Syntax
FMOD_RESULTSystem::close();
CSyntax
FMOD_RESULTFMOD_System_Close(FMOD_SYSTEM*system);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::initSystem::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::createChannelGroupCreatesachannelgroupobject.Theseobjectscanbeusedtoassignchannelstoforgroupchannelsettings,suchasvolume.Channelgroupsarealsousedforsub-mixing.Anychannelsthatareassignedtoachannelgroupgetsubmixedintothatchannelgroup'sDSP.
C++Syntax
FMOD_RESULTSystem::createChannelGroup(
constchar*name,
FMOD::ChannelGroup**channelgroup
);
CSyntax
FMOD_RESULTFMOD_System_CreateChannelGroup(
FMOD_SYSTEM*system,
constchar*name,
FMOD_CHANNELGROUP**channelgroup
);
Parameters
name
Labeltogivetothechannelgroupforidentificationpurposes.Optional(canbenull).
channelgroup
AddressofavariabletoreceiveanewlycreatedFMOD::ChannelGroupobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Seethechannelgroupclassdefinitionforthetypesofoperationsthatcanbeperformedon'groups'ofchannels.Thechannelgroupcanforexamplebeusedtohave2seperategroupsofmastervolume,insteadofoneglobalmastervolume.Achannelgroupcanbeusedforsub-mixing,iesothatasetofchannelscanbemixedintoachannelgroup,thencanhaveeffectsappliedtoitwithoutaffectingotherchannels.
SeeAlso
System::getMasterChannelGroupChannel::setChannelGroupChannelGroup::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::createDSPCreatesauserdefinedDSPunitobjecttobeinsertedintoaDSPnetwork,forthepurposesofsoundfilteringorsoundgeneration.
C++Syntax
FMOD_RESULTSystem::createDSP(
FMOD_DSP_DESCRIPTION*description,
FMOD::DSP**dsp
);
CSyntax
FMOD_RESULTFMOD_System_CreateDSP(
FMOD_SYSTEM*system,
FMOD_DSP_DESCRIPTION*description,
FMOD_DSP**dsp
);
Parameters
description
AddressofanFMOD_DSP_DESCRIPTIONstructurecontaininginformationabouttheunittobecreated.
dsp
AddressofavariabletoreceiveanewlycreatedFMOD::DSPobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ADSPunitcangenerateorfilterincomingdata.Thedataiscreatedorfilteredthroughuseofthereadcallbackthatisdefinedbytheuser.SeethedefinitionfortheFMOD_DSP_DESCRIPTIONstructuretofindoutwhateachmembermeans.Tobeactive,aunitmustbeinsertedintotheFMODDSPnetworktobeheard.UsefunctionssuchasSystem::addDSP,Channel::addDSPorDSP::addInputtodothis.Formoreinformationandadetaileddescription(withdiagrams)seethetutorialontheDSPsysteminthedocumentation.
SeeAlso
FMOD_DSP_DESCRIPTIONSystem::createDSPByTypeSystem::createDSPByPluginSystem::addDSPChannel::addDSPDSP::addInputDSP::setActive
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::createDSPByPluginCreatesaDSPunitobjectwhichiseitherbuiltinorloadedasaplugin,tobeinsertedintoaDSPnetwork,forthepurposesofsoundfilteringorsoundgeneration.ThisfunctioncreatesaDSPunitthatcanbeenumeratedbyusingSystem::getNumPluginsandSystem::getPluginInfo.
C++Syntax
FMOD_RESULTSystem::createDSPByPlugin(
unsignedinthandle,
FMOD::DSP**dsp
);
CSyntax
FMOD_RESULTFMOD_System_CreateDSPByPlugin(
FMOD_SYSTEM*system,
unsignedinthandle,
FMOD_DSP**dsp
);
Parameters
handle
Handletoapre-existingDSPplugin.
dsp
AddressofavariabletoreceiveanewlycreatedFMOD::DSPobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ADSPunitcangenerateorfilterincomingdata.Tobeactive,aunitmustbeinsertedintotheFMODDSPnetworktobeheard.UsefunctionssuchasSystem::addDSP,Channel::addDSPorDSP::addInputtodothis.Formoreinformationandadetaileddescription(withdiagrams)seethetutorialontheDSPsysteminthedocumentation.
SeeAlso
System::getNumPluginsSystem::getPluginInfoSystem::createDSPByTypeSystem::createDSPSystem::addDSPChannel::addDSPDSP::addInputDSP::setActive
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::createDSPByTypeCreatesanFMODdefinedbuiltinDSPunitobjecttobeinsertedintoaDSPnetwork,forthepurposesofsoundfilteringorsoundgeneration.ThisfunctionisusedtocreatespecialeffectsthatcomebuiltintoFMOD.
C++Syntax
FMOD_RESULTSystem::createDSPByType(
FMOD_DSP_TYPEtype,
FMOD::DSP**dsp
);
CSyntax
FMOD_RESULTFMOD_System_CreateDSPByType(
FMOD_SYSTEM*system,
FMOD_DSP_TYPEtype,
FMOD_DSP**dsp
);
Parameters
type
Apre-definedDSPeffectorsoundgeneratordescribedbyaFMOD_DSP_TYPE.
dsp
AddressofavariabletoreceiveanewlycreatedFMOD::DSPobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ADSPunitcangenerateorfilterincomingdata.Tobeactive,aunitmustbeinsertedintotheFMODDSPnetworktobeheard.UsefunctionssuchasSystem::addDSP,Channel::addDSP,ChannelGroup::addDSPorDSP::addInputtodothis.Formoreinformationandadetaileddescription(withdiagrams)seethetutorialontheDSPsysteminthedocumentation.
Note!WinampDSPandVSTpluginswillonlyreturnthefirstpluginofthistypethatwasloaded!ToaccessallVSTorWinampDSPpluginstheSystem::createDSPByPluginfunction!UsetheindexreturnedbySystem::loadPluginifyoudon'twanttoenumeratethemall.
SeeAlso
FMOD_DSP_TYPESystem::createDSPSystem::createDSPByPluginSystem::addDSPSystem::loadPluginChannel::addDSPChannelGroup::addDSPDSP::addInputDSP::setActive
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::createGeometryGeometrycreationfunction.Thisfunctionwillcreateabasegeometryobjectwhichcanthenhavepolygonsaddedtoit.
C++Syntax
FMOD_RESULTSystem::createGeometry(
intmaxpolygons,
intmaxvertices,
FMOD::Geometry**geometry
);
CSyntax
FMOD_RESULTFMOD_System_CreateGeometry(
FMOD_SYSTEM*system,
intmaxpolygons,
intmaxvertices,
FMOD_GEOMETRY**geometry
);
Parameters
maxpolygons
Maximumnumberofpolygonswithinthisobject.
maxvertices
Maximumnumberofverticeswithinthisobject.
geometry
AddressofavariabletoreceiveanewlycreatedFMOD::Geometryobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
PolygonscanbeaddedtoageometryobjectusingGeometry::AddPolygon.
Ageometryobjectstoresitslistofpolygonsinastructureoptimizedforquicklineintersectiontestingandefficientinsertionandupdating.Thestructureworksbestwithregularlyshapedpolygonswithminimaloverlap.Manyoverlappingpolygons,orclustersoflongthinpolygonsmaynotbehandledefficiently.Axisalignedpolygonsarehandledmostefficiently.
Thesametypeofstructureisusedtooptimizelineintersectiontestingwithmultiplegeometryobjects.
ItisimportanttosetthevalueofmaxworldsizetoanappropriatevalueusingSystem::setGeometrySettings.Objectsorpolygonsoutsidetherangeofmaxworldsizewillnotbehandledefficiently.Conversely,ifmaxworldsizeisexcessivelylarge,thestructuremayloseprecisionandefficiencymaydrop.
SeeAlso
System::setGeometrySettingsSystem::loadGeometryGeometry::AddPolygon
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::createReverbCreatesa'virtualreverb'object.Thisobjectreactsto3dlocationandmorphsthereverbenvironmentbasedonhowcloseitistothereverbobject'scenter.Multiplereverbobjectscanbecreatedtoachieveamulti-reverbenvironment.
C++Syntax
FMOD_RESULTSystem::createReverb(
FMOD::Reverb**reverb
);
CSyntax
FMOD_RESULTFMOD_System_CreateReverb(
FMOD_SYSTEM*system,
FMOD_REVERB**reverb
);
Parameters
reverb
AddressofapointertoaReverbobjecttoreceivethenewlycreatedvirtualreverbobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
The3Dreverbobjectisaspherehaving3Dattributes(position,minimum
distance,maximumdistance)andreverbproperties.Thepropertiesand3Dattributesofallreverbobjectscollectivelydetermine,alongwiththelistener'sposition,thesettingsofandinputgainsintoasingle3DreverbDSP.Pleasenotethatthisonlyappliestosoftwarechannels.Whenthelisteneriswithinthesphereofeffectofoneormore3dreverbs,thelistener's3Dreverbpropertiesareaweightedcombinationofsuch3dreverbs.Whenthelistenerisoutsideallofthereverbs,the3Dreverbsettingissettothedefaultambientreverbsetting.
UseSystem::setReverbAmbientPropertiestoseta'background'defaultreverbenvironment.Thisisareverbthatwillbemorphedtoifthelistenerisnotwithinanyvirtualreverbzones.Bydefaulttheambientreverbissetto'off'.Creatingmultiplereverbobjectsdoesnotimpactperformance.Theseare'virtualreverbs'.Therewillstillbeonly1physicalreverbDSPrunningthatjustmorphsbetweenthedifferentvirtualreverbs.System::setReverbPropertiescanstillbeusedinconjunctionwiththe3dbasedvirtualreverbsystem.Thisallows2dsoundstohavereverb.Ifthiscallisusedatthesametimevirtualreverbobjectsareactive,2physicalreverbdspswillbeused,incurringasmallmemoryandcpuhit.NoteaboutphsyicalSFXReverbDSPunitallocation.ToremovetheDSPunitandtheassociatedCPUcost,makesureall3d3dreverbobjectsarereleased,andtheambientreverbbackgroundpropertyissettoOFF(environment=-1).Ifeithera3dreverbzoneisstillpresentortheambientsettingisnotoff,theSFXReverbDSPunitwillremainactive.Simplycreating1reverbobject,orsettingtheambientstatetosomethingotherthanOFF,anSFXReverbDSPunitwillbecreatedaninsertedbackintotheDSPnetwork.Theusermaywishtoavoidasuddencutoutofreverbbyleavingtheambientsettingactiveforawhile.Makesuretoreleaseallobjectsandsettheambientreverbsettingtoofftogetapropercleanup.
SeeAlso
Reverb::releaseSystem::setReverbAmbientProperties
System::getReverbAmbientPropertiesSystem::setReverbPropertiesSystem::getReverbProperties
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::createSoundLoadsasoundintomemory,oropensitforstreaming.
C++Syntax
FMOD_RESULTSystem::createSound(
constchar*name_or_data,
FMOD_MODEmode,
FMOD_CREATESOUNDEXINFO*exinfo,
FMOD::Sound**sound
);
CSyntax
FMOD_RESULTFMOD_System_CreateSound(
FMOD_SYSTEM*system,
constchar*name_or_data,
FMOD_MODEmode,
FMOD_CREATESOUNDEXINFO*exinfo,
FMOD_SOUND**sound
);
Parameters
name_or_data
NameofthefileorURLtoopen,orapointertoapreloadedsoundmemoryblockifFMOD_OPENMEMORY/FMOD_OPENMEMORY_POINTisused.ForCDplaybackthenameshouldbeadriveletterwithacolon,example"D:"(windowsonly).
mode
Behaviourmodifierforopeningthesound.SeeFMOD_MODE.Alsoseeremarksformore.
exinfo
PointertoaFMOD_CREATESOUNDEXINFOwhichletstheuserprovide
extendedinformationwhileplayingthesound.Optional.Specify0orNULLtoignore.
sound
AddressofavariabletoreceiveanewlycreatedFMOD::Soundobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Important!Bydefault(FMOD_CREATESAMPLE)FMODwilltrytoloadanddecompressthewholesoundintomemory!UseFMOD_CREATESTREAMtoopenitasastreamandhaveitplaybackinrealtime!FMOD_CREATECOMPRESSEDSAMPLEcanalsobeusedforcertainformats.
ToopenafileorURLasastream,sothatitdecompresses/readsatruntime,insteadofloading/decompressingintomemoryallatthetimeofthiscall,usetheFMOD_CREATESTREAMflag.Thisislikea'stream'inFMOD3.ToopenafileorURLasacompressedsoundeffectthatisnotstreamedandis
notdecompressedintomemoryatloadtime,useFMOD_CREATECOMPRESSEDSAMPLE.ThisissupportedwithMPEG(mp2/mp3),ADPCM(wavonallplatformsandvagonPSP)andXMAfilesonly.Thisisusefulforthosewhowantrealtimecompressedsoundeffects,butnottheoverheadofdiskaccess.ToopenaCDdrive,usethedriveasthename,forexampleonthewindows
platform,use"D:"Toopenasoundas2D,sothatitisnotaffectedby3Dprocessing,usethe
FMOD_2Dflag.3Dsoundcommandswillbeignoredonthesetypesofsounds.Toopenasoundas3D,sothatitistreatedasa3Dsound,usetheFMOD_3D
flag.CallstoChannel::setPanwillbeignoredonthesetypesofsounds.
TouseFMODsoftwaremixingbuffers,usetheFMOD_SOFTWAREflag.Thisgivescertainbenefits,suchasDSPprocessing,spectrumanalysis,looppoints,5.1mixlevels,2d/3dmorphing,andmore.Tousethesoundcard'shardwaretoplaythesound,usethe
FMOD_HARDWAREflag.
NotethatFMOD_OPENRAW,FMOD_OPENMEMORY,FMOD_OPENMEMORY_POINTandFMOD_OPENUSERwillnotworkherewithouttheexinfostructurepresent,asmoreinformationisneeded.
UseFMOD_NONBLOCKINGtohavethesoundopenorloadinthebackground.YoucanuseSound::getOpenStatetodetermineifithasfinishedloading/openingornot.Whileitisloading(notready),soundfunctionsarenotaccessableforthatsound.
Toaccountforslowdevicesorcomputersthatmightcausebufferunderrun(skipping/stuttering/repeatingblocksofaudio),useSystem::setStreamBufferSize.ToplayWMAfilesonWindows,theusermusthavethelatestWindowsmediaplayercodecsinstalled(WindowsMediaPlayer9).Theusercandownloadthisasaninstaller(wmfdist.exe)fromwww.fmod.orgdownloadpageiftheydesireoryoumaywishtoredistributeitwithyourapplication(thisisallowed).ThisinstallerdoesNOTinstallwindowsmediaplayer,justthenecessaryWMAcodecsneeded.PlayStation2Note:Youcanpre-pend"host0:"or"cdrom0:"ifyoulike.FMODwillautomaticallyadd"host0:"tothefilenameifitisnotfound.SpecifyingFMOD_OPENMEMORY_POINTwillPOINTtoyourmemoryratherallocatingitsownsoundbuffersandduplicatingitinternallyThismeansyoucannotfreethememorywhileFMODisusingit,untilafterSound::releaseiscalled.WithFMOD_OPENMEMORY_POINT,forPCMformats,onlyWAV,FSBandRAWaresupported.Forcompressedformats,onlythoseformatssupportedbyFMOD_CREATECOMPRESSEDSAMPLEaresupported.
SeeAlso
FMOD_MODE
FMOD_CREATESOUNDEXINFOSound::getOpenStateSystem::setStreamBufferSizeChannel::setPan
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::createSoundGroupCreatesasoundgroup,whichcanstorehandlestomultipleSoundpointers.
C++Syntax
FMOD_RESULTSystem::createSoundGroup(
constchar*name,
FMOD::SoundGroup**soundgroup
);
CSyntax
FMOD_RESULTFMOD_System_CreateSoundGroup(
FMOD_SYSTEM*system,
constchar*name,
FMOD_SOUNDGROUP**soundgroup
);
Parameters
name
Nameofsoundgroup.
soundgroup
Addressofavariabletorecieveapointertoasoundgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
OnceaSoundGroupiscreated,Sound::setSoundGroupisusedtoputasoundinaSoundGroup.
SeeAlso
SoundGroup::releaseSound::setSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::createStreamOpensasoundforstreaming.ThisfunctionisahelperfunctionthatisthesameasSystem::createSoundbuthastheFMOD_CREATESTREAMflagaddedinternally.
C++Syntax
FMOD_RESULTSystem::createStream(
constchar*name_or_data,
FMOD_MODEmode,
FMOD_CREATESOUNDEXINFO*exinfo,
FMOD::Sound**sound
);
CSyntax
FMOD_RESULTFMOD_System_CreateStream(
FMOD_SYSTEM*system,
constchar*name_or_data,
FMOD_MODEmode,
FMOD_CREATESOUNDEXINFO*exinfo,
FMOD_SOUND**sound
);
Parameters
name_or_data
NameofthefileorURLtoopen.ForCDplaybackthismaybeadriveletterwithacolon,example"D:".
mode
Behaviourmodifierforopeningthesound.SeeFMOD_MODE.Alsoseeremarksformore.
exinfo
PointertoaFMOD_CREATESOUNDEXINFOwhichletstheuserprovide
extendedinformationwhileplayingthesound.Optional.Specify0orNULLtoignore.
sound
AddressofavariabletoreceiveanewlycreatedFMOD::Soundobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Notethatastreamonlyhas1decodebufferandfilehandle,andthereforecanonlybeplayedonce.Itcannotplaymultipletimesatoncebecauseitcannotshareastreambufferifthestreamisplayingatdifferentpositions.Openmultiplestreamstohavethemplayconcurrently.
ToopenafileorURLasastream,sothatitdecompresses/readsatruntime,insteadofloading/decompressingintomemoryallatthetimeofthiscall,usetheFMOD_CREATESTREAMflag.Thisislikea'stream'inFMOD3.ToopenafileorURLasacompressedsoundeffectthatisnotstreamedandis
notdecompressedintomemoryatloadtime,useFMOD_CREATECOMPRESSEDSAMPLE.ThisissupportedwithMPEG(mp2/mp3),ADPCM(wavonallplatformsandVAGonPSP)andXMAfilesonly.Thisisusefulforthosewhowantrealtimecompressedsoundeffects,butnottheoverheadofdiskaccess.ToopenaCDdrive,usethedriveasthename,forexampleonthewindows
platform,use"D:"Toopenasoundas2D,sothatitisnotaffectedby3Dprocessing,usethe
FMOD_2Dflag.3Dsoundcommandswillbeignoredonthesetypesofsounds.Toopenasoundas3D,sothatitistreatedasa3Dsound,usetheFMOD_3D
flag.CallstoChannel::setPanwillbeignoredonthesetypesofsounds.
TouseFMODsoftwaremixingbuffers,usetheFMOD_SOFTWAREflag.Thisgivescertainbenefits,suchasDSPprocessing,spectrumanalysis,looppoints,5.1mixlevels,2d/3dmorphing,andmore.Tousethesoundcard'shardwaretoplaythesound,usethe
FMOD_HARDWAREflag.
NotethatFMOD_OPENRAW,FMOD_OPENMEMORY,FMOD_OPENMEMORY_POINTandFMOD_OPENUSERwillnotworkherewithouttheexinfostructurepresent,asmoreinformationisneeded.
UseFMOD_NONBLOCKINGtohavethesoundopenorloadinthebackground.YoucanuseSound::getOpenStatetodetermineifithasfinishedloading/openingornot.Whileitisloading(notready),soundfunctionsarenotaccessableforthatsound.
Toaccountforslowdevicesorcomputersthatmightcausebufferunderrun(skipping/stuttering/repeatingblocksofaudio),useSystem::setStreamBufferSize.NotethatFMOD_CREATESAMPLEwillbeignored,overridenbythisfunctionbecausethisissimplyawrappertoSystem::createSoundthatprovidestheFMOD_CREATESTREAMflag.TheFMOD_CREATESTREAMflagoverridesFMOD_CREATESAMPLE.
SeeAlso
FMOD_MODEFMOD_CREATESOUNDEXINFOSound::getOpenStateSystem::setStreamBufferSizeSystem::createSoundChannel::setPan
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::get3DListenerAttributesThisretrievestheposition,velocityandorientationofthespecified3Dsoundlistener.
C++Syntax
FMOD_RESULTSystem::get3DListenerAttributes(
intlistener,
FMOD_VECTOR*pos,
FMOD_VECTOR*vel,
FMOD_VECTOR*forward,
FMOD_VECTOR*up
);
CSyntax
FMOD_RESULTFMOD_System_Get3DListenerAttributes(
FMOD_SYSTEM*system,
intlistener,
FMOD_VECTOR*pos,
FMOD_VECTOR*vel,
FMOD_VECTOR*forward,
FMOD_VECTOR*up
);
Parameters
listener
ListenerIDinamulti-listenerenvironment.Specify0ifthereisonly1listener.
pos
Addressofavariablethatreceivesthepositionofthelistenerinworldspace,measuredindistanceunits.Optional.Specify0orNULLtoignore.
vel
Addressofavariablethatreceivesthevelocityofthelistenermeasuredindistanceunitspersecond.Optional.Specify0orNULLtoignore.
forward
Addressofavariablethatreceivestheforwardsorientationofthelistener.Optional.Specify0orNULLtoignore.
up
Addressofavariablethatreceivestheupwardsorientationofthelistener.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::set3DListenerAttributesFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::get3DNumListenersRetrievesthenumberof3Dlisteners.
C++Syntax
FMOD_RESULTSystem::get3DNumListeners(
int*numlisteners
);
CSyntax
FMOD_RESULTFMOD_System_Get3DNumListeners(
FMOD_SYSTEM*system,
int*numlisteners
);
Parameters
numlisteners
Addressofavariablethatreceivesthecurrentnumberof3Dlistenersinthe3Dscene.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::set3DNumListeners
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::get3DSettingsRetrievestheglobaldopplerscale,distancefactorandrolloffscaleforall3DsoundinFMOD.
C++Syntax
FMOD_RESULTSystem::get3DSettings(
float*dopplerscale,
float*distancefactor,
float*rolloffscale
);
CSyntax
FMOD_RESULTFMOD_System_Get3DSettings(
FMOD_SYSTEM*system,
float*dopplerscale,
float*distancefactor,
float*rolloffscale
);
Parameters
dopplerscale
Addressofavariablethatreceivesthescalingfactorfordopplershift.Optional.Specify0orNULLtoignore.
distancefactor
AddressofavariablethatreceivestherelativedistancefactortoFMOD'sunits.Optional.Specify0orNULLtoignore.
rolloffscale
Addressofavariablethatreceivesthescalingfactorfor3Dsoundrollofforattenuation.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::set3DSettings
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::get3DSpeakerPositionRetrievesthecurrentspeakerpositioninformationfortheselectedspeaker.
C++Syntax
FMOD_RESULTSystem::get3DSpeakerPosition(
FMOD_SPEAKERspeaker,
float*x,
float*y,
bool*active
);
CSyntax
FMOD_RESULTFMOD_System_Get3DSpeakerPosition(
FMOD_SYSTEM*system,
FMOD_SPEAKERspeaker,
float*x,
float*y,
FMOD_BOOL*active
);
Parameters
speaker
Theselectedspeakerofinteresttoreturnthexandyposition.
x
Addressofavariablethatreceivesthe2DXpositionrelativetothelistener.Optional.Specify0orNULLtoignore.
y
Addressofavariablethatreceivesthe2DYpositionrelativetothelistener.Optional.Specify0orNULLtoignore.
active
Addressofavariablethatreceivestheactivestateofaspeaker.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeetheSystem::set3DSpeakerPositionformoreinformationonspeakerpositioning.
SeeAlso
System::set3DSpeakerPositionFMOD_SPEAKERMODEFMOD_SPEAKER
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getAdvancedSettingsRetrievestheadvancedsettingsvaluesetforthesystemobject.
C++Syntax
FMOD_RESULTSystem::getAdvancedSettings(
FMOD_ADVANCEDSETTINGS*settings
);
CSyntax
FMOD_RESULTFMOD_System_GetAdvancedSettings(
FMOD_SYSTEM*system,
FMOD_ADVANCEDSETTINGS*settings
);
Parameters
settings
AddressofavariabletoreceivethecontentsoftheFMOD_ADVANCEDSETTINGSstructurespecifiedbytheuser.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_ADVANCEDSETTINGSSystem::setAdvancedSettings
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getCDROMDriveNameGetsinformationontheselectedcdromdrive.
C++Syntax
FMOD_RESULTSystem::getCDROMDriveName(
intdrive,
char*drivename,
intdrivenamelen,
char*scsiname,
intscsinamelen,
char*devicename,
intdevicenamelen
);
CSyntax
FMOD_RESULTFMOD_System_GetCDROMDriveName(
FMOD_SYSTEM*system,
intdrive,
char*drivename,
intdrivenamelen,
char*scsiname,
intscsinamelen,
char*devicename,
intdevicenamelen
);
Parameters
drive
TheenumeratednumberoftheCDROMdrivetoquery.0based.
drivename
Addressofavariablethatreceivesthenameofthedriveletterornamedependingontheoperatingsystem.
drivenamelen
Lengthinbytesofthetargetbuffertoreceievethestring.
scsiname
AddressofavariablethatreceivestheSCSIaddressofthedrive.ThiscouldalsobeusedtopasstoSystem::createSound,orjustusedforinformationpurposes.
scsinamelen
Lengthinbytesofthetargetbuffertoreceievethestring.
devicename
Addressofavariablethatreceivesthenameofthephysicaldevice.Thisisusuallyastringdefinedbythemanufacturer.Italsocontainsthedrive'svendorID,productIDandversionnumber.
devicenamelen
Lengthinbytesofthetargetbuffertoreceievethestring.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
EnumerateCDROMdrivesbyfindingouthowmanytherearewithSystem::getNumCDROMDrives.
SeeAlso
System::getNumCDROMDrives
System::createSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getCPUUsageRetrievesinpercentofCPUtime-theamountofcpuusagethatFMODistakingforstreaming/mixingandSystem::updatecombined.
C++Syntax
FMOD_RESULTSystem::getCPUUsage(
float*dsp,
float*stream,
float*geometry,
float*update,
float*total
);
CSyntax
FMOD_RESULTFMOD_System_GetCPUUsage(
FMOD_SYSTEM*system,
float*dsp,
float*stream,
float*geometry,
float*update,
float*total
);
Parameters
dsp
Addressofavariablethatreceivesthecurrentdspmixingenginecpuusage.Resultwillbefrom0to100.0f.Optional.Specify0orNULLtoignore.
stream
Addressofavariablethatreceivesthecurrentstreamingenginecpuusage.Resultwillbefrom0to100.0f.Optional.Specify0orNULLtoignore.
geometry
Addressofavariablethatreceivesthecurrentgeometryenginecpuusage.
Resultwillbefrom0to100.0f.Optional.Specify0orNULLtoignore.
update
AddressofavariablethatreceivesthecurrentSystem::updatecpuusage.Resultwillbefrom0to100.0f.Optional.Specify0orNULLtoignore.
total
Addressofavariablethatreceivesthecurrenttotalcpuusage.Resultwillbefrom0to100.0f.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisvalueisslightlysmoothedtoprovidemorestablereadout(andtoroundoffspikesthatoccurduetomultitasking/operatingsystemissues).
NOTE!Onps3andxbox360,thedspandstreamfiguresareNOTmaincpu/mainthreadusage.OnPS3thisisthepercentageofSPUbeingused.OnXbox360itisthepercentageofahardwarethreadbeingusedwhichisonatotallydifferentCPUthanthemainone.Donotbealarmediftheusagefortheseplatformsreachesover50%,thisisnormalandshouldbeignoredifyouareplayingalotofcompressedsoundsandareusingeffects.Theonlyvalueonthemaincpu/mainthreadtotakenoteofherethatwillimpactyourframerateistheupdatevalue,andthisistypicallyverylow(ielessthan1%).
SeeAlso
System::update
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getChannelRetrievesahandletoachannelbyID.
C++Syntax
FMOD_RESULTSystem::getChannel(
intchannelid,
FMOD::Channel**channel
);
CSyntax
FMOD_RESULTFMOD_System_GetChannel(
FMOD_SYSTEM*system,
intchannelid,
FMOD_CHANNEL**channel
);
Parameters
channelid
IndexintheFMODchannelpool.Specifyachannelnumberfrom0tothe'maxchannels'valuespecifiedinSystem::initminus1.
channel
Addressofavariablethatreceivesapointertotherequestedchannel.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionismainlyforgettinghandlestoexisting(playing)channelsandsettingtheirattributes.
SeeAlso
System::playSoundSystem::init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getChannelsPlayingRetrievesthenumberofcurrentlyplayingchannels.
C++Syntax
FMOD_RESULTSystem::getChannelsPlaying(
int*channels
);
CSyntax
FMOD_RESULTFMOD_System_GetChannelsPlaying(
FMOD_SYSTEM*system,
int*channels
);
Parameters
channels
Addressofavariablethatreceivesthenumberofcurrentlyplayingchannels.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getDSPBufferSizeRetrievesthebuffersizesettingsfortheFMODsoftwaremixingengine.
C++Syntax
FMOD_RESULTSystem::getDSPBufferSize(
unsignedint*bufferlength,
int*numbuffers
);
CSyntax
FMOD_RESULTFMOD_System_GetDSPBufferSize(
FMOD_SYSTEM*system,
unsignedint*bufferlength,
int*numbuffers
);
Parameters
bufferlength
Addressofavariablethatreceivesthemixerengineblocksizeinsamples.Default=1024.(milliseconds=1024at48khz=1024/48000*1000=10.66ms).Thismeansthemixerupdatesevery21.3ms.Optional.Specify0orNULLtoignore.
numbuffers
Addressofavariablethatreceivesthemixerenginenumberofbuffersused.Default=4.Togetthetotalbuffersizemultiplythebufferlengthbythenumbuffersvalue.Bydefaultthiswouldbe4*1024.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.
IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeedocumentationonSystem::setDSPBufferSizeformoreinformationaboutthesevalues.
SeeAlso
System::setDSPBufferSize
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getDSPClockReturnthecurrent64bitDSPclockvaluewhichcountsupbythenumberofsamplespersecondinthesoftwaremixer,everysecond.Ieifthedefaultsamplerateis48khz,theDSPclockincrementsby48000persecond.
C++Syntax
FMOD_RESULTSystem::getDSPClock(
unsignedint*hi,
unsignedint*lo
);
CSyntax
FMOD_RESULTFMOD_System_GetDSPClock(
FMOD_SYSTEM*system,
unsignedint*hi,
unsignedint*lo
);
Parameters
hi
Themostsignificant32bitsofthe64bitDSPclockvalue.
lo
Theleastsignificant32bitsofthe64bitDSPclockvalue.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UseresultwithChannel::setDelaytoplayasoundonanexacttickinthefuture.UseChannel::getDelayafterplayingasoundtoworkoutwhatDSPclockvalueasoundstartedon.
UseFMOD_64BIT_ADDorFMOD_64BIT_SUBhelpermacrosfromfmod.htoaddahi/locombinationtogetherandcopewithwraparound.
SeeAlso
Channel::setDelayChannel::getDelay
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getDSPHeadReturnsapointertotheheadDSPunitoftheDSPnetwork.Thisunitistheclosestunittothesoundcardandallsounddatacomesthroughthisunit.
C++Syntax
FMOD_RESULTSystem::getDSPHead(
FMOD::DSP**dsp
);
CSyntax
FMOD_RESULTFMOD_System_GetDSPHead(
FMOD_SYSTEM*system,
FMOD_DSP**dsp
);
Parameters
dsp
AddressofavariablethatreceivesthepointertotheheadDSPunit.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UsethisunitifyouwishtoconnectcustomDSPunitstotheoutputorfiltertheglobalmixbyinsertingfilterunitsbetweenthisoneandtheincomingchannelmixerunit.
ReadthetutorialonDSPifyouwishtoknowmoreaboutthis.ItisnotrecommendedusingthisifyoudonotunderstandhowtheFMODExDSPnetworkisconnected.
SeeAlso
Channel::getDSPHeadChannelGroup::getDSPHead
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getDriverReturnsthecurrentlyselecteddrivernumber.DriversareenumeratedwhenselectingadriverwithSystem::setDriverorotherdriverrelatedfunctionssuchasSystem::getNumDriversorSystem::getDriverInfo
C++Syntax
FMOD_RESULTSystem::getDriver(
int*driver
);
CSyntax
FMOD_RESULTFMOD_System_GetDriver(
FMOD_SYSTEM*system,
int*driver
);
Parameters
driver
AddressofavariablethatreceivesthecurrentlyselecteddriverID.0=primaryormainsounddeviceasselectedbytheoperatingsystemsettings.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::setDriver
System::getNumDriversSystem::getDriverInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getDriverCapsReturnsinformationoncapabilitiesofthecurrentoutputmodefortheselectedsounddevice.
C++Syntax
FMOD_RESULTSystem::getDriverCaps(
intid,
FMOD_CAPS*caps,
int*controlpaneloutputrate,
FMOD_SPEAKERMODE*controlpanelspeakermode
);
CSyntax
FMOD_RESULTFMOD_System_GetDriverCaps(
FMOD_SYSTEM*system,
intid,
FMOD_CAPS*caps,
int*controlpaneloutputrate,
FMOD_SPEAKERMODE*controlpanelspeakermode
);
Parameters
id
EnumerateddriverID.ThismustbeinavalidrangedelimitedbySystem::getNumDrivers.
caps
Addressofavariablethatreceivesthecapabilitiesofthedevice.Optional.Specify0orNULLtoignore.
controlpaneloutputrate
Addressofavariablethatreceivesthefrequencysetbytheoperatingsystem.Optional.Specify0orNULLtoignore.
controlpanelspeakermode
Addressofavariablethatreceivesthespeakermodesetbytheoperatingsystemcontrolpanel.UsethistopasstoSystem::setSpeakerModeifyouwanttosetupFMOD'ssoftwaremixingenginetomatch.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctioncannotbecalledafterFMODisalreadyactivatedwithSystem::init.ItmustbecalledbeforeSystem::init,orafterSystem::close.
SeeAlso
FMOD_CAPSSystem::initSystem::closeSystem::getNumDriversSystem::getHardwareChannelsSystem::setSpeakerModeChannel::setFrequency
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getDriverInfoRetrievesidentificationinformationaboutasounddevicespecifiedbyitsindex,andspecifictotheoutputmodesetwithSystem::setOutput.
C++Syntax
FMOD_RESULTSystem::getDriverInfo(
intid,
char*name,
intnamelen,
FMOD_GUID*guid
);
CSyntax
FMOD_RESULTFMOD_System_GetDriverInfo(
FMOD_SYSTEM*system,
intid,
char*name,
intnamelen,
FMOD_GUID*guid
);
Parameters
id
Indexofthesounddriverdevice.ThetotalnumberofdevicescanbefoundwithSystem::getNumDrivers.
name
Addressofavariablethatreceivesthenameofthedevice.Optional.Specify0orNULLtoignore.
namelen
Lengthinbytesofthetargetbuffertoreceievethestring.RequiredifnameparameterisnotNULL.
guid
AddressofavariablethatreceivestheGUIDthatuniquelyidentifiesthedevice.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::getNumDriversSystem::setOutput
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getDriverInfoWRetrievesidentificationinformationaboutasounddevicespecifiedbyitsindex,andspecifictotheoutputmodesetwithSystem::setOutput.
C++Syntax
FMOD_RESULTSystem::getDriverInfoW(
intid,
short*name,
intnamelen,
FMOD_GUID*guid
);
CSyntax
FMOD_RESULTFMOD_System_GetDriverInfoW(
FMOD_SYSTEM*system,
intid,
short*name,
intnamelen,
FMOD_GUID*guid
);
Parameters
id
Indexofthesounddriverdevice.ThetotalnumberofdevicescanbefoundwithSystem::getNumDrivers.
name
Addressofavariablethatreceivesthenameofthedeviceinwidechars.Optional.Specify0orNULLtoignore.
namelen
Lengthincharactersofthetargetbuffertoreceievethestring.RequiredifnameparameterisnotNULL.
guid
AddressofavariablethatreceivestheGUIDthatuniquelyidentifiesthedevice.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::getNumDriversSystem::setOutput
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getGeometryOcclusionCalculatesgeometryocclusionbetweenalistenerandasoundsource.
C++Syntax
FMOD_RESULTSystem::getGeometryOcclusion(
constFMOD_VECTOR*listener,
constFMOD_VECTOR*source,
float*direct,
float*reverb
);
CSyntax
FMOD_RESULTFMOD_System_GetGeometryOcclusion(
FMOD_SYSTEM*system,
constFMOD_VECTOR*listener,
constFMOD_VECTOR*source,
float*direct,
float*reverb
);
Parameters
listener
Thelistenerposition.
source
Thesourceposition.
direct
Optional.Specify0toignore.Addressofavariabletoreceivethedirectocclusionvalue.
reverb
Optional.Specify0toignore.Addressofavariabletoreceivethereverb
occlusionvalue.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifsinglesidedpolygonshavebeencreated,itisimportanttogetthesourceandlistenerpositionsroundtherightway,astheocclusionfrompointAtopointBmaynotbethesameastheocclusionfrompointBtopointA.
SeeAlso
System::createGeometry
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getGeometrySettingsRetrievesthemaximumworldsizeforthegeometryengine.
C++Syntax
FMOD_RESULTSystem::getGeometrySettings(
float*maxworldsize
);
CSyntax
FMOD_RESULTFMOD_System_GetGeometrySettings(
FMOD_SYSTEM*system,
float*maxworldsize
);
Parameters
maxworldsize
Pointertoafloattoreceievethemaximumworldsize.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::setGeometrySettings
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getHardwareChannelsReturnsthenumberofavailablehardwaremixedchannels.
C++Syntax
FMOD_RESULTSystem::getHardwareChannels(
int*numhardwarechannels
);
CSyntax
FMOD_RESULTFMOD_System_GetHardwareChannels(
FMOD_SYSTEM*system,
int*numhardwarechannels
);
Parameters
numhardwarechannels
Addressofavariablethatreceivesthenumberofavailablehardwaremixedchannels.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
NOTE:IfthisiscalledbeforeSystem::init,youwillreceivethemaximumpossiblehardwaremixedchannels,callingafterSystem::initwillgiveyouthenumberactuallyallocated.
SeeAlso
System::initSystem::setHardwareChannels
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getMasterChannelGroupRetrievesahandletotheinternalmasterchannelgroup.Thisisthedefaultchannelgroupthatallchannelsplayon.Thischannelgroupcanbeusedtodothingslikesetthemastervolumeforallplayingsounds.SeetheChannelGroupAPIformorefunctionality.
C++Syntax
FMOD_RESULTSystem::getMasterChannelGroup(
FMOD::ChannelGroup**channelgroup
);
CSyntax
FMOD_RESULTFMOD_System_GetMasterChannelGroup(
FMOD_SYSTEM*system,
FMOD_CHANNELGROUP**channelgroup
);
Parameters
channelgroup
AddressofavariablethatreceivesapointertothemasterSystemobjectchannelgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::createChannelGroupChannelGroup::setVolumeChannelGroup::getVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getMasterSoundGroupRetrievesthedefaultsoundgroup,whereallsoundsareplacedwhentheyarecreated.
C++Syntax
FMOD_RESULTSystem::getMasterSoundGroup(
FMOD::SoundGroup**soundgroup
);
CSyntax
FMOD_RESULTFMOD_System_GetMasterSoundGroup(
FMOD_SYSTEM*system,
FMOD_SOUNDGROUP**soundgroup
);
Parameters
soundgroup
AddressofapointertoaSoundGroupobjecttoreceivethemastersoundgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifauserbasedsoundgroupisdeleted/released,thesoundswillbeputbackintothissoundgroup.
SeeAlso
SoundGroup::releaseSoundGroup::getSystemObjectSoundGroup::setMaxAudibleSoundGroup::getMaxAudibleSoundGroup::getNameSoundGroup::getNumSoundsSoundGroup::getSoundSoundGroup::getNumPlayingSoundGroup::setUserDataSoundGroup::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTSystem::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_System_GetMemoryInfo(
FMOD_SYSTEM*system,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
EverypublicFMODclasshasagetMemoryInfofunctionwhichcanbeusedtogetdetailedinformationonwhatmemoryresourcesareassociatedwiththeobjectinquestion.ThegetMemoryInfofunctioncanbeusedintwodifferentways:
Use"memorybits"and"event_memorybits"tospecifywhatmemoryusageyou'dliketoqueryandreceiveonenumberbackin"memoryused".ProvideanFMOD_MEMORY_USAGE_DETAILSstructureforFMODtofill
withmemoryusagevaluesforalltypesofmemoryusage.
YoucanusetheFMOD_MEMBITS_xxxandFMOD_EVENT_MEMBITS_xxxdefinestogetFMODtoaddupthememoryusagenumbersyou'reinterestedin:
FMOD::ChannelGroup*channelgroup;
unsignedintusedvalue;
(createchannelgrouphere...)
//ByspecifyingFMOD_MEMBITS_DSPIandFMOD_MEMBITS_CHANNELGROUPherewe'reaskingthat"usedvalue"
//onlycountsFMOD_MEMBITS_DSPIandFMOD_MEMBITS_CHANNELGROUPtypememoryusage.
result=channelgroup->getMemoryInfo(FMOD_MEMBITS_DSPI|FMOD_MEMBITS_CHANNELGROUP
if(result!=FMOD_OK)
{
(handleerror...)
}
printf("ThisFMOD::ChannelGroupiscurrentlyusing%dbytesforDSPunitsandtheChannelGroupobjectitself\n",usedvalue);
Alternatively,theFMOD_MEMORY_USAGE_DETAILSstructurecanbeusedtofindoutthememoryusageofeachtypewithinaobject:
FMOD::ChannelGroup*channelgroup;
FMOD_MEMORY_USAGE_DETAILSmemused_details;
unsignedintchannelgroupused;
(createchannelgrouphere...)
//Byspecityinga"FMOD_MEMORY_USAGE_DETAILS"structhere,we'reaskingFMODtofillinthestructure
//withmemoryusagevaluesforalltypesofmemoryassociatedwiththisobject.
result=channelgroup->getMemoryInfo(0,0,0,&memused;_details);
if(result!=FMOD_OK)
{
(handleerror...)
}
channelgroupused=memused_details.dsp+memused_details.channelgroup;
printf("ThisFMOD::ChannelGroupiscurrentlyusing%dbytesforDSPunitsandtheChannelGroupobjectitself\n",channelgroupused);
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getNetworkProxyRetrievestheURLoftheproxyserverusedininternetstreaming.
C++Syntax
FMOD_RESULTSystem::getNetworkProxy(
char*proxy,
intproxylen
);
CSyntax
FMOD_RESULTFMOD_System_GetNetworkProxy(
FMOD_SYSTEM*system,
char*proxy,
intproxylen
);
Parameters
proxy
AddressofavariablethatreceivestheproxyserverURL.
proxylen
Sizeofthebufferinbytestoreceivethestring.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::setNetworkProxy
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getNetworkTimeoutRetrievethetimeoutvaluefornetworkstreams
C++Syntax
FMOD_RESULTSystem::getNetworkTimeout(
int*timeout
);
CSyntax
FMOD_RESULTFMOD_System_GetNetworkTimeout(
FMOD_SYSTEM*system,
int*timeout
);
Parameters
timeout
Thetimeoutvalueinms.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getNumCDROMDrivesRetrievesthenumberofavailableCDROMdrivesontheuser'smachine.
C++Syntax
FMOD_RESULTSystem::getNumCDROMDrives(
int*numdrives
);
CSyntax
FMOD_RESULTFMOD_System_GetNumCDROMDrives(
FMOD_SYSTEM*system,
int*numdrives
);
Parameters
numdrives
AddressofavariablethatreceivesthenumberofCDROMdrives.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::getCDROMDriveName
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getNumDriversRetrievesthenumberofsoundcarddevicesonthemachine,specifictotheoutputmodesetwithSystem::setOutput.
C++Syntax
FMOD_RESULTSystem::getNumDrivers(
int*numdrivers
);
CSyntax
FMOD_RESULTFMOD_System_GetNumDrivers(
FMOD_SYSTEM*system,
int*numdrivers
);
Parameters
numdrivers
Addressofavariablethatreceivesthenumberofoutputdrivers.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
IfSystem::setOutputisnotcalleditwillreturnthenumberofdriversavailableforthedefaultoutputtype.Usethisforenumeratingsounddevices.UseSystem::getDriverInfotogetthedevice'sname.
SeeAlso
System::getDriverSystem::getDriverInfoSystem::setOutputSystem::getOutput
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getNumPluginsRetrievesthenumberofavailablepluginsloadedintoFMODatthecurrenttime.
C++Syntax
FMOD_RESULTSystem::getNumPlugins(
FMOD_PLUGINTYPEplugintype,
int*numplugins
);
CSyntax
FMOD_RESULTFMOD_System_GetNumPlugins(
FMOD_SYSTEM*system,
FMOD_PLUGINTYPEplugintype,
int*numplugins
);
Parameters
plugintype
ThetypeofplugintypesuchasFMOD_PLUGINTYPE_OUTPUT,FMOD_PLUGINTYPE_CODECorFMOD_PLUGINTYPE_DSP.
numplugins
Addressofavariablethatreceivesthenumberofavailablepluginsfortheselectedtype.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_PLUGINTYPESystem::getPluginHandle
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getOutputRetrievesthecurrentoutputsystemFMODisusingtoaddressthehardware.
C++Syntax
FMOD_RESULTSystem::getOutput(
FMOD_OUTPUTTYPE*output
);
CSyntax
FMOD_RESULTFMOD_System_GetOutput(
FMOD_SYSTEM*system,
FMOD_OUTPUTTYPE*output
);
Parameters
output
Addressofavariablethatreceivesthecurrentoutputtype.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_OUTPUTTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getOutputByPluginReturnsthecurrentlyselectedoutputasanidinthelistofoutputplugins.
C++Syntax
FMOD_RESULTSystem::getOutputByPlugin(
unsignedint*handle
);
CSyntax
FMOD_RESULTFMOD_System_GetOutputByPlugin(
FMOD_SYSTEM*system,
unsignedint*handle
);
Parameters
handle
Handletoapre-existingoutputplugin.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::getNumPluginsSystem::setOutputByPluginSystem::setOutput
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getOutputHandleRetrievesapointertothesystemleveloutputdevicemodule.ThismeansapointertoaDirectX"LPDIRECTSOUND",oraWINMMhandle,orwithsomethinglikewithFMOD_OUTPUTTYPE_NOSOUNDoutput,thehandlewillbenullor0.
C++Syntax
FMOD_RESULTSystem::getOutputHandle(
void**handle
);
CSyntax
FMOD_RESULTFMOD_System_GetOutputHandle(
FMOD_SYSTEM*system,
void**handle
);
Parameters
handle
Addressofavariablethatreceivesthehandletotheoutputmode'snativehardwareAPIobject(seeremarks).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
MustbecalledafterSystem::init.Casttheresultingpointerdependingonwhatoutputsystempointeryouareafter.
FMOD_OUTPUTTYPE_DSOUNDPointertotypeDIRECTSOUNDisreturned.FMOD_OUTPUTTYPE_WINMMPointertotypeHWAVEOUTisreturned.FMOD_OUTPUTTYPE_WASAPIPointertotypeIAudioRenderClientisreturned.FMOD_OUTPUTTYPE_ASIOPointertotypeAsioDriversisreturned.FMOD_OUTPUTTYPE_OSSFilehandleisreturned,(casttoint).FMOD_OUTPUTTYPE_ALSAPointertotypesnd_pcm_tisreturned.FMOD_OUTPUTTYPE_ASOUNDPointertotypesnd_pcm_tisreturned.FMOD_OUTPUTTYPE_ESDHandleoftypeintisreturned,asreturnedbyso_esd_open_sound(casttoint).FMOD_OUTPUTTYPE_COREAUDIOHandleoftypeAudioUnitisreturned.FMOD_OUTPUTTYPE_PS3NULL/0isreturned.FMOD_OUTPUTTYPE_XBOX360PointertotypeIXAudio2isreturned.FMOD_OUTPUTTYPE_PSPNULL/0isreturned.FMOD_OUTPUTTYPE_WIINULL/0isreturned.FMOD_OUTPUTTYPE_NOSOUNDNULL/0isreturned.FMOD_OUTPUTTYPE_WAVWRITERNULL/0isreturned.
SeeAlso
FMOD_OUTPUTTYPESystem::setOutputSystem::init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getPluginHandleRetrievesthehandleofapluginbasedonitstypeandrelativeindex.UseSystem::getNumPluginstoenumerateplugins.
C++Syntax
FMOD_RESULTSystem::getPluginHandle(
FMOD_PLUGINTYPEplugintype,
intindex,
unsignedint*handle
);
CSyntax
FMOD_RESULTFMOD_System_GetPluginHandle(
FMOD_SYSTEM*system,
FMOD_PLUGINTYPEplugintype,
intindex,
unsignedint*handle
);
Parameters
plugintype
ThetypeofplugintypesuchasFMOD_PLUGINTYPE_OUTPUT,FMOD_PLUGINTYPE_CODECorFMOD_PLUGINTYPE_DSP.
index
Therelativeindexforthetypeofplugin.
handle
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.
IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::getNumPlugins
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getPluginInfoRetrievesinformationtodisplayfortheselectedplugin.
C++Syntax
FMOD_RESULTSystem::getPluginInfo(
unsignedinthandle,
FMOD_PLUGINTYPE*plugintype,
char*name,
intnamelen,
unsignedint*version
);
CSyntax
FMOD_RESULTFMOD_System_GetPluginInfo(
FMOD_SYSTEM*system,
unsignedinthandle,
FMOD_PLUGINTYPE*plugintype,
char*name,
intnamelen,
unsignedint*version
);
Parameters
handle
Handletoapre-existingplugin.
plugintype
Addressofavariablethatreceivesthetypeoftheplugin,FMOD_PLUGINTYPE_OUTPUT,FMOD_PLUGINTYPE_CODECorFMOD_PLUGINTYPE_DSP.
name
Addressofavariablethatreceivesthenameoftheplugin.
namelen
Lengthinbytesofthetargetbuffertoreceievethestring.
version
Versionnumbersetbytheplugin.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::getNumPlugins
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getRecordDriverCapsReturnsinformationoncapabilitiesofthecurrentoutputmodefortheselectedrecordingsounddevice.
C++Syntax
FMOD_RESULTSystem::getRecordDriverCaps(
intid,
FMOD_CAPS*caps,
int*minfrequency,
int*maxfrequency
);
CSyntax
FMOD_RESULTFMOD_System_GetRecordDriverCaps(
FMOD_SYSTEM*system,
intid,
FMOD_CAPS*caps,
int*minfrequency,
int*maxfrequency
);
Parameters
id
EnumerateddriverID.ThismustbeinavalidrangedelimitedbySystem::getRecordNumDrivers.
caps
Addressofavariablethatreceivesthecapabilitiesofthedevice.Optional.Specify0orNULLtoignore.
minfrequency
Addressofavariablethatreceivestheminimumfrequencyallowedforsoundsusedwithrecording.Optional.Specify0orNULLtoignore.
maxfrequency
Addressofavariablethatreceivesthemaximumfrequencyallowedforsoundsusedwithrecording.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_CAPSSystem::getRecordNumDrivers
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getRecordDriverInfoRetrievesidentificationinformationaboutasounddevicespecifiedbyitsindex,andspecifictotheoutputmodesetwithSystem::setOutput.
C++Syntax
FMOD_RESULTSystem::getRecordDriverInfo(
intid,
char*name,
intnamelen,
FMOD_GUID*guid
);
CSyntax
FMOD_RESULTFMOD_System_GetRecordDriverInfo(
FMOD_SYSTEM*system,
intid,
char*name,
intnamelen,
FMOD_GUID*guid
);
Parameters
id
IndexintotheenumeratedlistofrecorddevicesuptothevaluereturnedbySystem::getRecordNumDrivers.
name
Addressofavariablethatreceivesthenameoftherecordingdevice.Optional.Specify0orNULLtoignore.
namelen
Lengthinbytesofthetargetbuffertoreceievethestring.RequiredifnameparameterisnotNULL.
guid
AddressofavariablethatreceivestheGUIDthatuniquelyidentifiesthedevice.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::setOutputSystem::getRecordNumDrivers
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getRecordDriverInfoWRetrievesidentificationinformationaboutasounddevicespecifiedbyitsindex,andspecifictotheoutputmodesetwithSystem::setOutput.
C++Syntax
FMOD_RESULTSystem::getRecordDriverInfoW(
intid,
short*name,
intnamelen,
FMOD_GUID*guid
);
CSyntax
FMOD_RESULTFMOD_System_GetRecordDriverInfoW(
FMOD_SYSTEM*system,
intid,
short*name,
intnamelen,
FMOD_GUID*guid
);
Parameters
id
IndexintotheenumeratedlistofrecorddevicesuptothevaluereturnedbySystem::getRecordNumDrivers.
name
Addressofavariablethatreceivesthenameoftherecordingdeviceinwidechars.Optional.Specify0orNULLtoignore.
namelen
Lengthinbytesofthetargetbuffertoreceievethestring.RequiredifnameparameterisnotNULL.
guid
AddressofavariablethatreceivestheGUIDthatuniquelyidentifiesthedevice.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::setOutputSystem::getRecordNumDrivers
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getRecordNumDriversRetrievesthenumberofrecordingdevicesavailableforthisoutputmode.Usethistoenumerateallrecordingdevicespossiblesothattheusercanselectone.
C++Syntax
FMOD_RESULTSystem::getRecordNumDrivers(
int*numdrivers
);
CSyntax
FMOD_RESULTFMOD_System_GetRecordNumDrivers(
FMOD_SYSTEM*system,
int*numdrivers
);
Parameters
numdrivers
Addressofavariablethatreceivesthenumberofrecordingdriversavailableforthisoutputmode.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::GetRecordDriverInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getRecordPositionRetrievesthecurrentrecordingpositionoftherecordbufferinPCMsamples.
C++Syntax
FMOD_RESULTSystem::getRecordPosition(
intid,
unsignedint*position
);
CSyntax
FMOD_RESULTFMOD_System_GetRecordPosition(
FMOD_SYSTEM*system,
intid,
unsignedint*position
);
Parameters
id
EnumerateddriverID.ThismustbeinavalidrangedelimitedbySystem::getRecordNumDrivers.
position
AddressofavariabletoreceievethecurrentrecordingpositioninPCMsamples.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getReverbAmbientPropertiesRetrievesthedefaultreverbenvrionmentforthevirtualreverbsystem.
C++Syntax
FMOD_RESULTSystem::getReverbAmbientProperties(
FMOD_REVERB_PROPERTIES*prop
);
CSyntax
FMOD_RESULTFMOD_System_GetReverbAmbientProperties(
FMOD_SYSTEM*system,
FMOD_REVERB_PROPERTIES*prop
);
Parameters
prop
AddressofapointertoaFMOD_REVERB_PROPERTIEStoreceievethesettingsforthecurrentambientreverbsetting.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Bydefaulttheambientreverbissetto'off'.ThisisthesameasFMOD_REVERB_PRESET_OFF.
SeeAlso
FMOD_REVERB_PROPERTIESSystem::setReverbAmbientPropertiesSystem::createReverb
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getReverbPropertiesRetrievesthecurrentreverbenvironmentforthespecifiedreverbinstance.Youmustspecifythe'Instance'value(usually0unlessyouareusingmultiplereverbs)beforecallingthisfunction.
C++Syntax
FMOD_RESULTSystem::getReverbProperties(
FMOD_REVERB_PROPERTIES*prop
);
CSyntax
FMOD_RESULTFMOD_System_GetReverbProperties(
FMOD_SYSTEM*system,
FMOD_REVERB_PROPERTIES*prop
);
Parameters
prop
Addressofavariablethatreceivesthecurrentreverbenvironmentdescription.Makesurethe'Instance'valueisspecified.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!Itisimportanttospecifythe'Instance'valueinthe
FMOD_REVERB_PROPERTIESstructurecorrectly,otherwiseyouwillgetanFMOD_ERR_REVERB_INSTANCEerror.
SeeAlso
FMOD_REVERB_PROPERTIESSystem::setReverbPropertiesChannel::setReverbPropertiesChannel::getReverbProperties
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getSoftwareChannelsRetrievesthemaximumnumberofsoftwaremixedchannelspossible.SoftwaremixedvoicesareusedbysoundsloadedwithFMOD_SOFTWARE.
C++Syntax
FMOD_RESULTSystem::getSoftwareChannels(
int*numsoftwarechannels
);
CSyntax
FMOD_RESULTFMOD_System_GetSoftwareChannels(
FMOD_SYSTEM*system,
int*numsoftwarechannels
);
Parameters
numsoftwarechannels
Addressofavariablethatreceivesthecurrentmaximumnumberofsoftwarevoicesavailable.Default=32.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::setSoftwareChannels
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getSoftwareFormatRetrievestheoutputformatforthesoftwaremixer.
C++Syntax
FMOD_RESULTSystem::getSoftwareFormat(
int*samplerate,
FMOD_SOUND_FORMAT*format,
int*numoutputchannels,
int*maxinputchannels,
FMOD_DSP_RESAMPLER*resamplemethod,
int*bits
);
CSyntax
FMOD_RESULTFMOD_System_GetSoftwareFormat(
FMOD_SYSTEM*system,
int*samplerate,
FMOD_SOUND_FORMAT*format,
int*numoutputchannels,
int*maxinputchannels,
FMOD_DSP_RESAMPLER*resamplemethod,
int*bits
);
Parameters
samplerate
Addressofavariablethatreceivesthemixer'soutputrate.Optional.Specify0orNULLtoignore.
format
Addressofavariablethatreceivesthemixer'soutputformat.Optional.Specify0orNULLtoignore.
numoutputchannels
Addressofavariablethatreceivesthenumberofoutputchannelstoinitializethemixerto,forexample1=mono,2=stereo.8isthemaximumforsoundcardsthatcanhandleit.Optional.Specify0orNULLtoignore.
maxinputchannels
Addressofavariablethatreceivesthemaximumchanneldepthonsoundsthatareloadableorcreatable.Specify0orNULLtoignore.
resamplemethod
Addressofavariablethatreceivesthecurrentresampling(frequencyconversion)methodforsoftwaremixedsounds.Specify0orNULLtoignore.
bits
Addressofavariablethatreceivesthenumberofbitspersample.Usefulforbyte->sampleconversions.forexampleFMOD_SOUND_FORMAT_PCM16is16.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
NotethatthesettingsreturnedheremaydifferfromthesettingsprovidedbytheuserwithSystem::setSoftwareFormat.Thisisbecausethedrivermayhavechangeditbecauseitwillnotinitializetoanythingelse.
SeeAlso
System::setSoftwareFormat
FMOD_SOUND_FORMATFMOD_DSP_RESAMPLER
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getSoundRAMRetrievestheamountofdedicatedsoundramavailableiftheplatformsupportsit.Mostplatformsusemainramtostoreaudiodata,sothisfunctionusuallyisn'tnecessary.
C++Syntax
FMOD_RESULTSystem::getSoundRAM(
int*currentalloced,
int*maxalloced,
int*total
);
CSyntax
FMOD_RESULTFMOD_System_GetSoundRAM(
FMOD_SYSTEM*system,
int*currentalloced,
int*maxalloced,
int*total
);
Parameters
currentalloced
Addressofavariablethatreceivesthecurrentlyallocatedsoundrammemoryattimeofcall.Optional.Specify0orNULLtoignore.
maxalloced
AddressofavariablethatreceivesthemaximumallocatedsoundrammemorysinceSystem::init.Optional.Specify0orNULLtoignore.
total
Addressofavariablethatreceivesthetotalamountofsoundramavailableonthisdevice.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Memory_GetStats
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getSpeakerModeRetrievesthecurrentspeakermode.
C++Syntax
FMOD_RESULTSystem::getSpeakerMode(
FMOD_SPEAKERMODE*speakermode
);
CSyntax
FMOD_RESULTFMOD_System_GetSpeakerMode(
FMOD_SYSTEM*system,
FMOD_SPEAKERMODE*speakermode
);
Parameters
speakermode
Addressofavariablethatreceivesthecurrentspeakermode.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::setSpeakerModeFMOD_SPEAKERMODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getSpectrumRetrievesthespectrumfromthecurrentlyplayingoutputsignal.
C++Syntax
FMOD_RESULTSystem::getSpectrum(
float*spectrumarray,
intnumvalues,
intchanneloffset,
FMOD_DSP_FFT_WINDOWwindowtype
);
CSyntax
FMOD_RESULTFMOD_System_GetSpectrum(
FMOD_SYSTEM*system,
float*spectrumarray,
intnumvalues,
intchanneloffset,
FMOD_DSP_FFT_WINDOWwindowtype
);
Parameters
spectrumarray
Addressofavariablethatreceivesthespectrumdata.Thisisanarrayoffloatingpointvalues.Datawillrangeis0.0to1.0.Decibels=10.0f*(float)log10(val)*2.0f;Seeremarksforwhatthedatarepresents.
numvalues
Sizeofarrayinfloatingpointvaluesbeingpassedtothefunction.Mustbeapowerof2.(ie128/256/512etc).Min=64.Max=8192.
channeloffset
Channelofthesignaltoanalyze.Ifthesignalismultichannel(suchasastereooutput),thenthisvaluerepresentswhichchanneltoanalyze.Onastereosignal0
=left,1=right.
windowtype
"Pre-FFT"windowmethod.ThisfiltersthePCMdatabeforeenteringthespectrumanalyzertoreducetransientfrequencyerrorformoreaccurateresults.SeeFMOD_DSP_FFT_WINDOWfordifferenttypesoffftwindowtechniquespossibleandforamoredetailedexplanation.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thelargerthenumvalues,themoreCPUtheFFTwilltake.Choosetherightvaluetotradeoffbetweenaccuracy/speed.Thelargerthenumvalues,themore'lag'thespectrumwillseemtoinherit.ThisisbecausetheFFTwindowsizestretchestheanalysisbackintimetowhatwasalreadyplayed.Forexampleifthewindowsizehappenedtobe44100andtheoutputratewas44100itwouldbeanalyzingthepastsecondofdata,andgivingyoutheaveragespectrumoverthattimeperiod.IfyouarenotdisplayingtheresultindB,thenthedatamayseemsmallerthanitshouldbe.Todisplayityoumaywanttonormalizethedata-thatis,findthemaximumvalueintheresultingspectrum,andscaleallvaluesinthearrayby1/max.(ieifthemaxwas0.5f,thenitwouldbecome1).Togetthespectrumforbothchannelsofastereosignal,callthisfunctiontwice,oncewithchanneloffset=0,andagainwithchanneloffset=1.Thenaddthespectrumstogetheranddivideby2togettheaveragespectrumforbothchannels.
Whatthedatarepresents.Toworkoutwhateachentryinthearrayrepresents,usethisformula
entry_hz=(output_rate/2)/numvalues
Thearrayrepresentsamplitudesofeachfrequencybandfrom0hztothenyquistrate.Thenyquistrateisequaltotheoutputratedividedby2.ForexamplewhenFMODissetto44100hzoutput,therangeofrepresentedfrequencieswillbe0hzto22049hz,atotalof22050hzrepresented.Ifinthesameexample,1024waspassedtothisfunctionasthenumvalues,eachentry'scontributionwouldbeasfollows.
entry_hz=(44100/2)/1024
entry_hz=21.53hz
Note:ThisfunctiononlydisplaysdataforsoundsplayingthatwerecreatedwithFMOD_SOFTWARE.FMOD_HARDWAREbasedsoundsareplayedusingthesoundcarddriverandarenotaccessable.
SeeAlso
FMOD_DSP_FFT_WINDOWChannel::getSpectrumChannelGroup::getSpectrumSystem::getWaveData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getStreamBufferSizeReturnsthecurrentinternalbuffersizesettingsforstreamablesounds.
C++Syntax
FMOD_RESULTSystem::getStreamBufferSize(
unsignedint*filebuffersize,
FMOD_TIMEUNIT*filebuffersizetype
);
CSyntax
FMOD_RESULTFMOD_System_GetStreamBufferSize(
FMOD_SYSTEM*system,
unsignedint*filebuffersize,
FMOD_TIMEUNIT*filebuffersizetype
);
Parameters
filebuffersize
Addressofavariablethatreceivesthecurrentstreamfilebuffersizesetting.Defaultis16384(FMOD_TIMEUNIT_RAWBYTES).Optional.Specify0orNULLtoignore.
filebuffersizetype
Addressofavariablethatreceivesthetypeofunitforthecurrentstreamfilebuffersizesetting.CanbeFMOD_TIMEUNIT_MS,FMOD_TIMEUNIT_PCM,FMOD_TIMEUNIT_PCMBYTESorFMOD_TIMEUNIT_RAWBYTES.DefaultisFMOD_TIMEUNIT_RAWBYTES.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.
IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_TIMEUNITSystem::setStreamBufferSize
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getUserDataRetrievestheuservaluethatthatwassetbycallingtheSystem::setUserDatafunction.
C++Syntax
FMOD_RESULTSystem::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_System_GetUserData(
FMOD_SYSTEM*system,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeSystem::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getVersionReturnsthecurrentversionofFMODExbeingused.
C++Syntax
FMOD_RESULTSystem::getVersion(
unsignedint*version
);
CSyntax
FMOD_RESULTFMOD_System_GetVersion(
FMOD_SYSTEM*system,
unsignedint*version
);
Parameters
version
AddressofavariablethatreceivesthecurrentFMODExversion.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Theversionisa32bithexadecimalvalueformatedas16:8:8,withtheupper16bitsbeingthemajorversion,themiddle8bitsbeingtheminorversionandthebottom8bitsbeingthedevelopmentversion.Forexampleavalueof00040106hisequalto4.01.06.
SeeAlso
System::init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::getWaveDataRetrievesapointertoablockofPCMdatathatrepresentsthecurrentlyplayingaudiomix.Thisfunctionisusefulforaveryeasywaytoplotanoscilliscope.
C++Syntax
FMOD_RESULTSystem::getWaveData(
float*wavearray,
intnumvalues,
intchanneloffset
);
CSyntax
FMOD_RESULTFMOD_System_GetWaveData(
FMOD_SYSTEM*system,
float*wavearray,
intnumvalues,
intchanneloffset
);
Parameters
wavearray
Addressofavariablethatreceivesthecurrentlyplayingwaveformdata.Thisisanarrayoffloatingpointvalues.
numvalues
Numberoffloatstowritetothearray.Maximumvalue=16384.
channeloffset
Offsetintomultichanneldata.Formonooutputuse0.Stereooutputwilluse0=left,1=right.Morethanstereooutput-usetheappropriateindex.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisistheactualresampled,filteredandvolumescaleddataofthefinaloutput,atthetimethisfunctioniscalled.
Donotusethisfunctiontotryanddisplaythewholewaveformofthesound,asthisismoreofa'snapshot'ofthecurrentwaveformatthetimeitiscalled,andcouldreturnthesamedataifitiscalledveryquicklyinsuccession.SeetheDSPAPItocaptureacontinualstreamofwavedataasitplays,orseeSound::lock/Sound::unlockifyouwanttosimplydisplaythewaveformofasound.
Thisfunctionallowsretrievalofleftandrightdataforastereosoundindividually.Tocombinethemintoonesignal,simplyaddtheentriesofeachseperatebuffertogetherandthendividethemby2.
Note:ThisfunctiononlydisplaysdataforsoundsplayingthatwerecreatedwithFMOD_SOFTWARE.FMOD_HARDWAREbasedsoundsareplayedusingthesoundcarddriverandarenotaccessable.
SeeAlso
System::getSpectrumChannel::getWaveDataChannelGroup::getWaveDataSound::lockSound::unlock
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::initInitializesthesystemobject,andthesounddevice.Thishastobecalledatthestartoftheuser'sprogram.YoumustcreateasystemobjectwithFMOD::System_create.
C++Syntax
FMOD_RESULTSystem::init(
intmaxchannels,
FMOD_INITFLAGSflags,
void*extradriverdata
);
CSyntax
FMOD_RESULTFMOD_System_Init(
FMOD_SYSTEM*system,
intmaxchannels,
FMOD_INITFLAGSflags,
void*extradriverdata
);
Parameters
maxchannels
ThemaximumnumberofchannelstobeusedinFMOD.Theyarealsocalled'virtualchannels'asyoucanplayasmanyoftheseasyouwant,evenifyouonlyhaveasmallnumberofhardwareorsoftwarevoices.Seeremarksformore.
flags
SeeFMOD_INITFLAGS.ThiscanbeaselectionofflagsbitwiseOR'edtogethertochangethebehaviourofFMODatinitializationtime.
extradriverdata
Driverspecificdatathatcanbepassedtotheoutputplugin.Forexamplethefilenameforthewavwriterplugin.SeeFMOD_OUTPUTTYPEforwhateach
outputmodemighttakehere.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Virtualchannels.ThesetypesofvoicesaretheonesyouworkwithusingtheFMOD::ChannelAPI.Theadvantageofvirtualchannelsare,unlikeolderversionsofFMOD,youcannowplayasmanysoundsasyoulikewithoutfearofeverrunningoutofvoices,orplaysoundfailing.Youcanalsoavoid'channelstealing'ifyouspecifyenoughvirtualvoices.
Asanexample,youcanplay1000soundsatonce,evenona32channelsoundcard.FMODwillonlyplaythemostimportant/closest/loudest(determinedbyvolume/distance/geometryandprioritysettings)voices,andtheother968voiceswillbevirtualizedwithoutexpensetotheCPU.Thevoice'scursorpositionsareupdated.Whenthepriorityofsoundschangeoremulatedsoundsgetlouderthanaudibleones,theywillswaptheactualvoiceresourceover(iehardwareorsoftwarebuffer)andplaythevoicefromitscorrectpositionintimeasitshouldbeheard.Whatthismeansisyoucanplayall1000sounds,iftheyarescatteredaroundthegameworld,andasyoumovearoundtheworldyouwillheartheclosestormostimportant32,andtheywillautomaticallyswapinandoutasyoumove.
Currentlythemaximumchannellimitis4093.
SeeAlso
FMOD_INITFLAGSSystem::closeSystem_CreateFMOD_OUTPUTTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::isRecordingRetrievesthestateoftheFMODrecordingAPI,ieifitiscurrentlyrecordingornot.
C++Syntax
FMOD_RESULTSystem::isRecording(
intid,
bool*recording
);
CSyntax
FMOD_RESULTFMOD_System_IsRecording(
FMOD_SYSTEM*system,
intid,
FMOD_BOOL*recording
);
Parameters
id
EnumerateddriverID.ThismustbeinavalidrangedelimitedbySystem::getRecordNumDrivers.
recording
Addressofavariabletoreceivethecurrentrecordingstate.TrueornonzeroiftheFMODrecordingapiiscurrentlyinthemiddleofrecording,falseorzeroiftherecordingapiisstopped/notrecording.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
RecordingcanbestartedwithSystem::recordStart.
SeeAlso
System::recordStartSystem::recordStop
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::loadGeometryCreatesageometryobjectfromablockofmemorywhichcontainspre-savedgeometrydata,savedbyGeometry::save.
C++Syntax
FMOD_RESULTSystem::loadGeometry(
constvoid*data,
intdatasize,
FMOD::Geometry**geometry
);
CSyntax
FMOD_RESULTFMOD_System_LoadGeometry(
FMOD_SYSTEM*system,
constvoid*data,
intdatasize,
FMOD_GEOMETRY**geometry
);
Parameters
data
Addressofdatacontainingpre-savedgeometrydata.
datasize
Sizeofgeometrydatablockinbytes.
geometry
AddressofavariabletoreceiveanewlycreatedFMOD::Geometryobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Geometry::saveSystem::createGeometry
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::loadPluginLoadsanFMODplugin.ThiscouldbeaDSP,fileformatoroutputplugin.
C++Syntax
FMOD_RESULTSystem::loadPlugin(
constchar*filename,
unsignedint*handle,
unsignedintpriority
);
CSyntax
FMOD_RESULTFMOD_System_LoadPlugin(
FMOD_SYSTEM*system,
constchar*filename,
unsignedint*handle,
unsignedintpriority
);
Parameters
filename
Filenameoftheplugintobeloaded.
handle
Pointertoanunsignedinttoreceivethepluginhandle,forlateruse.
priority
(FMOD_PLUGINTYPE_CODEConly)Priorityofthecodeccomparedtoothercodecs.0=mostimportant.highernumbers=lessimportance.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Oncethepluginisloaded,itcanbeenumeratedandused.Forfileformatplugins,FMODwillautomaticallytrytousethemwhenSystem::createSoundisused.ForDSPplugins,youcanenumeratethemwithSystem::getNumPlugins,System::getPluginHandleandSystem::getPluginInfo.PluginscanbecreatedforFMODbytheuser.Seetherelevantsectioninthedocumentationoncreatingplugins.Theformatofthepluginisdependantontheoperatingsystem.OnWin32andWin64the.dllformatisusedOnLinux,the.soformatisused.OnMacintosh,the.shlibformatisused
ThecodecsinternaltoFMODhavethefollowingpriorities.
Tag100
CDDA200
FSB300
DSP400
VAG500
Wav600
AT3700
OggVorbis800
Tremor900
AIFF1000
FLAC1100
MOD1200
S3M1300
XM1400
IT1500
MIDI1600
DLS1700
SF21800
ASF1900
XMA2000
XWMA2100
Playlist2200
MPEGPSP2300
MPEG2400
Raw2500
Note:Somecodecsareonlyforcertainplatforms,ieXMAisxbox360only.
SeeAlso
System::setPluginPathSystem::unloadPluginSystem::getNumPluginsSystem::getPluginHandleSystem::getPluginInfoSystem::setOutputByPluginSystem::getOutputByPluginSystem::createDSPByPluginSystem::createSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::lockDSPMutualexclusionfunctiontolocktheFMODDSPengine(whichrunsasynchronouslyinanotherthread),sothatitwillnotexecute.IftheFMODDSPengineisalreadyexecuting,thisfunctionwillblockuntilithascompleted.ThefunctionmaybeusedtosynchronizeDSPnetworkoperationscarriedoutbytheuser.AnexampleofusingthisfunctionmaybeforwhentheuserwantstoconstructaDSPsub-network,withouttheDSPengineexecutinginthebackgroundwhilethesub-networkisstillunderconstruction.
C++Syntax
FMOD_RESULTSystem::lockDSP();
CSyntax
FMOD_RESULTFMOD_System_LockDSP(FMOD_SYSTEM*system);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
OncetheusernolongerneedstheDSPenginelocked,itmustbeunlockedwithSystem::unlockDSP.NotethattheDSPengineshouldnotbelockedforasignificantamountoftime,otherwiseinconsistencyintheaudiooutputmayresult.(audio
skipping/stuttering).
SeeAlso
System::unlockDSP
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::playDSPPlaysaDSPunitobjectanditsinputnetworkonaparticularchannel.
C++Syntax
FMOD_RESULTSystem::playDSP(
FMOD_CHANNELINDEXchannelid,
FMOD::DSP*dsp,
boolpaused,
FMOD::Channel**channel
);
CSyntax
FMOD_RESULTFMOD_System_PlayDSP(
FMOD_SYSTEM*system,
FMOD_CHANNELINDEXchannelid,
FMOD_DSP*dsp,
FMOD_BOOLpaused,
FMOD_CHANNEL**channel
);
Parameters
channelid
UsethevalueFMOD_CHANNEL_FREEtogetFMODtopickafreechannel.Otherwisespecifyachannelnumberfrom0tothe'maxchannels'valuespecifiedinSystem::initminus1.
dsp
Pointertothedspunittoplay.ThisisopenedwithSystem::createDSP,System::createDSPByType,System::createDSPByPlugin.
paused
Trueorfalseflagtospecifywhethertostartthechannelpausedornot.Startingachannelpausedallowstheusertoalteritsattributeswithoutitbeingaudible,and
unpausingwithChannel::setPausedactuallystartsthedsprunning.
channel
Addressofachannelhandlepointerthatreceivesthenewlyplayingchannel.IfFMOD_CHANNEL_REUSEisused,thiscancontainapreviouslyusedchannelhandleandFMODwillre-useittoplayadspon.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whenadspisplayed,itwillusethedsp'sdefaultfrequency,volume,pan,levelsandpriority.
AdspdefinedasFMOD_3Dwillbydefaultplayatthepositionofthelistener.
Tochangechannelattributesbeforethedspisaudible,startthechannelpausedbysettingthepausedflagtotrue,andcallingtherelevantchannelbasedfunctions.Followingthat,unpausethechannelwithChannel::setPaused.
IfFMOD_CHANNEL_FREEisusedasthechannelindex,itwillpickanarbitraryfreechannelandusechannelmanagement.(Asdescribedbelow).IfFMOD_CHANNEL_REUSEisusedasthechannelindex,FMODExwillre-usethechannelhandlethatispassedinasthe'channel'parameter.IfNULLor0ispassedinasthechannelhandleitwillusethesamelogicasFMOD_CHANNEL_FREEandpickanarbitrarychannel.
Channelsarereferencecounted.IfachannelisstolenbytheFMODprioritysystem,thenthehandletothestolenvoicebecomesinvalid,andChannelbasedcommandswillnotaffectthenewchannelplayinginitsplace.Ifallchannelsarecurrentlyfullplayingadsporsound,FMODwillsteala
channelwiththelowestprioritydsporsound.Ifmorechannelsareplayingthanarecurrentlyavailableonthesoundcard/sounddeviceorsoftwaremixer,thenFMODwill'virtualize'thechannel.Thistypeofchannelisnotheard,butitisupdatedasifitwasplaying.Whenitsprioritybecomeshighenoughoranothersoundstopsthatwasusingarealhardware/softwarechannel,itwillstartplayingfromwhereitshouldbe.ThistechniquesavesCPUtime(thousandsofsoundscanbeplayedatoncewithoutactuallybeingmixedortakingupresources),andalsoremovestheneedfortheusertomanagevoicesthemselves.Anexampleofvirtualchannelusageisadungeonwith100torchesburning,allwithaloopingcracklingsound,butwithasoundcardthatonlysupports32hardwarevoices.Ifthe3Dpositionsandprioritiesforeachtorcharesetcorrectly,FMODwillplayall100soundswithoutany'outofchannels'errors,andswaptherealvoicesinandoutaccordingtowhichtorchesareclosestin3Dspace.Priorityforvirtualchannelscanbechangedinthesound'sdefaults,oratruntimewithChannel::setPriority.
SeeAlso
FMOD_CHANNELINDEXSystem::createDSPSystem::createDSPByTypeSystem::createDSPByPluginChannel::setPausedChannel::setPriorityDSP::setDefaultsSystem::init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::playSoundPlaysasoundobjectonaparticularchannel.
C++Syntax
FMOD_RESULTSystem::playSound(
FMOD_CHANNELINDEXchannelid,
FMOD::Sound*sound,
boolpaused,
FMOD::Channel**channel
);
CSyntax
FMOD_RESULTFMOD_System_PlaySound(
FMOD_SYSTEM*system,
FMOD_CHANNELINDEXchannelid,
FMOD_SOUND*sound,
FMOD_BOOLpaused,
FMOD_CHANNEL**channel
);
Parameters
channelid
UsethevalueFMOD_CHANNEL_FREEtogetFMODtopickafreechannel.Otherwisespecifyachannelnumberfrom0tothe'maxchannels'valuespecifiedinSystem::initminus1.
sound
Pointertothesoundtoplay.ThisisopenedwithSystem::createSound.
paused
Trueorfalseflagtospecifywhethertostartthechannelpausedornot.Startingachannelpausedallowstheusertoalteritsattributeswithoutitbeingaudible,andunpausingwithChannel::setPausedactuallystartsthesound.
channel
Addressofachannelhandlepointerthatreceivesthenewlyplayingchannel.IfFMOD_CHANNEL_REUSEisused,thiscancontainapreviouslyusedchannelhandleandFMODwillre-useittoplayasoundon.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whenasoundisplayed,itwillusethesound'sdefaultfrequency,volume,pan,levelsandpriority.
AsounddefinedasFMOD_3Dwillbydefaultplayatthepositionofthelistener.
Tochangechannelattributesbeforethesoundisaudible,startthechannelpausedbysettingthepausedflagtotrue,andcallingtherelevantchannelbasedfunctions.Followingthat,unpausethechannelwithChannel::setPaused.
IfFMOD_CHANNEL_FREEisusedasthechannelindex,itwillpickanarbitraryfreechannelandusechannelmanagement.(Asdescribedbelow).IfFMOD_CHANNEL_REUSEisusedasthechannelindex,FMODExwillre-usethechannelhandlethatispassedinasthe'channel'parameter.IfNULLor0ispassedinasthechannelhandleitwillusethesamelogicasFMOD_CHANNEL_FREEandpickanarbitrarychannel.
Channelsarereferencecounted.IfachannelisstolenbytheFMODprioritysystem,thenthehandletothestolenvoicebecomesinvalid,andChannelbasedcommandswillnotaffectthenewsoundplayinginitsplace.Ifallchannelsarecurrentlyfullplayingasound,FMODwillstealachannelwiththelowestprioritysound.Ifmorechannelsareplayingthanarecurrentlyavailableonthesoundcard/sound
deviceorsoftwaremixer,thenFMODwill'virtualize'thechannel.Thistypeofchannelisnotheard,butitisupdatedasifitwasplaying.Whenitsprioritybecomeshighenoughoranothersoundstopsthatwasusingarealhardware/softwarechannel,itwillstartplayingfromwhereitshouldbe.ThistechniquesavesCPUtime(thousandsofsoundscanbeplayedatoncewithoutactuallybeingmixedortakingupresources),andalsoremovestheneedfortheusertomanagevoicesthemselves.Anexampleofvirtualchannelusageisadungeonwith100torchesburning,allwithaloopingcracklingsound,butwithasoundcardthatonlysupports32hardwarevoices.Ifthe3Dpositionsandprioritiesforeachtorcharesetcorrectly,FMODwillplayall100soundswithoutany'outofchannels'errors,andswaptherealvoicesinandoutaccordingtowhichtorchesareclosestin3Dspace.Priorityforvirtualchannelscanbechangedinthesound'sdefaults,oratruntimewithChannel::setPriority.
SeeAlso
FMOD_CHANNELINDEXSystem::createSoundChannel::setPausedChannel::setPrioritySound::setDefaultsSound::setVariationsSystem::init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::recordStartStartstherecordingenginerecordingtothespecifiedrecordingsound.
C++Syntax
FMOD_RESULTSystem::recordStart(
intid,
FMOD::Sound*sound,
boolloop
);
CSyntax
FMOD_RESULTFMOD_System_RecordStart(
FMOD_SYSTEM*system,
intid,
FMOD_SOUND*sound,
FMOD_BOOLloop
);
Parameters
id
EnumerateddriverID.ThismustbeinavalidrangedelimitedbySystem::getRecordNumDrivers.
sound
Usercreatedsoundfortheusertorecordto.
loop
Booleanflagtotelltherecordingenginewhethertocontinuerecordingtotheprovidedsoundfromthestartagain,afterithasreachedtheend.Ifthisissettotruethedatawillbecontinuallybeoverwrittenonceeveryloop.Seeremarks.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::recordStop
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::recordStopStopstherecordingenginefromrecordingtothespecifiedrecordingsound.
C++Syntax
FMOD_RESULTSystem::recordStop(
intid
);
CSyntax
FMOD_RESULTFMOD_System_RecordStop(
FMOD_SYSTEM*system,
intid
);
Parameters
id
EnumerateddriverID.ThismustbeinavalidrangedelimitedbySystem::getRecordNumDrivers.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::recordStart
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::registerCodecCreatesaninmemoryfileformatcodectobeusedbyFMODbypassinginacodecdescriptionstructure.Oncethisiscreated,FMODwilluseittoopenuserdefinedfileformats.
C++Syntax
FMOD_RESULTSystem::registerCodec(
FMOD_CODEC_DESCRIPTION*description,
unsignedint*handle,
unsignedintpriority
);
CSyntax
FMOD_RESULTFMOD_System_RegisterCodec(
FMOD_SYSTEM*system,
FMOD_CODEC_DESCRIPTION*description,
unsignedint*handle,
unsignedintpriority
);
Parameters
description
AddressofaFMOD_CODEC_DESCRIPTIONstructure,containinginformationaboutthecodec.
handle
Addressofavariabletoreceivethepluginhandleofthenewly-registeredcodec.
priority
Priorityofthecodeccomparedtoothercodecs.0=mostimportant.highernumbers=lessimportance.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThecodecsinternaltoFMODhavethefollowingpriorities.
Tag100
CDDA200
FSB300
DSP400
VAG500
Wav600
AT3700
OggVorbis800
Tremor900
AIFF1000
FLAC1100
MOD1200
S3M1300
XM1400
IT1500
MIDI1600
DLS1700
SF21800
ASF1900
XMA2000
XWMA2100
Playlist2200
MPEGPSP2300
MPEG2400
Raw2500
Note:Somecodecsareonlyforcertainplatforms,ieXMAisXbox360only.
SeeAlso
FMOD_CODEC_DESCRIPTION
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::registerDSPRegisterauser-definedDSPeffectforusewiththeSystem.Thisfunctionallowsyoutoregisterstatically-linkedDSPeffects.Onceregistered,youcancreateinstancesoftheDSPeffectbyusingSystem::createDSPByPlugin.
C++Syntax
FMOD_RESULTSystem::registerDSP(
FMOD_DSP_DESCRIPTION*description,
unsignedint*handle
);
CSyntax
FMOD_RESULTFMOD_System_RegisterDSP(
FMOD_SYSTEM*system,
FMOD_DSP_DESCRIPTION*description,
unsignedint*handle
);
Parameters
description
AddressofanFMOD_DSP_DESCRIPTIONstructure,containinginformationabouttheDSPeffect.
handle
Addressofavariabletoreceivethepluginhandleofthenewly-registeredDSPeffect.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_DSP_DESCRIPTIONSystem::createDSPByPluginSystem::getNumPluginsSystem::getPluginInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::releaseClosesandfreesasystemobjectanditsresources.
C++Syntax
FMOD_RESULTSystem::release();
CSyntax
FMOD_RESULTFMOD_System_Release(FMOD_SYSTEM*system);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctionalsocallsSystem::close,socallingclosebeforethisfunctionisnotnecessary.
SeeAlso
System_CreateSystem::initSystem::close
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::set3DListenerAttributesThisupdatestheposition,velocityandorientationofthespecified3Dsoundlistener.
C++Syntax
FMOD_RESULTSystem::set3DListenerAttributes(
intlistener,
constFMOD_VECTOR*pos,
constFMOD_VECTOR*vel,
constFMOD_VECTOR*forward,
constFMOD_VECTOR*up
);
CSyntax
FMOD_RESULTFMOD_System_Set3DListenerAttributes(
FMOD_SYSTEM*system,
intlistener,
constFMOD_VECTOR*pos,
constFMOD_VECTOR*vel,
constFMOD_VECTOR*forward,
constFMOD_VECTOR*up
);
Parameters
listener
ListenerIDinamulti-listenerenvironment.Specify0ifthereisonly1listener.
pos
Thepositionofthelistenerinworldspace,measuredindistanceunits.Youcanspecify0orNULLtonotupdatetheposition.
vel
Thevelocityofthelistenermeasuredindistanceunitspersecond.Youcanspecify0orNULLtonotupdatethevelocityofthelistener.
forward
Theforwardsorientationofthelistener.Thisvectormustbeofunitlengthandperpendiculartotheupvector.Youcanspecify0orNULLtonotupdatetheforwardsorientationofthelistener.
up
Theupwardsorientationofthelistener.Thisvectormustbeofunitlengthandperpendiculartotheforwardsvector.Youcanspecify0orNULLtonotupdatetheupwardsorientationofthelistener.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Bydefault,FMODusesaleft-handedco-ordinatesystem.Thismeans+Xisright,+Yisup,and+Zisforwards.Tochangethistoaright-handedcoordinatesystem,useFMOD_INIT_3D_RIGHTHANDED.Thismeans+Xisright,+Yisup,and+Zisbackwardsortowardsyou.
Tomaptoanothercoordinatesystem,flip/negateandexchangethesevalues.
OrientationvectorsareexpectedtobeofUNITlength.Thismeansthemagnitudeofthevectorshouldbe1.0.
A'distanceunit'isspecifiedbySystem::set3DSettings.Bydefaultthisissettometerswhichisadistancescaleof1.0.
Alwaysremembertouseunitspersecond,notunitsperframeasthisisacommonmistakeandwillmakethedopplereffectsoundwrong.
Forexample,Donotjustuse(pos-lastpos)fromthelastframe'sdataforvelocity,asthisisnotcorrect.Youneedtotimecompensateitsoitisgiveninunitspersecond.Youcouldalteryourpos-lastposcalculationtosomethinglikethis.
vel=(pos-lastpos)/time_taken_since_last_frame_in_seconds.
I.e.at60fpstheformulawouldlooklikethisvel=(pos-lastpos)/0.0166667.
SeeAlso
System::get3DListenerAttributesFMOD_INITFLAGSSystem::set3DSettingsSystem::get3DSettingsFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::set3DNumListenersSetsthenumberof3D'listeners'inthe3Dsoundscene.Thisfunctionisusefulmainlyforsplit-screengamepurposes.
C++Syntax
FMOD_RESULTSystem::set3DNumListeners(
intnumlisteners
);
CSyntax
FMOD_RESULTFMOD_System_Set3DNumListeners(
FMOD_SYSTEM*system,
intnumlisteners
);
Parameters
numlisteners
Numberoflistenersinthescene.Validvaluesarefrom1-4inclusive.Default=1.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifthenumberoflistenersissettomorethan1,thenpanninganddopplerareturnedoff.Allsoundeffectswillbemono.
FMODusesa'closestsoundtothelistener'methodtodeterminewhatshouldbeheardinthiscase.
SeeAlso
System::get3DNumListenersSystem::set3DListenerAttributes
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::set3DRolloffCallbackWhenFMODwantstocalculate3dvolumeforachannel,thiscallbackcanbeusedtooverridetheinternalvolumecalculationbasedondistance.
C++Syntax
FMOD_RESULTSystem::set3DRolloffCallback(
FMOD_3D_ROLLOFFCALLBACKcallback
);
CSyntax
FMOD_RESULTFMOD_System_Set3DRolloffCallback(
FMOD_SYSTEM*system,
FMOD_3D_ROLLOFFCALLBACKcallback
);
Parameters
callback
PointertoaCfunctionoftypeFMOD_3D_ROLLOFFCALLBACK,thatisusedtooverridetheFMODvolumecalculation.Defaultis0orNULL.Settingthecallbacktonullwillreturn3dcalculationbacktoFMOD.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctionoverridesFMOD_3D_INVERSEROLLOFF,
FMOD_3D_LINEARROLLOFF,FMOD_3D_LINEARSQUAREROLLOFF,FMOD_3D_CUSTOMROLLOFF.ToallowFMODtocalculatethe3dvolumeagain,use0orNULLasthecallback.
NOTE:Whenusingtheeventsystem,callChannel::getUserDatafromyourFMOD_3D_ROLLOFFCALLBACKtogettheeventinstancehandleoftheeventthatspawnedthechannelinquestion.
SeeAlso
FMOD_3D_ROLLOFFCALLBACKSystem::set3DListenerAttributesSystem::get3DListenerAttributesChannel::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::set3DSettingsSetstheglobaldopplerscale,distancefactorandlogrolloffscaleforall3DsoundinFMOD.
C++Syntax
FMOD_RESULTSystem::set3DSettings(
floatdopplerscale,
floatdistancefactor,
floatrolloffscale
);
CSyntax
FMOD_RESULTFMOD_System_Set3DSettings(
FMOD_SYSTEM*system,
floatdopplerscale,
floatdistancefactor,
floatrolloffscale
);
Parameters
dopplerscale
Scalingfactorfordopplershift.Default=1.0.
distancefactor
RelativedistancefactortoFMOD'sunits.Default=1.0.(1.0=1metre).
rolloffscale
Scalingfactorfor3DsoundrollofforattenuationforFMOD_3D_INVERSEROLLOFFbasedsoundsonly(whichisthedefaulttype).Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thedopplerscaleisageneralscalingfactorforhowmuchthepitchvariesduetodopplershiftingin3Dsound.Doppleristhepitchbendingeffectwhenasoundcomestowardsthelistenerormovesawayfromit,muchliketheeffectyouhearwhenatraingoespastyouwithitshornsounding.With"dopplerscale"youcanexaggerateordiminishtheeffect.FMOD'seffectivespeedofsoundatadopplerfactorof1.0is340m/s.
ThedistancefactoristheFMOD3Denginerelativedistancefactor,comparedto1.0meters.Anotherwaytoputitisthatitequatesto"howmanyunitspermeterdoesyourenginehave".Forexample,ifyouareusingfeetthen"scale"wouldequal3.28.
Note!Thisonlyaffectsdoppler!Ifyoukeepyourmin/maxdistance,customrolloffcurvesandpositionsinscalerelativetoeachotherthevolumerolloffwillnotchange.Ifyousetthis,themindistanceofasoundwillautomaticallysetitselftothisvaluewhenitiscreatedincasetheuserforgetstosetthemindistancetomatchthenewdistancefactor.
TherolloffscalesetstheglobalattenuationrollofffactorforFMOD_3D_INVERSEROLLOFFbasedsoundsonly(whichisthedefault).VolumeforasoundsettoFMOD_3D_INVERSEROLLOFFwillscaleatmindistance/distance.Thisgivesaninverseattenuationofvolumeasthesourcegetsfurtheraway(orcloser).Settingthisvaluemakesthesounddropofffasterorslower.Thehigherthevalue,thefastervolumewillattenuate,andconverselythelowerthevalue,thesloweritwillattenuate.Forexamplearollofffactorof1willsimulatetherealworld,whereasavalueof2willmakesoundsattenuate2timesquicker.
Note!"rolloffscale"hasnoeffectwhenusingFMOD_3D_LINEARROLLOFF,FMOD_3D_LINEARSQUAREROLLOFForFMOD_3D_CUSTOMROLLOFF.
SeeAlso
System::get3DSettingsSound::set3DMinMaxDistanceSound::get3DMinMaxDistanceChannel::set3DAttributesChannel::get3DAttributes
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::set3DSpeakerPositionThisfunctionallowstheusertospecifythepositionoftheiractualphysicalspeakertoaccountfornonstandardsetups.Italsoallowstheusertodisablespeakersfrom3Dconsiderationinagame.Thefuntionisfordescribingthe'realworld'speakerplacementtoprovideamorenaturalpanningsolutionfor3dsound.Graphicalconfigurationscreensinanapplicationcoulddrawiconsforspeakerplacementthattheusercouldpositionattheirwill.
C++Syntax
FMOD_RESULTSystem::set3DSpeakerPosition(
FMOD_SPEAKERspeaker,
floatx,
floaty,
boolactive
);
CSyntax
FMOD_RESULTFMOD_System_Set3DSpeakerPosition(
FMOD_SYSTEM*system,
FMOD_SPEAKERspeaker,
floatx,
floaty,
FMOD_BOOLactive
);
Parameters
speaker
Theselectedspeakerofinteresttoposition.
x
The2DXoffsetinrelationtothelisteningposition.Forexample-1.0wouldmeanthespeakerisontheleft,and+1.0wouldmeanthespeakerisontheright.0.0isthespeakerisinthemiddle.
y
The2DYoffsetinrelationtothelisteningposition.Forexample-1.0wouldmeanthespeakerisbehindthelistener,and+1wouldmeanthespeakerisinfrontofthelistener.
active
Enablesordisablesspeakerfrom3Dconsideration.Usefulfordisablingcenterspeakerforvocalsforexample,ortheLFE.xandycanbeanythinginthiscase.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!Thisonlyaffectssoftwaremixed3dsounds,createdwithFMOD_SOFTWAREandFMOD_3D.
Atypical7.1setupwouldlooklikethis.
system->set3DSpeakerPosition(FMOD_SPEAKER_FRONT_LEFT,-1.0f,1.0f,true);
system->set3DSpeakerPosition(FMOD_SPEAKER_FRONT_RIGHT,1.0f,1.0f,true);
system->set3DSpeakerPosition(FMOD_SPEAKER_FRONT_CENTER,0.0f,1.0f,true);
system->set3DSpeakerPosition(FMOD_SPEAKER_LOW_FREQUENCY,0.0f,0.0f,true);
system->set3DSpeakerPosition(FMOD_SPEAKER_BACK_LEFT,-1.0f,-1.0f,true);
system->set3DSpeakerPosition(FMOD_SPEAKER_BACK_RIGHT,1.0f,-1.0f,true);
system->set3DSpeakerPosition(FMOD_SPEAKER_SIDE_LEFT,-1.0f,0.0f,true);
system->set3DSpeakerPosition(FMOD_SPEAKER_SIDE_RIGHT,1.0f,0.0f,true);
Atypicalstereosetupwouldlooklikethis.
system->set3DSpeakerPosition(FMOD_SPEAKER_FRONT_LEFT,-1.0f,0.0f,true);
system->set3DSpeakerPosition(FMOD_SPEAKER_FRONT_RIGHT,1.0f,0.0f,true);
Youcouldusethisfunctiontomakesoundsinfrontofyourcomeoutof
differentphysicalspeakers.IfyouspecifiedforexamplethatFMOD_SPEAKER_SIDE_RIGHTwasinfrontofyouat<0.0,1.0>andyouorganizedtheotherspeakersaccordinglythe3daudiowouldcomeoutofthesiderightspeakerwhenitwasinfrontinsteadofthedefaultwhichisonlytotheside.Thisfunctionisalsousefulifspeakersarenot'perfectlysymmetrical'.Forexampleifthecenterspeakerwasclosertothefrontleftthanthefrontright,thisfunctioncouldbeusedtopositionthatcenterspeakeraccordinglyandFMODwouldskewthepanningappropriatelytomakeitsoundcorrectagain.
The2dcoordinatesusedareonlyusedtogenerateangleinformation.Size/distancedoesnotmatterinFMOD'simplementationbecauseitisnotFMOD'sjobtoattenuateoramplifythesignalbasedonspeakerdistance.Ifitamplifiedthesignalinthedigitaldomaintheaudiocouldclip/becomedistorted.Itisbettertousetheamplifier'sanaloguelevelcapabilitiestobalancespeakervolumes.CallingSystem::setSpeakerModeoverridesthesevalues,sothisfunctionmustbecalledafterthis.
SeeAlso
System::get3DSpeakerPositionSystem::setSpeakerModeFMOD_SPEAKERMODEFMOD_SPEAKER
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setAdvancedSettingsSetsadvancedfeatureslikeconfiguringmemoryandcpuusageforFMOD_CREATECOMPRESSEDSAMPLEusage.
C++Syntax
FMOD_RESULTSystem::setAdvancedSettings(
FMOD_ADVANCEDSETTINGS*settings
);
CSyntax
FMOD_RESULTFMOD_System_SetAdvancedSettings(
FMOD_SYSTEM*system,
FMOD_ADVANCEDSETTINGS*settings
);
Parameters
settings
PointertoFMOD_ADVANCEDSETTINGSstructure.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_ADVANCEDSETTINGSSystem::getAdvancedSettingsFMOD_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setCallbackSetsasystemcallbacktocatchvariousfatalorinformationalevents.
C++Syntax
FMOD_RESULTSystem::setCallback(
FMOD_SYSTEM_CALLBACKcallback
);
CSyntax
FMOD_RESULTFMOD_System_SetCallback(
FMOD_SYSTEM*system,
FMOD_SYSTEM_CALLBACKcallback
);
Parameters
callback
Pointertoacallbacktoreceivetheeventcallbackwhenithappens.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Systemcallbacksarenotasynchronousandareboundbythelatencycausedbytheratetheusercallstheupdatecommand.
Callbacksarestdcall.UseF_CALLBACKinbetweenyourreturntypeand
functionname.Example:
FMOD_RESULTF_CALLBACKsystemcallback(FMOD_SYSTEM*system,FMOD_SYSTEM_CALLBACKTYPE
{
FMOD::System*sys=(FMOD::System*)system;
switch(type)
{
caseFMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGED:
{
intnumdrivers;
printf("NOTE:FMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGED
sys->getNumDrivers(&numdrivers;);
printf("Numdevices=%d\n",numdrivers);
break;
}
caseFMOD_SYSTEM_CALLBACKTYPE_MEMORYALLOCATIONFAILED:
{
printf("ERROR:FMOD_SYSTEM_CALLBACKTYPE_MEMORYALLOCATIONFAILED
printf("%s.\n",commanddata1);
printf("%dbytes.\n",commanddata2);
break;
}
caseFMOD_SYSTEM_CALLBACKTYPE_THREADCREATED:
{
printf("NOTE:FMOD_SYSTEM_CALLBACKTYPE_THREADCREATEDoccured.\n");
printf("ThreadID=%d\n",(int)commanddata1);
printf("ThreadName=%s\n",(char*)commanddata2);
break;
}
caseFMOD_SYSTEM_CALLBACKTYPE_BADDSPCONNECTION:
{
FMOD::DSP*source=(FMOD::DSP*)commanddata1;
FMOD::DSP*dest=(FMOD::DSP*)commanddata2;
printf("ERROR:FMOD_SYSTEM_CALLBACKTYPE_BADDSPCONNECTION
if(source)
{
charname[256];
source->getInfo(name,0,0,0,0);
printf("SOURCE=%s\n",name);
}
if(dest)
{
charname[256];
dest->getInfo(name,0,0,0,0);
printf("DEST=%s\n",name);
}
break;
}
}
returnFMOD_OK;
}
SeeAlso
System::updateFMOD_SYSTEM_CALLBACKFMOD_SYSTEM_CALLBACKTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setDSPBufferSizeSetstheFMODinternalmixingbuffersize.Thisfunctionisusedifyouneedtocontrolmixerlatencyorgranularity.Smallerbuffersizesleadtosmallerlatency,butcanleadtostuttering/skipping/instablesoundonslowermachinesorsoundcardswithbaddrivers.
C++Syntax
FMOD_RESULTSystem::setDSPBufferSize(
unsignedintbufferlength,
intnumbuffers
);
CSyntax
FMOD_RESULTFMOD_System_SetDSPBufferSize(
FMOD_SYSTEM*system,
unsignedintbufferlength,
intnumbuffers
);
Parameters
bufferlength
Themixerengineblocksizeinsamples.Usethistoadjustmixerupdategranularity.Default=1024.(milliseconds=1024at48khz=1024/48000*1000=21.33ms).Thismeansthemixerupdatesevery21.33ms.
numbuffers
Themixerenginenumberofbuffersused.Usethistoadjustmixerlatency.Default=4.Togetthetotalbuffersizemultiplythebufferlengthbythenumbuffersvalue.Bydefaultthiswouldbe4*1024.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
TheFMODsoftwaremixermixestoaringbuffer.Thesizeofthisringbufferisdeterminedhere.Itmixesablockofsounddataevery'bufferlength'numberofsamples,andthereare'numbuffers'numberoftheseblocksthatmakeuptheentireringbuffer.Adjustingthesevaluescanleadtoextremelylowlatencyperformance(smallervalues),orgreaterstabilityinsoundoutput(largervalues).
Warning!The'buffersize'isgenerallybestleftalone.MakingthegranularitysmallerwilljustincreaseCPUusage(cachemissesandDSPnetworkoverhead).Makingitlargeraffectshowoftenyouhearcommandsupdatesuchasvolume/pitch/panchanges.Anythingabove20mswillbenoticableandsoundparameterchangeswillbeobviousinsteadofsmooth.
FMODchoosesthemostoptimalsizebydefaultforbeststability,dependingontheoutputtype,andifthedriversareemulatedornot(forexampleDirectSoundisemulatedusingwaveOutonNT).Itisnotrecommendedchangingthisvalueunlessyoureallyneedto.YoumaygetworseperformancethanthedefaultsettingschosenbyFMOD.
Toconvertfrommillisecondsto'samples',simplymultiplythevalueinmillisecondsbythesamplerateoftheoutput(ie48000ifthatiswhatitissetto),thendivideby1000.
Thevaluesinmillisecondsandaveragelatencyexpectedfromthesettingscanbecalculatedusingthefollowingcode.
FMOD_RESULTresult;
unsignedintblocksize;
intnumblocks;
floatms;
result=system->getDSPBufferSize(&blocksize;,&numblocks;);
result=system->getSoftwareFormat(&frequency;,0,0,0,0);
ms=(float)blocksize*1000.0f/(float)frequency;
printf("Mixerblocksize=%.02fms\n",ms);
printf("MixerTotalbuffersize=%.02fms\n",ms*numblocks);
printf("MixerAverageLatency=%.02fms\n",ms*((float)numblocks-1.5f));
Platformnotes:Someoutputmodes(suchasFMOD_OUTPUTTYPE_ASIO)willchangethebuffersizetomatchtheirowninternaloptimalbuffersize.UseSystem::getDSPBufferSizeaftercallingSystem::inittoseeifthisisthecase.Linuxoutputmodeswillignorenumbuffersandjustwritethebuffersizetotheoutputeverytimeitcan.Itdoesnotusearingbuffer.Xbox360defaultsto256samplebuffersizeand4fornumblocks.Thisgivesa5.333msgranularitywithroughlya10-15mslatency.PS3ignoresthisfunction.CheckFMOD_PS3_EXTRADRIVERDATAtocontroloutputlatency.ThisfunctioncannotbecalledafterFMODisalreadyactivatedwithSystem::init.ItmustbecalledbeforeSystem::init,orafterSystem::close.
SeeAlso
System::getDSPBufferSizeSystem::getSoftwareFormatSystem::initSystem::close
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setDriverSelectsasoundcarddriver.Thisfunctionisusedwhenanoutputmodehasenumeratedmorethanoneoutputdevice,andyouneedtoselectbetweenthem.
C++Syntax
FMOD_RESULTSystem::setDriver(
intdriver
);
CSyntax
FMOD_RESULTFMOD_System_SetDriver(
FMOD_SYSTEM*system,
intdriver
);
Parameters
driver
Drivernumbertoselect.0=primaryormainsounddeviceasselectedbytheoperatingsystemsettings.UseSystem::getNumDriverstoselectaspecificdevice.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
IfthisfunctioniscalledafterFMODisalreadyinitializedwithSystem::init,the
currentdriverwillbeshutdownandthenewlyselecteddriverwillbeinitialized/started.
WhenswitchingoutputdriverafterSystem::initthereareafewconsiderationstomake:
AllsoundsmustbecreatedwithFMOD_SOFTWARE,creatingevenoneFMOD_HARDWAREsoundwillcausethisfunctiontoreturnFMOD_ERR_NEEDSSOFTWARE.
Thedriverthatyouwishtochangetomustsupportthecurrentoutputformat,samplerate,andnumberofchannels.Ifitdoesnot,FMOD_ERR_OUTPUT_INITisreturnedanddriverstateiscleared.YoushouldnowcallSystem::setDriverwithyouroriginaldriverindextorestoredriverstate(providingthatdriverisstillavailable/connected)ormakeanotherselection.
SeeAlso
System::getDriverSystem::getNumDriversSystem::getDriverInfoSystem::setOutputSystem::initSystem::close
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setFileSystemSpecifyusercallbacksforFMOD'sinternalfilemanipulationfunctions.IfANYofthecallbackfunctionsaresetto0/NULL,thenFMODwillswitchbacktoitsownfileroutines.ThisfunctionisusefulforreplacingFMOD'sfilesystemwithagamesystem'sownfilereadingAPI.
C++Syntax
FMOD_RESULTSystem::setFileSystem(
FMOD_FILE_OPENCALLBACKuseropen,
FMOD_FILE_CLOSECALLBACKuserclose,
FMOD_FILE_READCALLBACKuserread,
FMOD_FILE_SEEKCALLBACKuserseek,
FMOD_FILE_ASYNCREADCALLBACKuserasyncread,
FMOD_FILE_ASYNCCANCELCALLBACKuserasynccancel,
intblockalign
);
CSyntax
FMOD_RESULTFMOD_System_SetFileSystem(
FMOD_SYSTEM*system,
FMOD_FILE_OPENCALLBACKuseropen,
FMOD_FILE_CLOSECALLBACKuserclose,
FMOD_FILE_READCALLBACKuserread,
FMOD_FILE_SEEKCALLBACKuserseek,
FMOD_FILE_ASYNCREADCALLBACKuserasyncread,
FMOD_FILE_ASYNCCANCELCALLBACKuserasynccancel,
intblockalign
);
Parameters
useropen
Callbackforopeningafile.Specifying0/nullwilldisablefilecallbacks.
userclose
Callbackforclosingafile.Specifying0/nullwilldisablefilecallbacks.
userread
Callbackforreadingfromafile.Specifying0/nullwilldisablefilecallbacksifuserasyncreadisalso0/null.Usercoulduseuserasyncreadinsteadofuserread.
userseek
Callbackforseekingwithinafile.Specifying0/nullwilldisablefilecallbacks.Usercoulduseuserasyncreadinsteadofuserseek.
userasyncread
OPTIONAL-Callbacktoreplace'userread'and'userseek'thatallowstheusertodeferfileaccesstoalatertimeandreturnimmediately.FMODwillinternallywaitfordatatoappear,orinafilestreamingcase-stutter/starveifdataisnotfedtofmodintime.Setto0/nulltogetnormalfilecallbackoperation.
userasynccancel
OPTIONAL-Callbackforcancellingpendinguserfileaccesses.Thiswillbecalledifasoundisreleased,sotheusercancancelanypendingfileaccesses.Ifthesoundisreleasedandadeferredreadhappensintoareleasedbuffer,theapplicationwillcrash.Thiscallbackmustbeusedtomakesurethisdoesn'thappen.Setto0/nulltogetnormalfilecallbackoperation.
blockalign
Internalminimumfileblockalignment.FMODwillreaddatainatleastchunksofthissizeifyouaskitto.Specifying0meansthereisnofilebufferingatall(thiscouldadverselyaffectstreaming).DoNOTmakethisalargevalue,itispurelyasettingforminimumsectorsizealignmenttoaidseekingandreadingoncertainmedia.Itisnotforstreambuffersizes,thatiswhatSystem::setStreamBufferSizeisfor.Itisrecommenedjusttopass-1.Largevaluesjustmeanlargememoryusagewithnobenefit.Specify-1tonotsetthisvalue.Default=2048.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThishasnoeffectonsoundsloadedwithFMOD_OPENMEMORYorFMOD_CREATEUSER.
Thisfunctioncanbeusedtosetuserfilecallbacks,orifrequired,theycanbeturnedoffbyspecifying0forallcallbacks.Thisfunctioncanbeusedpurelytosetthe'buffersize'parameter,andignorethecallbackaspectofthefunction.
Warning:Thisfunctioncancauseunpredictablebehaviourifnotusedproperly.Youmustreturntherightvalues,andeachcommandmustworkproperly,orFMODwillnotfunction,oritmayevencrashifyougiveitinvaliddata.YoumustalsoreturnFMOD_ERR_FILE_EOFfromareadcallbackifthenumberofbytesreadissmallerthanthenumberofbytesrequested.
FMOD'sdefaultfilsystembuffersreadsevery2048bytesbydefault.ThismeanseverytimefmodreadsonebytefromtheAPI(sayifitwasparsingafileformat),itsimplymemcopiesthebytefromthe2kmemorybuffer,andeverytimeitneedsto,refreshesthe2kbufferresultinginadrasticreductioninfileI/O.Largereadsgostraighttothepointerinsteadofthe2kbufferifitisbufferaligned.Thisvaluecanbeincreasedordecreasedbytheuser.Abufferof0meansallreadsgodirectlytothepointerspecified.2048bytesisthesizeofaCDsectoronmostCDISOformatssoitischosenasthedefault,foroptimalreadingspeedfromCDmedia.
NOTE!DonotforceacastfromyourfunctionpointertotheFMOD_FILE_xxxCALLBACKtype!Nevertryto'force'fmodtoacceptyourfunction.Ifthereisanerrorthenfindoutwhatitis.RemembertoincludeF_CALLBACKbetweenthereturntypeandthefunctionname,thisequatestostdcallwhichyoumustincludeotherwise(besidesnotcompiling)itwillcause
problemssuchascrashingandcallbacksnotbeingcalled.
NOTE!Yourfilecallbacksmustbethreadsafe.Ifnotunexpectedbehaviourmayoccur.FMODcallsfilefunctionsfromasynchronousthreads,suchasthestreamingthread,andthreadrelatedtoFMOD_NONBLOCKINGflag.
Asynchronousfileaccess(userasyncread/userasynccanel).For'userasyncread'and'userasynccancel'usage,seethe'asyncio'exampleintheFMODexamplesfolder.Thereisalsoatutorialinthedocumentation.Ifuserasyncreadcallbackisspecified-userreadanduserseekwillnotbecalledatall,sotheycanbesetto0/null.userasyncreadallowstheusertoreturnimmediatelybeforethedataisready.FMODwilleitherwaitinternally(seenotebelowaboutthreadsafety),orpollinthestreameruntildataarrives.Itistheuser'sresponsibilitytoprovidedataintimeinthestreamcase,orthestreammaystutter.DatastarvationcanbedetectedwithSound::getOpenState.NOTE:Ifuserasyncreadisprocessedinthemainthread,thenitwillhangtheapplication,becauseFMODwillwaitinternallyuntildataisready,andthemainthreadprocesswillnotbeabletosupplythedata.Forthisreasontheuser'sfileaccessshouldnormallybefromaseparatethread.
SeeAlso
System::initSystem::attachFileSystemSound::getOpenStateFMOD_FILE_OPENCALLBACKFMOD_FILE_CLOSECALLBACKFMOD_FILE_READCALLBACKFMOD_FILE_SEEKCALLBACKFMOD_FILE_ASYNCREADCALLBACKFMOD_FILE_ASYNCCANCELCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setGeometrySettingsSetsthemaximumworldsizeforthegeometryengineforperformance/precisionreasons.
C++Syntax
FMOD_RESULTSystem::setGeometrySettings(
floatmaxworldsize
);
CSyntax
FMOD_RESULTFMOD_System_SetGeometrySettings(
FMOD_SYSTEM*system,
floatmaxworldsize
);
Parameters
maxworldsize
Maximumsizeoftheworldfromthecenterpointtotheedgeusingthesameunitsusedinother3Dfunctions.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Settingmaxworldsizeshouldbedonefirstbeforecreatinganygeometry.Itcanbedoneanytimeafterwardsbutmaybeslowinthiscase.
Objectsorpolygonsoutsidetherangeofmaxworldsizewillnotbehandledefficiently.Conversely,ifmaxworldsizeisexcessivelylarge,thestructuremaylooseprecisionandefficiencymaydrop.
SeeAlso
System::createGeometrySystem::getGeometrySettings
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setHardwareChannelsThisfunctionallowstheusertorequesthowmanyhardwaremixedchannelswillbeacquiredduringSystem::init.
C++Syntax
FMOD_RESULTSystem::setHardwareChannels(
intnumhardwarechannels
);
CSyntax
FMOD_RESULTFMOD_System_SetHardwareChannels(
FMOD_SYSTEM*system,
intnumhardwarechannels
);
Parameters
numhardwarechannels
MaximumnumberofhardwarevoicestobeusedbyFMOD.Thisclampsthepolyphonyofhardwarevoicestoauserspecifiednumber.Thiscouldbeusedtolimitthenumberofhardwarevoicespossibleatoncesothatitdoesn'tsoundnoisy.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctioncannotbecalledafterFMODisalreadyactivatedwithSystem::init.ItmustbecalledbeforeSystem::init,orafterSystem::close.
SeeAlso
System::getHardwareChannelsSystem::initSystem::close
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setNetworkProxySetaproxyservertouseforallsubsequentinternetconnections.
C++Syntax
FMOD_RESULTSystem::setNetworkProxy(
constchar*proxy
);
CSyntax
FMOD_RESULTFMOD_System_SetNetworkProxy(
FMOD_SYSTEM*system,
constchar*proxy
);
Parameters
proxy
Thenameofaproxyserverinhost:portformate.g.www.fmod.org:8888(defaultstoport80ifnoportisspecified).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Basicauthenticationissupported.Touseit,thisparametermustbeinuser:password@host:portformate.g.bob:[email protected]:8888Setthisparameterto0/NULLifnoproxyisrequired.
SeeAlso
System::getNetworkProxy
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setNetworkTimeoutSetthetimeoutfornetworkstreams.
C++Syntax
FMOD_RESULTSystem::setNetworkTimeout(
inttimeout
);
CSyntax
FMOD_RESULTFMOD_System_SetNetworkTimeout(
FMOD_SYSTEM*system,
inttimeout
);
Parameters
timeout
Thetimeoutvalueinms.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::getNetworkTimeout
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setOutputThisfunctionselectstheoutputmodefortheplatform.ThisisforselectingdifferentOSspecificAPIswhichmighthavedifferentfeatures.
C++Syntax
FMOD_RESULTSystem::setOutput(
FMOD_OUTPUTTYPEoutput
);
CSyntax
FMOD_RESULTFMOD_System_SetOutput(
FMOD_SYSTEM*system,
FMOD_OUTPUTTYPEoutput
);
Parameters
output
Outputtypetoselect.Seetypelistfordifferentoutputtypesyoucanselect.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisnotnecessarytocall.Itisonlyifyouwanttospecificallyswitchawayfromthedefaultoutputmodefortheoperatingsystem.Themostoptimalmodeisselectedbydefaultfortheoperatingsystem.Forexample
FMOD_OUTPUTTYPE_DSOUNDisselectedonalloperatingsystemsexceptforWindowsNT,whereFMOD_OUTPUTTYPE_WINMMisselectedbecauseitislowerlatency/faster.
ThisfunctioncannotbecalledafterFMODisalreadyactivatedwithSystem::init.ItmustbecalledbeforeSystem::init,orafterSystem::close.
SeeAlso
FMOD_OUTPUTTYPESystem::initSystem::close
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setOutputByPluginSelectsanoutputtypebasedontheenumeratedlistofoutputsincludingFMODand3rdpartyoutputplugins.
C++Syntax
FMOD_RESULTSystem::setOutputByPlugin(
unsignedinthandle
);
CSyntax
FMOD_RESULTFMOD_System_SetOutputByPlugin(
FMOD_SYSTEM*system,
unsignedinthandle
);
Parameters
handle
Handletoapre-existingoutputplugin.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctioncannotbecalledafterFMODisalreadyactivatedwithSystem::init.ItmustbecalledbeforeSystem::init.
SeeAlso
System::getNumPluginsSystem::getOutputByPluginSystem::setOutputSystem::initSystem::close
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setPluginPathSpecifyabasesearchpathforpluginssotheycanbeplacedsomewhereelsethanthedirectoryofthemainexecutable.
C++Syntax
FMOD_RESULTSystem::setPluginPath(
constchar*path
);
CSyntax
FMOD_RESULTFMOD_System_SetPluginPath(
FMOD_SYSTEM*system,
constchar*path
);
Parameters
path
Acharacterstringcontainingacorrectlyformattedpathtoloadpluginsfrom.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
The'plugin'versionofFMODreliesonplugins,sowhenSystem::initiscalledittriestoloadallFMODregisteredplugins.Thispathiswhereitwillattempttoloadfrom.
SeeAlso
System::loadPluginSystem::init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setReverbAmbientPropertiesSetsa'background'defaultreverbenvironmentforthevirtualreverbsystem.Thisisareverbpresetthatwillbemorphedtoifthelistenerisnotwithinanyvirtualreverbzones.Bydefaulttheambientreverbissetto'off'.
C++Syntax
FMOD_RESULTSystem::setReverbAmbientProperties(
FMOD_REVERB_PROPERTIES*prop
);
CSyntax
FMOD_RESULTFMOD_System_SetReverbAmbientProperties(
FMOD_SYSTEM*system,
FMOD_REVERB_PROPERTIES*prop
);
Parameters
prop
AddressofaFMOD_REVERB_PROPERTIESstructurecontainingthesettingsforthedesiredambientreverbsetting.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThereisonereverbDSPdedicatedtoprovidinga3Dreverbeffect.ThisDSP'spropertiesareaweightedsumofallthecontributingvirtualreverbs.Thedefault3dreverbpropertiesspecifythereverbpropertiesinthe3Dvolumeswhichhasnovirtualreverbsdefined.NoteaboutphsyicalSFXReverbDSPunitallocation.ToremovetheDSPunitandtheassociatedCPUcost,makesureall3d3dreverbobjectsarereleased,andtheambientreverbbackgroundpropertyissettoOFF(environment=-1).Ifeithera3dreverbzoneisstillpresentortheambientsettingisnotoff,theSFXReverbDSPunitwillremainactive.Simplycreating1reverbobject,orsettingtheambientstatetosomethingotherthanOFF,anSFXReverbDSPunitwillbecreatedaninsertedbackintotheDSPnetwork.Theusermaywishtoavoidasuddencutoutofreverbbyleavingtheambientsettingactiveforawhile.Makesuretoreleaseallobjectsandsettheambientreverbsettingtoofftogetapropercleanup.
SeeAlso
FMOD_REVERB_PROPERTIESSystem::getReverbAmbientPropertiesSystem::createReverb
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setReverbPropertiesSetsparametersfortheglobalreverbenvironment.Reverbparameterscanbesetmanually,orautomaticallyusingthepre-definedpresetsgiveninthefmod.hheader.
C++Syntax
FMOD_RESULTSystem::setReverbProperties(
constFMOD_REVERB_PROPERTIES*prop
);
CSyntax
FMOD_RESULTFMOD_System_SetReverbProperties(
FMOD_SYSTEM*system,
constFMOD_REVERB_PROPERTIES*prop
);
Parameters
prop
AddressofanFMOD_REVERB_PROPERTIESstructurewhichdefinestheattributesforthereverb.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!Itisimportanttospecifythe'Instance'valueinthe
FMOD_REVERB_PROPERTIESstructurecorrectly,otherwiseyouwillgetanFMOD_ERR_REVERB_INSTANCEerror.
SeeAlso
FMOD_REVERB_PROPERTIESSystem::getReverbPropertiesChannel::setReverbPropertiesChannel::getReverbProperties
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setSoftwareChannelsSetsthemaximumnumberofsoftwaremixedchannelspossible.SoftwaremixedvoicesareusedbysoundsloadedwithFMOD_SOFTWARE.
C++Syntax
FMOD_RESULTSystem::setSoftwareChannels(
intnumsoftwarechannels
);
CSyntax
FMOD_RESULTFMOD_System_SetSoftwareChannels(
FMOD_SYSTEM*system,
intnumsoftwarechannels
);
Parameters
numsoftwarechannels
ThemaximumnumberofFMOD_SOFTWAREmixablevoicestobeallocatedbyFMOD.Ifyoudon'trequiresoftwaremixedvoicesspecify0.Default=32.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
32voicesareallocatedbydefaulttobeplayedsimultaneouslyinsoftware.Toturnoffthesoftwaremixercompletelyincludinghardwareresourcesusedfor
thesoftwaremixer,specifyFMOD_INIT_SOFTWARE_DISABLEinSystem::init.
ThisfunctioncannotbecalledafterFMODisalreadyactivatedwithSystem::init.ItmustbecalledbeforeSystem::init,orafterSystem::close.
SeeAlso
FMOD_MODEFMOD_INITFLAGSSystem::initSystem::closeSystem::getSoftwareChannels
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setSoftwareFormatSetstheoutputformatforthesoftwaremixer.Thisincludesthebitdepth,samplerateandnumberofoutputchannels.Donotcallthisunlessyouexplicitywanttochangesomething.Callingthiscouldhaveadverseimpactontheperformanceandpanningbehaviour.
C++Syntax
FMOD_RESULTSystem::setSoftwareFormat(
intsamplerate,
FMOD_SOUND_FORMATformat,
intnumoutputchannels,
intmaxinputchannels,
FMOD_DSP_RESAMPLERresamplemethod
);
CSyntax
FMOD_RESULTFMOD_System_SetSoftwareFormat(
FMOD_SYSTEM*system,
intsamplerate,
FMOD_SOUND_FORMATformat,
intnumoutputchannels,
intmaxinputchannels,
FMOD_DSP_RESAMPLERresamplemethod
);
Parameters
samplerate
Thesoundcard'soutputrate.default=48000.
format
Thesoundcard'soutputformat.default=FMOD_SOUND_FORMAT_PCM16.
numoutputchannels
Thenumberofoutputchannels/speakerstoinitializethesoundcardto.0=keepspeakermodesetting(setwithSystem::setSpeakerMode).Ifanythingelsethan0isspecifiedthenthespeakermodewillbeoverridenandwillbecomeFMOD_SPEAKERMODE_RAW,meaninglogicalspeakerassignments(asdefinedinFMOD_SPEAKER)becomeinnefectiveandcannotbeused.Channel::setPanwillalsofail.Default=2(FMOD_SPEAKERMODE_STEREO).
maxinputchannels
Optional.Specify0toignore.Default=6.Maximumchannelcountinloaded/createdsoundstobesupported.Thisisherepurelyformemoryconsiderationsandaffectshowmuchmemoryisusedinthesoftwaremixerwhenallocatingmatricesforpanning.Donotconfusethiswithrecording,oranythingtodowithhowmanyvoicesyoucanplayatonce.Thisispurelyforsettingthelargesttypeofsoundyoucanplay(ie1=mono,2=stereo,etc.).Mostofthetimetheuserwillnotplaysoundsanylargerthanmonoorstereo,sosettingthisto2wouldsavememoryandcovermostsoundsthatareplayable.
resamplemethod
Softwareengineresamplingmethod.default=FMOD_DSP_RESAMPLER_LINEAR.SeeFMOD_DSP_RESAMPLERfordifferenttypes.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!Thesettingsinthisfunctionmaybeoverridenbytheoutputmode.FMOD_OUTPUTTYPE_ASIOwillalwayschangetheoutputmodetoFMOD_SOUND_FORMAT_PCMFLOATtobecompatiblewiththeoutput
formatsselectablebytheASIOcontrolpanel.FMOD_OUTPUTTYPE_ASIOwillalsochangethesampleratespecifiedbytheusertotheoneselectedintheASIOcontrolpanel.UseSystem::getSoftwareFormatafterSystem::inittodeterminewhattheoutputhaspossiblychangedtheformatto.CallitafterSystem::init.
Itisdependantontheoutputwhetheritwillforceaformatchangeandoverridethesesettingsornot.
IftheoutputdoesnotsupporttheoutputmodespecifiedSystem::initwillfail,andyouwillhavetotryanothersetting.
Note!Whenthisfunctioniscalledwithaoutputchannelcountgreaterthan0,thespeakermodeissettoFMOD_SPEAKERMODE_RAW.FMODdoesnotknowwhenyouspecifyanumberofoutputchannelswhattypeofspeakersystemitisconnectedto,soChannel::setPanorChannel::setSpeakerMixwillthenfailtowork.CallingSystem::setSpeakerModewilloverridetheoutputchannelspeakercount.
ThisfunctioncannotbecalledafterFMODisalreadyactivatedwithSystem::init.ItmustbecalledbeforeSystem::init,orafterSystem::close.
SeeAlso
System::getSoftwareFormatSystem::setSpeakerModeSystem::initSystem::closeChannel::setPanChannel::setSpeakerMixFMOD_SPEAKERFMOD_SPEAKERMODEFMOD_SOUND_FORMATFMOD_DSP_RESAMPLER
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setSpeakerModeSetsthespeakermodeinthehardwareandFMODsoftwaremixingengine.
C++Syntax
FMOD_RESULTSystem::setSpeakerMode(
FMOD_SPEAKERMODEspeakermode
);
CSyntax
FMOD_RESULTFMOD_System_SetSpeakerMode(
FMOD_SYSTEM*system,
FMOD_SPEAKERMODEspeakermode
);
Parameters
speakermode
SpeakermodespecifiedfromthelistinFMOD_SPEAKERMODE.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Speakermodesthataresupportedoneachplatformareasfollows.
Win32/Win64-All.Linux/Linux64-All.Macintosh-All.
iOS-FMOD_SPEAKERMODE_RAW,FMOD_SPEAKERMODE_MONO,FMOD_SPEAKERMODE_STEREO.PSP-FMOD_SPEAKERMODE_RAW,FMOD_SPEAKERMODE_MONO,
FMOD_SPEAKERMODE_STEREO.NGP-FMOD_SPEAKERMODE_RAW,FMOD_SPEAKERMODE_MONO,
FMOD_SPEAKERMODE_STEREO.3DS-FMOD_SPEAKERMODE_RAW,FMOD_SPEAKERMODE_MONO,
FMOD_SPEAKERMODE_STEREO.Android-FMOD_SPEAKERMODE_RAW,
FMOD_SPEAKERMODE_MONO,FMOD_SPEAKERMODE_STEREO.Wii-FMOD_SPEAKERMODE_RAW,FMOD_SPEAKERMODE_MONO,
FMOD_SPEAKERMODE_STEREO.PS3-FMOD_SPEAKERMODE_7POINT1only.Theusercannotchangethe
speakermodeonthisplatform.Xbox360-FMOD_SPEAKERMODE_5POINT1only.Theusercannot
changethespeakermodeonthisplatform.
NOTE!CallingthisfunctionresetsanyspeakerpositionssetwithSystem::set3DSpeakerPosition,thereforethisfunctionmustbecalledbeforecallingSystem::set3DSpeakerPosition.IfSystem::setSoftwareFormatiscalledafterthisfunctionwithavalidoutputchannelcount,thespeakermodeissettoFMOD_SPEAKERMODE_RAW.IfthisfunctioniscalledafterSystem::setSoftwareFormat,thenitwilloverwritethechannelcountspecifiedinthatfunction.Thechannelcountthatisoverwrittenforeachspeakermodeisasfollows:FMOD_SPEAKERMODE_RAW-Channelcountisunaffected.FMOD_SPEAKERMODE_MONO-Channelcountissetto1.FMOD_SPEAKERMODE_STEREO-Channelcountissetto2.FMOD_SPEAKERMODE_QUAD-Channelcountissetto4.FMOD_SPEAKERMODE_SURROUND-Channelcountissetto5.FMOD_SPEAKERMODE_5POINT1-Channelcountissetto6.FMOD_SPEAKERMODE_7POINT1-Channelcountissetto8.FMOD_SPEAKERMODE_SRS5_1_MATRIX-Channelcountissetto6.FMOD_SPEAKERMODE_MYEARS-Channelcountissetto8.
ThesechannelcountsarethechannelwidthoftheFMODDSPsystem,andaffectsoftwaremixedsounds(soundscreatedwithFMOD_SOFTWAREflag)only.Hardwaresoundsarenotaffected,butwillstillhavethespeakermode
appropriatelysetifpossible.(OnWindowsthespeakermodeissetbytheuserinthecontrolpanel,notbyFMOD).
NOTE!(Windowsonly)Soundwillnotbehavecorrectlyunlessyourcontrolpanelhassetthespeakermodetothecorrectsetup.ForexampleifFMOD_SPEAKERMODE_7POINT1issetonaspeakersystemthathasbeensetto'stereo'inthewindowscontrolpanel,soundscandissapearandcomeoutofthewrongspeaker.Makesureyourusersknowaboutthis.IfusingWinMMoutput,notethatsomesoundcarddriversdonotsupportmultichanneloutputcorrectly(i.e.Creativecards).IfusingWASAPIthespeakermodewillbeforcedtothecontrolpanelsetting,youcancallSystem::getSpeakerModeafterSystem::inittoverify.OnlyDirectSound,WASAPIandASIOhavereliablyworkingmultichanneloutput.Ifthespeakermodeisnotactuallysupported(eventhoughtheusersetthespeakermodeto7.1inWindows)thesoundcardmightnotbeabletohandleit.YouwillgetFMOD_ERR_OUTPUT_CREATEBUFFERerror.ChangethespeakermodetoFMOD_SPEAKERMODE_STEREOandre-initializeifthishappens.
Tosetthespeakermodetothatofthewindowscontrolpanel,useSystem::getDriverCaps.Forexample:
FMOD_SPEAKERMODEspeakermode;
FMOD_RESULTresult;
result=system->getDriverCaps(0,0,0,0,&speakermode;);//Getspeakermodefordefaultdriver.
ERRCHECK(result);
result=system->setSpeakerMode(speakermode);
ERRCHECK(result);
ThisfunctioncannotbecalledafterFMODisalreadyactivatedwithSystem::init.ItmustbecalledbeforeSystem::init,orafterSystem::close.
SeeAlso
System::getSpeakerModeFMOD_SPEAKERMODE
System::initSystem::closeSystem::setSoftwareFormatSystem::set3DSpeakerPositionSystem::getDriverCapsFMOD_RESULT
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setStreamBufferSizeSetstheinternalbuffersizeforstreamsopenedafterthiscall.Largervalueswillconsumemorememory(seeremarks),whereassmallervaluesmaycausebufferunder-run/starvation/stutteringcausedbylargedelaysindiskaccess(ieCDROMornetstream),orcpuusageinslowmachines,orbytryingtoplaytoomanystreamsatonce.
C++Syntax
FMOD_RESULTSystem::setStreamBufferSize(
unsignedintfilebuffersize,
FMOD_TIMEUNITfilebuffersizetype
);
CSyntax
FMOD_RESULTFMOD_System_SetStreamBufferSize(
FMOD_SYSTEM*system,
unsignedintfilebuffersize,
FMOD_TIMEUNITfilebuffersizetype
);
Parameters
filebuffersize
Sizeofstreamfilebuffer.Defaultis16384(FMOD_TIMEUNIT_RAWBYTES).
filebuffersizetype
Typeofunitforstreamfilebuffersize.MustbeFMOD_TIMEUNIT_MS,FMOD_TIMEUNIT_PCM,FMOD_TIMEUNIT_PCMBYTESorFMOD_TIMEUNIT_RAWBYTES.DefaultisFMOD_TIMEUNIT_RAWBYTES.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
NotethisfunctiondoesnotaffectstreamscreatedwithFMOD_OPENUSER,asthebuffersizeisspecifiedinSystem::createSound.Thisfunctiondoesnotaffectlatencyofplayback.Allstreamsarepre-buffered(unlessopenedwithFMOD_OPENONLY),sotheywillalwaysstartimmediately.SeekandPlayoperationscansometimescauseareflushofthisbuffer.
IfFMOD_TIMEUNIT_RAWBYTESisused,thememoryallocatedis2*thesizepassedin,becausefmodallocatesadoublebuffer.IfFMOD_TIMEUNIT_MS,FMOD_TIMEUNIT_PCMorFMOD_TIMEUNIT_PCMBYTESisused,andthestreamisinfinite(suchasashoutcastnetstream),orVBR,thenFMODcannotcalculateanaccuratecompressionratiotoworkwithwhenthefileisopened.ThismeansitwillthenbasethebuffersizeonFMOD_TIMEUNIT_PCMBYTES,orinotherwordsthenumberofPCMbytes,butthiswillbeincorrectforsomecompressedformats.UseFMOD_TIMEUNIT_RAWBYTESforthesetype(infinite/undeterminedlength)ofstreamsformoreaccuratereadsizes.
Notetodeterminetheactualmemoryusageofastream,includingsoundbufferandotheroverhead,useMemory_GetStatsbeforeandaftercreatingasound.
Notethatthestreammaystillstutterifthecodecusesalargeamountofcputime,whichimpactsthesmaller,internal'decode'buffer.ThedecodebuffersizeischangeableviaFMOD_CREATESOUNDEXINFO.
SeeAlso
FMOD_TIMEUNITSystem::createSound
System::getStreamBufferSizeSound::getOpenStateChannel::setMuteMemory_GetStatsFMOD_CREATESOUNDEXINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::setUserDataSetsauservaluethattheSystemobjectwillstoreinternally.CanberetrievedwithSystem::getUserData.
C++Syntax
FMOD_RESULTSystem::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_System_SetUserData(
FMOD_SYSTEM*system,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheSystemobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingSystem::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
System::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::unloadPluginUnloadsapluginfrommemory.
C++Syntax
FMOD_RESULTSystem::unloadPlugin(
unsignedinthandle
);
CSyntax
FMOD_RESULTFMOD_System_UnloadPlugin(
FMOD_SYSTEM*system,
unsignedinthandle
);
Parameters
handle
Handletoapre-existingplugin.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::loadPlugin
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::unlockDSPMutualexclusionfunctiontounlocktheFMODDSPengine(whichrunsasynchronouslyinanotherthread)andletitcontinueexecuting.
C++Syntax
FMOD_RESULTSystem::unlockDSP();
CSyntax
FMOD_RESULTFMOD_System_UnlockDSP(FMOD_SYSTEM*system);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
TheDSPenginemustbelockedwithSystem::lockDSPbeforethisfunctioniscalled.
SeeAlso
System::lockDSP
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System::updateUpdatestheFMODsystem.Thisshouldbecalledonceper'game'tick,oronceperframeinyourapplication.
C++Syntax
FMOD_RESULTSystem::update();
CSyntax
FMOD_RESULTFMOD_System_Update(FMOD_SYSTEM*system);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisupdatesthefollowingthings.
3DSound.System::updatemustbecalledtoget3Dpositioning.Virtualvoices.Ifmorevoicesareplayedthantherearerealhardware/software
voices,System::updatemustbecalledtohandlethevirtualization.*_NRToutputmodes.System::updatemustbecalledtodrivetheoutputfor
theseoutputmodes.FMOD_INIT_STREAM_FROM_UPDATE.System::updatemustbecalledto
updatethestreamerifthisflaghasbeenused.Callbacks.System::updatemustbecalledtofirecallbacksiftheyare
specified.
FMOD_NONBLOCKING.System::updatemustbecalledtomakesoundsopenedwithFMOD_NONBLOCKINGflagtoworkproperly.FMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGEDcallback.
System::updatemustbecalledforthiscallbacktotrigger.IfFMOD_OUTPUTTYPE_NOSOUND_NRTorFMOD_OUTPUTTYPE_WAVWRITER_NRToutputmodesareused,thisfunctionalsodrivesthesoftware/DSPengine,insteadofitrunningasynchronouslyinathreadasisthedefaultbehaviour.ThiscanbeusedforfasterthanrealtimeupdatestothedecodingorDSPenginewhichmightbeusefuliftheoutputisthewavwriterforexample.
IfFMOD_INIT_STREAM_FROM_UPDATEisused,thisfunctionwillupdatethestreamengine.Combiningthiswiththenonrealtimeoutputwillmeansmoothercapturedoutput.
Warning!DonotbetemptedtocallthisfunctionfromadifferentthreadtootherFMODcommands!Thisisdangerousandwillcausecorruption/crashes.Thisfunctionisnotthreadsafe,andshouldbecalledfromthesamethreadastherestoftheFMODcommands.
SeeAlso
System::initFMOD_INITFLAGSFMOD_OUTPUTTYPEFMOD_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundInterfaceSound::addSyncPointSound::deleteSyncPointSound::get3DConeSettingsSound::get3DCustomRolloffSound::get3DMinMaxDistanceSound::getDefaultsSound::getFormatSound::getLengthSound::getLoopCountSound::getLoopPointsSound::getMemoryInfoSound::getModeSound::getMusicChannelVolumeSound::getMusicNumChannelsSound::getMusicSpeedSound::getNameSound::getNumSubSoundsSound::getNumSyncPointsSound::getNumTagsSound::getOpenStateSound::getSoundGroupSound::getSubSoundSound::getSyncPointSound::getSyncPointInfoSound::getSystemObjectSound::getTagSound::getUserDataSound::getVariationsSound::lockSound::readDataSound::releaseSound::seekDataSound::set3DConeSettingsSound::set3DCustomRolloffSound::set3DMinMaxDistance
Sound::setDefaultsSound::setLoopCountSound::setLoopPointsSound::setModeSound::setMusicChannelVolumeSound::setMusicSpeedSound::setSoundGroupSound::setSubSoundSound::setSubSoundSentenceSound::setUserDataSound::setVariationsSound::unlock
FirelightTechnologiesFMODEx
Sound::addSyncPointAddsasyncpointataspecifictimewithinthesound.Thesepointscanbeusergeneratedorcancomefromawavfilewithembeddedmarkers.
C++Syntax
FMOD_RESULTSound::addSyncPoint(
unsignedintoffset,
FMOD_TIMEUNIToffsettype,
constchar*name,
FMOD_SYNCPOINT**point
);
CSyntax
FMOD_RESULTFMOD_Sound_AddSyncPoint(
FMOD_SOUND*sound,
unsignedintoffset,
FMOD_TIMEUNIToffsettype,
constchar*name,
FMOD_SYNCPOINT**point
);
Parameters
offset
offsettype
name
point
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Insoundforge,amarkercanbeaddedawavefilebyclickingonthetimeline/ruler,andrightclickingthenselecting'InsertMarker/Region'.Riffwrappedmp3filesarealsosupported.
SeeAlso
Sound::getNumSyncPointsSound::getSyncPointSound::getSyncPointInfoSound::deleteSyncPoint
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::deleteSyncPointDeletesasyncpointwithinthesound.Thesepointscanbeusergeneratedorcancomefromawavfilewithembeddedmarkers.
C++Syntax
FMOD_RESULTSound::deleteSyncPoint(
FMOD_SYNCPOINT*point
);
CSyntax
FMOD_RESULTFMOD_Sound_DeleteSyncPoint(
FMOD_SOUND*sound,
FMOD_SYNCPOINT*point
);
Parameters
point
AddressofanFMOD_SYNCPOINTobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Insoundforge,amarkercanbeaddedawavefilebyclickingonthetimeline/ruler,andrightclickingthenselecting'InsertMarker/Region'.Riffwrappedmp3filesarealsosupported.
SeeAlso
Sound::getNumSyncPointsSound::getSyncPointSound::getSyncPointInfoSound::addSyncPoint
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::get3DConeSettingsRetrievestheinsideandoutsideanglesofthesoundprojectioncone.
C++Syntax
FMOD_RESULTSound::get3DConeSettings(
float*insideconeangle,
float*outsideconeangle,
float*outsidevolume
);
CSyntax
FMOD_RESULTFMOD_Sound_Get3DConeSettings(
FMOD_SOUND*sound,
float*insideconeangle,
float*outsideconeangle,
float*outsidevolume
);
Parameters
insideconeangle
Addressofavariablethatreceivestheinsideangleofthesoundprojectioncone,indegrees.Thisistheanglewithinwhichthesoundisatitsnormalvolume.Optional.Specify0orNULLtoignore.
outsideconeangle
Addressofavariablethatreceivestheoutsideangleofthesoundprojectioncone,indegrees.Thisistheangleoutsideofwhichthesoundisatitsoutsidevolume.Optional.Specify0orNULLtoignore.
outsidevolume
Addressofavariablethatreceivestheconeoutsidevolumeforthissound.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Sound::set3DConeSettingsChannel::set3DConeSettings
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::get3DCustomRolloffRetrievesapointertothesound'scurrentcustomrolloffcurve.
C++Syntax
FMOD_RESULTSound::get3DCustomRolloff(
FMOD_VECTOR**points,
int*numpoints
);
CSyntax
FMOD_RESULTFMOD_Sound_Get3DCustomRolloff(
FMOD_SOUND*sound,
FMOD_VECTOR**points,
int*numpoints
);
Parameters
points
Addressofavariabletoreceivethepointertothecurrentcustomrolloffpointlist.Optional.Specify0orNULLtoignore.
numpoints
Addressofavariabletoreceivethenumberofpointsinthecurrentcustomrolloffpointlist.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_VECTORSound::set3DCustomRolloffChannel::set3DCustomRolloffChannel::get3DCustomRolloff
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::get3DMinMaxDistanceRetrievetheminimumandmaximumaudibledistanceforasound.
C++Syntax
FMOD_RESULTSound::get3DMinMaxDistance(
float*min,
float*max
);
CSyntax
FMOD_RESULTFMOD_Sound_Get3DMinMaxDistance(
FMOD_SOUND*sound,
float*min,
float*max
);
Parameters
min
Pointertovaluetobefilledwiththeminimumvolumedistanceforthesound.Seeremarksformoreonunits.Optional.Specify0orNULLtoignore.
max
Pointertovaluetobefilledwiththemaximumvolumedistanceforthesound.Seeremarksformoreonunits.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
A'distanceunit'isspecifiedbySystem::set3DSettings.Bydefaultthisissettometerswhichisadistancescaleof1.0.SeeSystem::set3DSettingsformoreonthis.Thedefaultunitsforminimumandmaximumdistancesare1.0and10,000.0f.
SeeAlso
Sound::set3DMinMaxDistanceChannel::set3DMinMaxDistanceChannel::get3DMinMaxDistanceSystem::set3DSettings
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getDefaultsRetrievesasound'sdefaultattributesforwhenitisplayedonachannelwithSystem::playSound.
C++Syntax
FMOD_RESULTSound::getDefaults(
float*frequency,
float*volume,
float*pan,
int*priority
);
CSyntax
FMOD_RESULTFMOD_Sound_GetDefaults(
FMOD_SOUND*sound,
float*frequency,
float*volume,
float*pan,
int*priority
);
Parameters
frequency
Addressofavariablethatreceivesthedefaultfrequencyforthesound.Optional.Specify0orNULLtoignore.
volume
Addressofavariablethatreceivesthedefaultvolumeforthesound.Resultwillbefrom0.0to1.0.0.0=Silent,1.0=fullvolume.Default=1.0.Optional.Specify0orNULLtoignore.
pan
Addressofavariablethatreceivesthedefaultpanforthesound.Resultwillbe
from-1.0to+1.0.-1.0=Fullleft,0.0=center,1.0=fullright.Default=0.0.Optional.Specify0orNULLtoignore.
priority
Addressofavariablethatreceivesthedefaultpriorityforthesoundwhenplayedonachannel.Resultwillbefrom0to256.0=mostimportant,256=leastimportant.Default=128.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Sound::setDefaultsSystem::createSoundSystem::playSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getFormatReturnsformatinformationaboutthesound.
C++Syntax
FMOD_RESULTSound::getFormat(
FMOD_SOUND_TYPE*type,
FMOD_SOUND_FORMAT*format,
int*channels,
int*bits
);
CSyntax
FMOD_RESULTFMOD_Sound_GetFormat(
FMOD_SOUND*sound,
FMOD_SOUND_TYPE*type,
FMOD_SOUND_FORMAT*format,
int*channels,
int*bits
);
Parameters
type
Addressofavariablethatreceivesthetypeofsound.Optional.Specify0orNULLtoignore.
format
Addressofavariablethatreceivestheformatofthesound.Optional.Specify0orNULLtoignore.
channels
Addressofavariablethatreceivesthenumberofchannelsforthesound.Optional.Specify0orNULLtoignore.
bits
Addressofavariablethatreceivesthenumberofbitspersampleforthesound.ThiscorrespondstoFMOD_SOUND_FORMATbutisprovidedasanintegerformatforconvenience.HardwarecompressedformatssuchasVAG,XADPCM,GCADPCMthatstaycompressedinmemorywillreturn0.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_SOUND_TYPEFMOD_SOUND_FORMAT
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getLengthRetrievesthelengthofthesoundusingthespecifiedtimeunit.
C++Syntax
FMOD_RESULTSound::getLength(
unsignedint*length,
FMOD_TIMEUNITlengthtype
);
CSyntax
FMOD_RESULTFMOD_Sound_GetLength(
FMOD_SOUND*sound,
unsignedint*length,
FMOD_TIMEUNITlengthtype
);
Parameters
length
Addressofavariablethatreceivesthelengthofthesound.
lengthtype
Timeunitretrieveintothelengthparameter.SeeFMOD_TIMEUNIT.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Certaintimeunitsdonotworkdependingonthefileformat.ForexampleFMOD_TIMEUNIT_MODORDERwillnotworkwithanmp3file.Alengthof0xFFFFFFFFusuallymeansitisofunlimitedlength,suchasaninternetradiostreamorMOD/S3M/XM/ITfilewhichmayloopforever.
Warning!UsingaVBRsourcethatdoesnothaveanassociatedlengthinformationinmillisecondsorpcmsamples(suchasMP3orMOD/S3M/XM/IT)mayreturninaccuratelengthsspecifyFMOD_TIMEUNIT_MSorFMOD_TIMEUNIT_PCM.IfyouwantFMODtoretrieveanaccuratelengthitwillhavetopre-scanthefilefirstinthiscase.YouwillhavetospecifyFMOD_ACCURATETIMEwhenloadingoropeningthesound.ThismeansthereisaslightdelayasFMODscansthewholefilewhenloadingthesoundtofindtherightlengthinmillsecondsorpcmsamples,andthisalsocreatesaseektableasitdoesthisforseekingpurposes.
SeeAlso
FMOD_TIMEUNIT
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getLoopCountRetrievesthecurrentloopcountvalueforthespecifiedsound.
C++Syntax
FMOD_RESULTSound::getLoopCount(
int*loopcount
);
CSyntax
FMOD_RESULTFMOD_Sound_GetLoopCount(
FMOD_SOUND*sound,
int*loopcount
);
Parameters
loopcount
Addressofavariablethatreceivesthenumberoftimesasoundwillloopbydefaultbeforestopping.0=oneshot.1=looponcethenstop.-1=loopforever.Default=-1
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Unlikethechannelloopcountfunction,thisfunctionsimplyreturnsthevaluesetwithSound::setLoopCount.Itdoesnotdecrementasitplays(especiallyseeing
asonesoundcanbeplayedmultipletimes).
SeeAlso
Sound::setLoopCount
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getLoopPointsRetrievesthelooppointsforasound.
C++Syntax
FMOD_RESULTSound::getLoopPoints(
unsignedint*loopstart,
FMOD_TIMEUNITloopstarttype,
unsignedint*loopend,
FMOD_TIMEUNITloopendtype
);
CSyntax
FMOD_RESULTFMOD_Sound_GetLoopPoints(
FMOD_SOUND*sound,
unsignedint*loopstart,
FMOD_TIMEUNITloopstarttype,
unsignedint*loopend,
FMOD_TIMEUNITloopendtype
);
Parameters
loopstart
Addressofavariabletoreceivetheloopstartpoint.Thispointintimeisplayed,soitisinclusive.Optional.Specify0orNULLtoignore.
loopstarttype
Thetimeformatusedforthereturnedloopstartpoint.SeeFMOD_TIMEUNIT.
loopend
Addressofavariabletoreceivetheloopendpoint.Thispointintimeisplayed,soitisinclusive.Optional.Specify0orNULLtoignore.
loopendtype
Thetimeformatusedforthereturnedloopendpoint.SeeFMOD_TIMEUNIT.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_TIMEUNITSound::setLoopPoints
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTSound::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_Sound_GetMemoryInfo(
FMOD_SOUND*sound,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getModeRetrievesthemodebitssetbythecodecandtheuserwhenopeningthesound.
C++Syntax
FMOD_RESULTSound::getMode(
FMOD_MODE*mode
);
CSyntax
FMOD_RESULTFMOD_Sound_GetMode(
FMOD_SOUND*sound,
FMOD_MODE*mode
);
Parameters
mode
Addressofavariablethatreceivesthecurrentmodeforthissound.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Sound::setModeSystem::createSoundChannel::setModeChannel::getMode
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getMusicChannelVolumeRetrievesthevolumeofaMOD/S3M/XM/IT/MIDImusicchannelvolume.
C++Syntax
FMOD_RESULTSound::getMusicChannelVolume(
intchannel,
float*volume
);
CSyntax
FMOD_RESULTFMOD_Sound_GetMusicChannelVolume(
FMOD_SOUND*sound,
intchannel,
float*volume
);
Parameters
channel
MOD/S3M/XM/IT/MIDImusicsubchanneltoretrievethevolumefor.
volume
Addressofavariabletoreceivethevolumeofthechannelfrom0.0to1.0.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UseSound::getMusicNumChannelstogetthemaximumnumberofmusicchannelsinthesong.
SeeAlso
Sound::getMusicNumChannelsSound::setMusicChannelVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getMusicNumChannelsGetsthenumberofmusicchannelsinsideaMOD/S3M/XM/IT/MIDIfile.
C++Syntax
FMOD_RESULTSound::getMusicNumChannels(
int*numchannels
);
CSyntax
FMOD_RESULTFMOD_Sound_GetMusicNumChannels(
FMOD_SOUND*sound,
int*numchannels
);
Parameters
numchannels
Numberofmusicchannelsusedinthesong.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Sound::setMusicChannelVolumeSound::getMusicChannelVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getMusicSpeedSetstherelativespeedofMOD/S3M/XM/IT/MIDImusic.
C++Syntax
FMOD_RESULTSound::getMusicSpeed(
float*speed
);
CSyntax
FMOD_RESULTFMOD_Sound_GetMusicSpeed(
FMOD_SOUND*sound,
float*speed
);
Parameters
speed
Addressofavariabletoreceivetherelativespeedofthesongfrom0.01to100.0.0.5=halfspeed,2.0=doublespeed.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Settingaspeedoutsidetheboundsof0.01to100.0willnotreturnanerror,itwillclampthevalue.
SeeAlso
Sound::setMusicSpeedSound::setMusicChannelVolumeSound::getMusicChannelVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getNameRetrievesthenameofasound.
C++Syntax
FMOD_RESULTSound::getName(
char*name,
intnamelen
);
CSyntax
FMOD_RESULTFMOD_Sound_GetName(
FMOD_SOUND*sound,
char*name,
intnamelen
);
Parameters
name
Addressofavariablethatreceivesthenameofthesound.
namelen
Lengthinbytesofthetargetbuffertoreceievethestring.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ifFMOD_LOWMEMhasbeenspecifiedinSystem::createSound,thisfunctionwillreturn"(null)".
SeeAlso
System::createSoundFMOD_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getNumSubSoundsRetrievesthenumberofsubsoundsstoredwithinasound.
C++Syntax
FMOD_RESULTSound::getNumSubSounds(
int*numsubsounds
);
CSyntax
FMOD_RESULTFMOD_Sound_GetNumSubSounds(
FMOD_SOUND*sound,
int*numsubsounds
);
Parameters
numsubsounds
Addressofavariablethatreceivesthenumberofsubsoundsstoredwithinthissound.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Aformatthathassubsoundsisusuallyacontainerformat,suchasFSB,DLS,MOD,S3M,XM,IT.
SeeAlso
Sound::getSubSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getNumSyncPointsRetrievesthenumberofsyncpointsstoredwithinasound.Thesepointscanbeusergeneratedorcancomefromawavfilewithembeddedmarkers.
C++Syntax
FMOD_RESULTSound::getNumSyncPoints(
int*numsyncpoints
);
CSyntax
FMOD_RESULTFMOD_Sound_GetNumSyncPoints(
FMOD_SOUND*sound,
int*numsyncpoints
);
Parameters
numsyncpoints
Addressofavariabletoreceivethenumberofsyncpointswithinthissound.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Insoundforge,amarkercanbeaddedawavefilebyclickingonthetimeline/ruler,andrightclickingthenselecting'InsertMarker/Region'.Riffwrappedmp3filesarealsosupported.
SeeAlso
Sound::getSyncPointSound::getSyncPointInfoSound::addSyncPointSound::deleteSyncPoint
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getNumTagsRetrievesthenumberoftagsbelongingtoasound.
C++Syntax
FMOD_RESULTSound::getNumTags(
int*numtags,
int*numtagsupdated
);
CSyntax
FMOD_RESULTFMOD_Sound_GetNumTags(
FMOD_SOUND*sound,
int*numtags,
int*numtagsupdated
);
Parameters
numtags
Addressofavariablethatreceivesthenumberoftagsinthesound.Optional.Specify0orNULLtoignore.
numtagsupdated
Addressofavariablethatreceivesthenumberoftagsupdatedsincethisfunctionwaslastcalled.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
The'numtagsupdated'parametercanbeusedtocheckifanytagshavebeenupdatedsincelastcallingthisfunction.Thiscanbeusefultoupdatetagfields,forexamplefrominternetbasedstreams,suchasshoutcastoricecastwherethenameofthesongmightchange.
SeeAlso
Sound::getTag
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getOpenStateRetrievesthestateasoundisinafterFMOD_NONBLOCKINGhasbeenusedtoopenit,orthestateofthestreamingbuffer.
C++Syntax
FMOD_RESULTSound::getOpenState(
FMOD_OPENSTATE*openstate,
unsignedint*percentbuffered,
bool*starving,
bool*diskbusy
);
CSyntax
FMOD_RESULTFMOD_Sound_GetOpenState(
FMOD_SOUND*sound,
FMOD_OPENSTATE*openstate,
unsignedint*percentbuffered,
FMOD_BOOL*starving,
FMOD_BOOL*diskbusy
);
Parameters
openstate
Addressofavariablethatreceivestheopenstateofasound.Optional.Specify0orNULLtoignore.
percentbuffered
Addressofavariablethatreceivesthepercentageofthefilebufferfilledprogressofastream.Optional.Specify0orNULLtoignore.
starving
Addressofavariablethatreceivesthestarvingstateofasound.Ifastreamhasdecodedmorethanthestreamfilebufferhasreadyforit,itwillreturnTRUE.
Optional.Specify0orNULLtoignore.
diskbusy
Addressofavariablethatreceivesthediskbusystateofasound.Thatis,whetherthediskiscurrentlybeingaccessedforthesound.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.Note:Thereturnvaluewillbetheresultoftheasynchronoussoundcreate.Usethistodeterminewhathappenedifasoundfailedtoopen.Note:Alwayscheck'openstate'todeterminethestateofthesound.DonotassumethatifthisfunctionreturnsFMOD_OKthenthesoundhasfinishedloading.
Remarks
WhenasoundisopenedwithFMOD_NONBLOCKING,itisopenedandpreparedinthebackground,orasynchronously.Thisallowsthemainapplicationtoexecutewithoutstallingonaudioloads.Thisfunctionwilldescribethestateoftheasynchronousloadroutinei.e.whetherithassucceeded,failedorisstillinprogress.
If'starving'istrue,thenyouwillmostlikelyhearastuttering/repeatingsoundasthedecodebufferloopsonitselfandreplaysolddata.Nowthatthisvariableexists,youcandetectbufferunderrunandusesomethinglikeChannel::setMutetokeepitquietuntilitisnotstarvinganymore.
SeeAlso
FMOD_OPENSTATE
FMOD_MODEChannel::setMute
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getSoundGroupRetrievesthesound'scurrentsoundgroup.
C++Syntax
FMOD_RESULTSound::getSoundGroup(
FMOD::SoundGroup**soundgroup
);
CSyntax
FMOD_RESULTFMOD_Sound_GetSoundGroup(
FMOD_SOUND*sound,
FMOD_SOUNDGROUP**soundgroup
);
Parameters
soundgroup
AddressofapointertoaSoundGrouptoreceivethesound'scurrentsoundgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.Bydefaultasoundislocatedinthe'mastersoundgroup'.ThiscanberetrievedwithSystem::getMasterSoundGroup.
SeeAlso
Sound::setSoundGroup
System::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getSubSoundRetrievesahandletoaSoundobjectthatiscontainedwithintheparentsound.
C++Syntax
FMOD_RESULTSound::getSubSound(
intindex,
FMOD::Sound**subsound
);
CSyntax
FMOD_RESULTFMOD_Sound_GetSubSound(
FMOD_SOUND*sound,
intindex,
FMOD_SOUND**subsound
);
Parameters
index
Indexofthesubsoundtoretrievewithinthissound.
subsound
Addressofavariablethatreceivesthesoundobjectspecified.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
IfthesoundisastreamandFMOD_NONBLOCKINGwasnotused,thenthiscallwillperformablockingseek/flushtothespecifiedsubsound.
IfFMOD_NONBLOCKINGwasusedtoopenthissoundandthesoundisastream,FMODwilldoanonblockingseek/flushandsetthestateofthesubsoundtoFMOD_OPENSTATE_SEEKING.Thesoundwon'tbereadytobeusedinthiscaseuntilthestateofthesoundbecomesFMOD_OPENSTATE_READY(orFMOD_OPENSTATE_ERROR).
SeeAlso
Sound::getNumSubSoundsSound::setSubSoundSystem::createSoundFMOD_MODEFMOD_OPENSTATE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getSyncPointRetrieveahandletoasyncpoint.Thesepointscanbeusergeneratedorcancomefromawavfilewithembeddedmarkers.
C++Syntax
FMOD_RESULTSound::getSyncPoint(
intindex,
FMOD_SYNCPOINT**point
);
CSyntax
FMOD_RESULTFMOD_Sound_GetSyncPoint(
FMOD_SOUND*sound,
intindex,
FMOD_SYNCPOINT**point
);
Parameters
index
Indexofthesyncpointtoretrieve.UseSound::getNumSyncPointstodeterminethenumberofsyncpoints.
point
Addressofavariabletoreceiveapointertoasyncpoint.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Insoundforge,amarkercanbeaddedawavefilebyclickingonthetimeline/ruler,andrightclickingthenselecting'InsertMarker/Region'.Riffwrappedmp3filesarealsosupported.
SeeAlso
Sound::getNumSyncPointsSound::getSyncPointInfoSound::addSyncPointSound::deleteSyncPoint
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getSyncPointInfoRetrievesinformationonanembeddedsyncpoint.Thesepointscanbeusergeneratedorcancomefromawavfilewithembeddedmarkers.
C++Syntax
FMOD_RESULTSound::getSyncPointInfo(
FMOD_SYNCPOINT*point,
char*name,
intnamelen,
unsignedint*offset,
FMOD_TIMEUNIToffsettype
);
CSyntax
FMOD_RESULTFMOD_Sound_GetSyncPointInfo(
FMOD_SOUND*sound,
FMOD_SYNCPOINT*point,
char*name,
intnamelen,
unsignedint*offset,
FMOD_TIMEUNIToffsettype
);
Parameters
point
Pointertoasyncpoint.UseSound::getSyncPointtoretrieveasyncpointorSound::addSyncPointtocreateone.
name
Addressofavariabletoreceivethenameofthesyncpoint.Optional.Specify0orNULLtoignore.
namelen
Sizeofbufferinbytesfornameparameter.FMODwillonlycopytothispointif
thestringisbiggerthanthebufferpassedin.Specify0toignorenameparameter.
offset
Addressofavariabletoreceievetheoffsetofthesyncpointinaformatdeterminedbytheoffsettypeparameter.Optional.Specify0orNULLtoignore.
offsettype
Atimeunitparametertodetermineadesiredformatfortheoffsetparameter.Forexampletheoffsetcanbespecifiedaspcmsamples,ormilliseconds.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Insoundforge,amarkercanbeaddedawavefilebyclickingonthetimeline/ruler,andrightclickingthenselecting'InsertMarker/Region'.Riffwrappedmp3filesarealsosupported.
SeeAlso
Sound::getNumSyncPointsSound::getSyncPointSound::addSyncPointSound::deleteSyncPoint
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getSystemObjectRetrievestheparentSystemobjectthatwasusedtocreatethisobject.
C++Syntax
FMOD_RESULTSound::getSystemObject(
FMOD::System**system
);
CSyntax
FMOD_RESULTFMOD_Sound_GetSystemObject(
FMOD_SOUND*sound,
FMOD_SYSTEM**system
);
Parameters
system
AddressofapointerthatreceivestheSystemobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::createSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getTagRetrievesadescriptivetagstoredbythesound,todescribethingslikethesongname,authoretc.
C++Syntax
FMOD_RESULTSound::getTag(
constchar*name,
intindex,
FMOD_TAG*tag
);
CSyntax
FMOD_RESULTFMOD_Sound_GetTag(
FMOD_SOUND*sound,
constchar*name,
intindex,
FMOD_TAG*tag
);
Parameters
name
Optional.Nameofatagtoretrieve.Usedtospecifyaparticulartagiftheuserrequiresit.Togetalltypesoftagsleavethisparameteras0orNULL.
index
Indexintothetaglist.Ifthenameparameterisnull,thentheindexistheindexintoalltagspresent,from0uptobutnotincludingthenumtagsvaluereturnedbySound::getNumTags.Ifnameisnotnull,thenindexistheindexfrom0uptothenumberoftagswiththesamename.Forexampleiftherewere2tagswiththename"TITLE"thenyoucoulduse0and1toreferencethem.Specifyinganindexof-1returnsneworupdatedtags.Thiscanbeusedtopulltagsoutastheyareaddedorupdated.
tag
Pointertoatagstructure.Thiswillreceive
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThenumberoftagsavailablecanbefoundwithSound::getNumTags.Thewaytodisplayorretrievetagscanbedonein3differentways.Alltagscanbecontinuouslyretrievedbyloopingfrom0tothenumtagsvalueinSound::getNumTags-1.Updatedtagswillrefreshautomatically,andthe'updated'memberoftheFMOD_TAGstructurewillbesettotrueifataghasbeenupdated,duetosomethinglikeanetstreamchangingthesongnameforexample.Tagscouldalsoberetrievedbyspecifying-1astheindexandonlyupdatingtagsthatarereturned.IfalltagsareretrievedandthisfunctioniscalledthefunctionwillreturnanerrorofFMOD_ERR_TAGNOTFOUND.Specifictagscanberetrievedbyspecifyinganameparameter.Theindexcanbe0basedor-1inthesamefashionasdescribedpreviously.
SeeAlso
Sound::getNumTagsFMOD_TAG
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getUserDataRetrievestheuservaluethatthatwassetbycallingtheSound::setUserDatafunction.
C++Syntax
FMOD_RESULTSound::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_Sound_GetUserData(
FMOD_SOUND*sound,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeSound::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Sound::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::getVariationsRetrievesthecurrentplaybackbehaviourvariationsofasound.
C++Syntax
FMOD_RESULTSound::getVariations(
float*frequencyvar,
float*volumevar,
float*panvar
);
CSyntax
FMOD_RESULTFMOD_Sound_GetVariations(
FMOD_SOUND*sound,
float*frequencyvar,
float*volumevar,
float*panvar
);
Parameters
frequencyvar
Addressofavariabletoreceivethefrequencyvariationinhz.Frequencywillplayatitsdefaultfrequency,plusorminusarandomvaluewithinthisrange.Default=0.0.Specify0orNULLtoignore.
volumevar
Addressofavariabletoreceivethevolumevariation.0.0to1.0.Soundwillplayatitsdefaultvolume,plusorminusarandomvaluewithinthisrange.Default=0.0.Specify0orNULLtoignore.
panvar
Addressofavariabletoreceivethepanvariation.0.0to2.0.Soundwillplayatitsdefaultpan,plusorminusarandomvaluewithinthisrange.Panisfrom-1.0to+1.0normallysotherangecanbeamaximumof2.0inthiscase.Default=0.
Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Sound::setVariations
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::lockReturnsapointertothebeginningofthesampledataforasound.
C++Syntax
FMOD_RESULTSound::lock(
unsignedintoffset,
unsignedintlength,
void**ptr1,
void**ptr2,
unsignedint*len1,
unsignedint*len2
);
CSyntax
FMOD_RESULTFMOD_Sound_Lock(
FMOD_SOUND*sound,
unsignedintoffset,
unsignedintlength,
void**ptr1,
void**ptr2,
unsignedint*len1,
unsignedint*len2
);
Parameters
offset
Offsetinbytestothepositionyouwanttolockinthesamplebuffer.
length
Numberofbytesyouwanttolockinthesamplebuffer.
ptr1
Addressofapointerthatwillpointtothefirstpartofthelockeddata.
ptr2
Addressofapointerthatwillpointtothesecondpartofthelockeddata.Thiswillbenullifthedatalockedhasn'twrappedattheendofthebuffer.
len1
Lengthofdatainbytesthatwaslockedforptr1
len2
Lengthofdatainbytesthatwaslockedforptr2.Thiswillbe0ifthedatalockedhasn'twrappedattheendofthebuffer.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Youmustalwaysunlockthedataagainafteryouhavefinishedwithit,usingSound::unlock.WiththisfunctionyougetaccesstotheRAWaudiodata,forexample8,16,24or32bitPCMdata,monoorstereodata,andonconsoles,vag,xadpcmorgcadpcmcompresseddata.Youmusttakethisintoconsiderationwhenprocessingthedatawithinthepointer.
SeeAlso
Sound::unlockSystem::createSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::readDataReadsdatafromanopenedsoundtoaspecifiedpointer,usingtheFMODcodeccreatedinternally.Thiscanbeusedfordecodingdataofflineinsmallpieces(orbigpieces),ratherthanplayingandcapturingit,orloadingthewholefileatonceandhavingtolock/unlockthedata.
C++Syntax
FMOD_RESULTSound::readData(
void*buffer,
unsignedintlenbytes,
unsignedint*read
);
CSyntax
FMOD_RESULTFMOD_Sound_ReadData(
FMOD_SOUND*sound,
void*buffer,
unsignedintlenbytes,
unsignedint*read
);
Parameters
buffer
Addressofabufferthatreceivesthedecodeddatafromthesound.
lenbytes
Numberofbytestoreadintothebuffer.
read
Numberofbytesactuallyread.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Iftoomuchdataisread,itispossibleFMOD_ERR_FILE_EOFwillbereturned,meaningitisoutofdata.The'read'parameterwillreflectthisbyreturningasmallernumberofbytesreadthanwasrequested.AsasoundalreadyreadsthewholefilethenclosesituponcallingSystem::createSound(unlessSystem::createStreamorFMOD_CREATESTREAMisused),thisfunctionwillnotworkbecausethefileisnolongeropen.Notethatopeningastreammakesitreadachunkofdataandthiswilladvancethereadcursor.YouneedtoeitheruseFMOD_OPENONLYtostopthestreampre-bufferingorcallSound::seekDatatoresetthereadcursor.IfFMOD_OPENONLYflagisusedwhenopeningasound,itwillleavethefilehandleopen,andFMODwillnotreadanydatainternally,sothereadcursorwillbeatposition0.Thiswillallowtheusertoreadthedatafromthestart.Asnotedpreviously,ifasoundisopenedasastreamandthisfunctioniscalledtoreadsomedata,thenyouwill'missthestart'ofthesound.Channel::setPositionwillhavethesameresult.Thesefunctionwillflushthestreambufferandreadinachunkofaudiointernally.ThisiswhyifyouwanttoreadfromanabsolutepositionyoushoulduseSound::seekDataandnotthepreviouslymentionedfunctions.RememberifyouarecallingreadDataandseekDataonastreamitisuptoyoutocopewiththesideeffectsthatmayoccur.InformationfunctionssuchasChannel::getPositionmaygivemisleadingresults.CallingChannel::setPositionwillresetandflushthestream,leadingtothetimevaluesreturningtotheircorrectposition.
NOTE!Threadsafety.Ifyoucallthisfromanotherstreamcallback,oranyotherthreadbesidesthemainthread,makesuretoputacriticalsectionaroundthecall,andanotheraroundSound::releaseincasethesoundisstillbeingreadfromwhilereleasing.
ThisfunctionisthreadsafetocallfromastreamcallbackordifferentthreadaslongasitdoesntconflictwithacalltoSound::release.
SeeAlso
Sound::seekDataFMOD_MODEChannel::setPositionSystem::createSoundSystem::createStreamSound::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::releaseFreesasoundobject.
C++Syntax
FMOD_RESULTSound::release();
CSyntax
FMOD_RESULTFMOD_Sound_Release(FMOD_SOUND*sound);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thiswillfreethesoundobjectandeverythingcreatedunderit.
Ifthisisastreamthatisplayingasasubsoundofanotherparentstream,thenifthisisthecurrentlyplayingsubsound(beitanormalsubsoundplayback,oraspartofasentence),thewholestreamwillstop.Note-ThisfunctionwillblockifitwasopenedwithFMOD_NONBLOCKINGandhasn'tfinishedopeningyet.
SeeAlso
System::createSoundSound::getSubSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::seekDataSeeksasoundforusewithdatareading.Thisisnotafunctionto'seekasound'fornormaluse.ThisisforuseinconjunctionwithSound::readData.
C++Syntax
FMOD_RESULTSound::seekData(
unsignedintpcm
);
CSyntax
FMOD_RESULTFMOD_Sound_SeekData(
FMOD_SOUND*sound,
unsignedintpcm
);
Parameters
pcm
OffsettoseektoinPCMsamples.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note.Ifastreamisopenedandthisfunctioniscalledtoreadsomedata,thenitwilladvancetheinternalfilepointer,sodatawillbeskippedifyouplaythestream.Alsocallingposition/timeinformationfunctionswillleadtomisleading
results.Astreamcanberesetbeforeplayingbysettingthepositionofthechannel(ieusingChannel::setPosition),whichwillmakeitseek,resetandflushthestreambuffer.Thiswillmakeitsoundcorrectagain.RememberifyouarecallingreadDataandseekDataonastreamitisuptoyoutocopewiththesideeffectsthatmayoccur.
SeeAlso
Sound::readDataChannel::setPosition
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::set3DConeSettingsSetstheinsideandoutsideanglesofthesoundprojectioncone,aswellasthevolumeofthesoundoutsidetheoutsideangleofthesoundprojectioncone.
C++Syntax
FMOD_RESULTSound::set3DConeSettings(
floatinsideconeangle,
floatoutsideconeangle,
floatoutsidevolume
);
CSyntax
FMOD_RESULTFMOD_Sound_Set3DConeSettings(
FMOD_SOUND*sound,
floatinsideconeangle,
floatoutsideconeangle,
floatoutsidevolume
);
Parameters
insideconeangle
Insideconeangle,indegrees,from0to360.Thisistheanglewithinwhichthesoundisatitsnormalvolume.Mustnotbegreaterthanoutsideconeangle.Default=360.
outsideconeangle
Outsideconeangle,indegrees,from0to360.Thisistheangleoutsideofwhichthesoundisatitsoutsidevolume.Mustnotbelessthaninsideconeangle.Default=360.
outsidevolume
Coneoutsidevolume,from0to1.0.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Sound::get3DConeSettingsChannel::set3DConeSettings
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::set3DCustomRolloffPointasoundtouseacustomrolloffcurve.MustbeusedinconjunctionwithFMOD_3D_CUSTOMROLLOFFflagtobeactivated.
C++Syntax
FMOD_RESULTSound::set3DCustomRolloff(
FMOD_VECTOR*points,
intnumpoints
);
CSyntax
FMOD_RESULTFMOD_Sound_Set3DCustomRolloff(
FMOD_SOUND*sound,
FMOD_VECTOR*points,
intnumpoints
);
Parameters
points
AnarrayofFMOD_VECTORstructureswherex=distanceandy=volumefrom0.0to1.0.zshouldbesetto0.
numpoints
Thenumberofpointsinthearray.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!Thisfunctiondoesnotduplicatethememoryforthepointsinternally.ThepointeryoupasstoFMODmustremainvaliduntilthereisnomoreuseforit.Donotfreethememorywhileinuse,orusealocalvariablethatgoesoutofscopewhileinuse.
Pointsmustbesortedbydistance!PassinganunsortedlisttoFMODwillresultinanerror.
Setthepointsparameterto0orNULLtodisablethepoints.IfFMOD_3D_CUSTOMROLLOFFissetandtherolloffcurveis0,FMODwillreverttoinversecurverolloff.
MinandmaxdistancearemeaninglesswhenFMOD_3D_CUSTOMROLLOFFisusedandthevaluesareignored.
Hereisanexampleofacustomarrayofpoints.
FMOD_VECTORcurve[3]=
{
{0.0f,1.0f,0.0f},
{2.0f,0.2f,0.0f},
{20.0f,0.0f,0.0f}
/ul>};
xrepresentsthedistance,yrepresentsthevolume.zisalways0.Distancesbetweenpointsarelinearlyinterpolated.Notethatafterthehighestdistancespecified,thevolumeinthelastentryisusedfromthatdistanceonwards.
SeeAlso
FMOD_MODEFMOD_VECTORSound::get3DCustomRolloffChannel::set3DCustomRolloffChannel::get3DCustomRolloff
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::set3DMinMaxDistanceSetstheminimumandmaximumaudibledistanceforasound.MinDistanceistheminimumdistancethatthesoundemitterwillceasetocontinuegrowinglouderat(asitapproachesthelistener).Withinthemindistanceitstaysattheconstantloudestvolumepossible.Outsideofthismindistanceitbeginstoattenuate.MaxDistanceisthedistanceasoundstopsattenuatingat.Beyondthispointitwillstayatthevolumeitwouldbeatmaxdistanceunitsfromthelistenerandwillnotattenuateanymore.MinDistanceisusefultogivetheimpressionthatthesoundisloudorsoftin3dspace.Anexampleofthisisasmallquietobject,suchasabumblebee,whichyoucouldsetamindistanceofto0.1forexample,whichwouldcauseittoattenuatequicklyanddissapearwhenonlyafewmetersawayfromthelistener.Anotherexampleisajumbojet,whichyoucouldsettoamindistanceof100.0,whichwouldkeepthesoundvolumeatmaxuntilthelistenerwas100metersaway,thenitwouldbehundredsofmetersmorebeforeitwouldfadeout.Insummary,increasethemindistanceofasoundtomakeit'louder'ina3dworld,anddecreaseittomakeit'quieter'ina3dworld.Maxdistanceiseffectivelyobsoleteunlessyouneedthesoundtostopfadingoutatacertainpoint.Donotadjustthisfromthedefaultifyoudontneedto.Somepeoplehavetheconfusionthatmaxdistanceisthepointthesoundwillfadeoutto,thisisnotthecase.
C++Syntax
FMOD_RESULTSound::set3DMinMaxDistance(
floatmin,
floatmax
);
CSyntax
FMOD_RESULTFMOD_Sound_Set3DMinMaxDistance(
FMOD_SOUND*sound,
floatmin,
floatmax
);
Parameters
min
Thesound'sminimumvolumedistancein"units".Seeremarksformoreonunits.
max
Thesound'smaximumvolumedistancein"units".Seeremarksformoreonunits.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
A'distanceunit'isspecifiedbySystem::set3DSettings.Bydefaultthisissettometerswhichisadistancescaleof1.0.SeeSystem::set3DSettingsformoreonthis.Thedefaultunitsforminimumandmaximumdistancesare1.0and10,000.0f.
SeeAlso
Sound::get3DMinMaxDistanceChannel::set3DMinMaxDistanceChannel::get3DMinMaxDistanceSystem::set3DSettings
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::setDefaultsSetsasounds'sdefaultattributes,sowhenitisplayeditusesthesevalueswithouthavingtospecifythemlaterforeachchanneleachtimethesoundisplayed.
C++Syntax
FMOD_RESULTSound::setDefaults(
floatfrequency,
floatvolume,
floatpan,
intpriority
);
CSyntax
FMOD_RESULTFMOD_Sound_SetDefaults(
FMOD_SOUND*sound,
floatfrequency,
floatvolume,
floatpan,
intpriority
);
Parameters
frequency
Defaultplaybackfrequencyforthesound,inhz.(ie44100hz).
volume
Defaultvolumeforthesound.0.0to1.0.0.0=Silent,1.0=fullvolume.Default=1.0.
pan
Defaultpanforthesound.-1.0to+1.0.-1.0=Fullleft,0.0=center,1.0=fullright.Default=0.0.
priority
Defaultpriorityforthesoundwhenplayedonachannel.0to256.0=mostimportant,256=leastimportant.Default=128.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thereareno'ignore'valuesfortheseparameters.UseSound::getDefaultsifyouwanttochangeonly1andleaveothersunaltered.
SeeAlso
Sound::getDefaultsSystem::playSoundSystem::createSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::setLoopCountSetsasound,bydefault,toloopaspecifiednumberoftimesbeforestoppingifitsmodeissettoFMOD_LOOP_NORMALorFMOD_LOOP_BIDI.
C++Syntax
FMOD_RESULTSound::setLoopCount(
intloopcount
);
CSyntax
FMOD_RESULTFMOD_Sound_SetLoopCount(
FMOD_SOUND*sound,
intloopcount
);
Parameters
loopcount
Numberoftimestoloopbeforestopping.0=oneshot.1=looponcethenstop.-1=loopforever.Default=-1
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctiondoesnotaffectFMOD_HARDWAREbasedsoundsthatarenotstreamable.
FMOD_SOFTWAREbasedsoundsoranytypeofsoundcreatedwithSystem::CreateStreamorFMOD_CREATESTREAMwillsupportthisfunction.
Issueswithstreamedaudio.(SoundscreatedwithwithSystem::createStreamorFMOD_CREATESTREAM).Whenchangingtheloopcount,soundscreatedwithSystem::createStreamorFMOD_CREATESTREAMmayalreadyhavebeenpre-bufferedandexecutedtheirlooplogicaheadoftime,beforethiscallwasevenmade.Thisisdependantonthesizeofthesoundversusthesizeofthestreamdecodebuffer.SeeFMOD_CREATESOUNDEXINFO.Ifthishappens,youmayneedtoreflushthestreambuffer.Todothis,youcancallChannel::setPositionwhichforcesareflushofthestreambuffer.Notethiswillusuallyonlyhappenifyouhavesoundsorlooppointsthataresmallerthanthestreamdecodebuffersize.Otherwiseyouwillnotnormallyencounteranyproblems.
SeeAlso
Sound::getLoopCountSystem::setStreamBufferSizeFMOD_CREATESOUNDEXINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::setLoopPointsSetsthelooppointswithinasound.
C++Syntax
FMOD_RESULTSound::setLoopPoints(
unsignedintloopstart,
FMOD_TIMEUNITloopstarttype,
unsignedintloopend,
FMOD_TIMEUNITloopendtype
);
CSyntax
FMOD_RESULTFMOD_Sound_SetLoopPoints(
FMOD_SOUND*sound,
unsignedintloopstart,
FMOD_TIMEUNITloopstarttype,
unsignedintloopend,
FMOD_TIMEUNITloopendtype
);
Parameters
loopstart
Theloopstartpoint.Thispointintimeisplayed,soitisinclusive.
loopstarttype
Thetimeformatusedfortheloopstartpoint.SeeFMOD_TIMEUNIT.
loopend
Theloopendpoint.Thispointintimeisplayed,soitisinclusive.
loopendtype
Thetimeformatusedfortheloopendpoint.SeeFMOD_TIMEUNIT.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
NotsupportedbystaticsoundscreatedwithFMOD_HARDWARE.SupportedbysoundscreatedwithFMOD_SOFTWARE,orsoundsofanytype(hardwareorsoftware)createdwithSystem::createStreamorFMOD_CREATESTREAM.Ifasoundwas44100sampleslongandyouwantedtoloopthewholesound,loopstartwouldbe0,andloopendwouldbe44099,not44100.Youwouldn'tusemillisecondsinthiscasebecausetheyarenotsampleaccurate.Ifloopendissmallerorequaltoloopstart,itwillresultinanerror.Ifloopstartorloopendislargerthanthelengthofthesound,itwillresultinanerror.
Issueswithstreamedaudio.(SoundscreatedwithwithSystem::createStreamorFMOD_CREATESTREAM).Whenchangingthelooppoints,soundscreatedwithSystem::createStreamorFMOD_CREATESTREAMmayalreadyhavebeenpre-bufferedandexecutedtheirlooplogicaheadoftime,beforethiscallwasevenmade.Thisisdependantonthesizeofthesoundversusthesizeofthestreamdecodebuffer.SeeFMOD_CREATESOUNDEXINFO.Ifthishappens,youmayneedtoreflushthestreambuffer.Todothis,youcancallChannel::setPositionwhichforcesareflushofthestreambuffer.Notethiswillusuallyonlyhappenifyouhavesoundsorlooppointsthataresmallerthanthestreamdecodebuffersize.Otherwiseyouwillnotnormallyencounteranyproblems.
SeeAlso
FMOD_TIMEUNITFMOD_MODESound::getLoopPointsSound::setLoopCountSystem::createStreamSystem::setStreamBufferSizeChannel::setPositionFMOD_CREATESOUNDEXINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::setModeSetsoraltersthemodeofasound.
C++Syntax
FMOD_RESULTSound::setMode(
FMOD_MODEmode
);
CSyntax
FMOD_RESULTFMOD_Sound_SetMode(
FMOD_SOUND*sound,
FMOD_MODEmode
);
Parameters
mode
Modebitstoset.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whencallingthisfunction,notethatitwillonlytakeeffectwhenthesoundisplayedagainwithSystem::playSound.Considerthismodethe'defaultmode'forwhenthesoundplays,notamodethatwillsuddenlychangeallcurrentlyplayinginstancesofthissound.
Flagssupported:FMOD_LOOP_OFFFMOD_LOOP_NORMALFMOD_LOOP_BIDI(onlyworkswithsoundscreatedwithFMOD_SOFTWARE.OtherwiseitwillbehaveasFMOD_LOOP_NORMAL)FMOD_3D_HEADRELATIVEFMOD_3D_WORLDRELATIVEFMOD_2D(seenotesforwin32hardwarevoices)FMOD_3D(seenotesforwin32hardwarevoices)FMOD_3D_INVERSEROLLOFFFMOD_3D_LINEARROLLOFFFMOD_3D_LINEARSQUAREROLLOFFFMOD_3D_CUSTOMROLLOFFFMOD_3D_IGNOREGEOMETRYFMOD_DONTRESTOREVIRTUAL
Issueswithstreamedaudio.(SoundscreatedwithwithSystem::createStreamorFMOD_CREATESTREAM).Whenchangingtheloopmode,soundscreatedwithSystem::createStreamorFMOD_CREATESTREAMmayalreadyhavebeenpre-bufferedandexecutedtheirlooplogicaheadoftime,beforethiscallwasevenmade.Thisisdependantonthesizeofthesoundversusthesizeofthestreamdecodebuffer.SeeFMOD_CREATESOUNDEXINFO.Ifthishappens,youmayneedtoreflushthestreambuffer.Todothis,youcancallChannel::setPositionwhichforcesareflushofthestreambuffer.Notethiswillusuallyonlyhappenifyouhavesoundsorlooppointsthataresmallerthanthestreamdecodebuffersize.Otherwiseyouwillnotnormallyencounteranyproblems.
IfFMOD_3D_IGNOREGEOMETRYisnotspecified,theflagwillbeclearedifitwasspecifiedpreviously.
SeeAlso
FMOD_MODESound::getModeSystem::setStreamBufferSize
System::playSoundSystem::createStreamChannel::setPositionFMOD_CREATESOUNDEXINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::setMusicChannelVolumeSetsthevolumeofaMOD/S3M/XM/IT/MIDImusicchannelvolume.
C++Syntax
FMOD_RESULTSound::setMusicChannelVolume(
intchannel,
floatvolume
);
CSyntax
FMOD_RESULTFMOD_Sound_SetMusicChannelVolume(
FMOD_SOUND*sound,
intchannel,
floatvolume
);
Parameters
channel
MOD/S3M/XM/IT/MIDImusicsubchanneltosetalinearvolumefor.
volume
Volumeofthechannelfrom0.0to1.0.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UseSound::getMusicNumChannelstogetthemaximumnumberofmusicchannelsinthesong.
SeeAlso
Sound::getMusicNumChannelsSound::getMusicChannelVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::setMusicSpeedSetstherelativespeedofMOD/S3M/XM/IT/MIDImusic.
C++Syntax
FMOD_RESULTSound::setMusicSpeed(
floatspeed
);
CSyntax
FMOD_RESULTFMOD_Sound_SetMusicSpeed(
FMOD_SOUND*sound,
floatspeed
);
Parameters
speed
Relativespeedofthesongfrom0.01to100.0.0.5=halfspeed,2.0=doublespeed.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Settingaspeedoutsidetheboundsof0.01to100.0willnotreturnanerror,itwillclampthevalue.
SeeAlso
Sound::getMusicSpeedSound::setMusicChannelVolumeSound::getMusicChannelVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::setSoundGroupMovesthesoundfromitsexistingSoundGrouptothespecifiedsoundgroup.
C++Syntax
FMOD_RESULTSound::setSoundGroup(
FMOD::SoundGroup*soundgroup
);
CSyntax
FMOD_RESULTFMOD_Sound_SetSoundGroup(
FMOD_SOUND*sound,
FMOD_SOUNDGROUP*soundgroup
);
Parameters
soundgroup
AddressofaSoundGroupobjecttomovethesoundto.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Bydefaultasoundislocatedinthe'mastersoundgroup'.ThiscanberetrievedwithSystem::getMasterSoundGroup.Puttingasoundinasoundgroup(orjustusingthemastersoundgroup)allowsforfunctionalitylikelimitingagroupofsoundstoacertainnumberofplaybacks
(seeSoundGroup::setMaxAudible).
SeeAlso
Sound::getSoundGroupSystem::getMasterSoundGroupSystem::createSoundGroupSoundGroup::setMaxAudible
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::setSubSoundAssignsasoundasa'subsound'ofanothersound.Asoundcancontainothersounds.Thesoundobjectthatisissuingthecommandwillbethe'parent'sound.
C++Syntax
FMOD_RESULTSound::setSubSound(
intindex,
FMOD::Sound*subsound
);
CSyntax
FMOD_RESULTFMOD_Sound_SetSubSound(
FMOD_SOUND*sound,
intindex,
FMOD_SOUND*subsound
);
Parameters
index
Indexwithinthesoundtosetthenewsoundtoasa'subsound'.
subsound
Soundobjecttosetasasubsoundwithinthissound.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifasubsoundissetwhichisamemberofasentence(SeeSound::setSubSoundSentence),thelooppointsofthesentencewillberesettoaloopstartof0andaloopendofthelengthofthesentenceminus1.Thismeansanysentencemusthaveitslooppointsre-setbytheuserifthisfunctioniscalledinthiscase.
SeeAlso
Sound::getNumSubSoundsSound::getSubSoundSound::setSubSoundSentence
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::setSubSoundSentenceForanysoundthathassubsounds,thisfunctionwilldeterminetheorderofplaybackofthesesubsounds,anditwillplay/stitchtogetherthesubsoundswithoutgaps.Thisisaveryusefulfeatureforthoseuserswantingtodoseamless/gaplessstreamplayback.(iesportscommentary,gaplessplaybackmediaplayersetc).
C++Syntax
FMOD_RESULTSound::setSubSoundSentence(
int*subsoundlist,
intnumsubsounds
);
CSyntax
FMOD_RESULTFMOD_Sound_SetSubSoundSentence(
FMOD_SOUND*sound,
int*subsoundlist,
intnumsubsounds
);
Parameters
subsoundlist
Pointertoanarrayofindicieswhicharethesubsoundstoplay.Onesubsoundcanbeincludedinthislistmultipletimesifrequired.
numsubsounds
Numberofindiciesinsidethesubsoundlistarray.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.Ifthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedinthe
FMOD_RESULTenumeration.
Remarks
ThecurrentlyplayingsubsoundinasentencecanbefoundwithChannel::getPositionandthetimeunitFMOD_TIMEUNIT_SENTENCE_SUBSOUND.ThisisusefulfordisplayingthecurrentlyplayingtrackofacdinawholeCDsentenceforexample.Forrealtimestitchingpurposes,itisbettertoknowthebufferedaheadoftimesubsoundindex.Thiscanbedonebyaddingtheflag(usingbitwiseOR)FMOD_TIMEUNIT_BUFFERED.IfFMOD_ERR_SUBSOUND_MODEisreturned,thenFMOD_CREATECOMPRESSEDSAMPLEhasbeenusedonachildsound,butnotontheparentsound,orviceversa.Anothercauseofthisistryingtomixastaticsamplewithastreamingsound.Modebitstodowiththismustmatch.Ausercanchangesubsoundsthatarenotplayingatthetime,tododynamicstitching/sentencingofsounds.
SeeAlso
System::playSoundSound::getSubSoundChannel::getPositionFMOD_TIMEUNIT
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::setUserDataSetsauservaluethattheSoundobjectwillstoreinternally.CanberetrievedwithSound::getUserData.
C++Syntax
FMOD_RESULTSound::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_Sound_SetUserData(
FMOD_SOUND*sound,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheSoundobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingSound::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
Sound::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::setVariationsChangestheplaybackbehaviourofasoundbyallowingrandomvariationstoplaybackparameterstobeset.
C++Syntax
FMOD_RESULTSound::setVariations(
floatfrequencyvar,
floatvolumevar,
floatpanvar
);
CSyntax
FMOD_RESULTFMOD_Sound_SetVariations(
FMOD_SOUND*sound,
floatfrequencyvar,
floatvolumevar,
floatpanvar
);
Parameters
frequencyvar
Frequencyvariationinhz.Frequencywillplayatitsdefaultfrequency,plusorminusarandomvaluewithinthisrange.Default=0.0.
volumevar
Volumevariation.0.0to1.0.Soundwillplayatitsdefaultvolume,plusorminusarandomvaluewithinthisrange.Default=0.0.
panvar
Panvariation.0.0to2.0.Soundwillplayatitsdefaultpan,plusorminusarandomvaluewithinthisrange.Panisfrom-1.0to+1.0normallysotherangecanbeamaximumof2.0inthiscase.Default=0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Sound::getVariations
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Sound::unlockReleasesprevioussampledatalockfromSound::lock.
C++Syntax
FMOD_RESULTSound::unlock(
void*ptr1,
void*ptr2,
unsignedintlen1,
unsignedintlen2
);
CSyntax
FMOD_RESULTFMOD_Sound_Unlock(
FMOD_SOUND*sound,
void*ptr1,
void*ptr2,
unsignedintlen1,
unsignedintlen2
);
Parameters
ptr1
Pointertothe1stlockedportionofsampledata,fromSound::lock.
ptr2
Pointertothe2ndlockedportionofsampledata,fromSound::lock.
len1
Lengthofdatainbytesthatwaslockedforptr1
len2
Lengthofdatainbytesthatwaslockedforptr2.Thiswillbe0ifthedatalockedhasn'twrappedattheendofthebuffer.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.Callthisfunctionafterdatahasbeenread/writtentofromSound::lock.Thisfunctionwilldoanypostprocessingnecessaryandifneeded,sendittosoundram.
SeeAlso
Sound::lockSystem::createSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelInterfaceChannel::addDSPChannel::get3DAttributesChannel::get3DConeOrientationChannel::get3DConeSettingsChannel::get3DCustomRolloffChannel::get3DDistanceFilterChannel::get3DDopplerLevelChannel::get3DMinMaxDistanceChannel::get3DOcclusionChannel::get3DPanLevelChannel::get3DSpreadChannel::getAudibilityChannel::getChannelGroupChannel::getCurrentSoundChannel::getDSPHeadChannel::getDelayChannel::getFrequencyChannel::getIndexChannel::getInputChannelMixChannel::getLoopCountChannel::getLoopPointsChannel::getLowPassGainChannel::getMemoryInfoChannel::getModeChannel::getMuteChannel::getPanChannel::getPausedChannel::getPositionChannel::getPriorityChannel::getReverbPropertiesChannel::getSpeakerLevelsChannel::getSpeakerMixChannel::getSpectrumChannel::getSystemObjectChannel::getUserData
Channel::getVolumeChannel::getWaveDataChannel::isPlayingChannel::isVirtualChannel::set3DAttributesChannel::set3DConeOrientationChannel::set3DConeSettingsChannel::set3DCustomRolloffChannel::set3DDistanceFilterChannel::set3DDopplerLevelChannel::set3DMinMaxDistanceChannel::set3DOcclusionChannel::set3DPanLevelChannel::set3DSpreadChannel::setCallbackChannel::setChannelGroupChannel::setDelayChannel::setFrequencyChannel::setInputChannelMixChannel::setLoopCountChannel::setLoopPointsChannel::setLowPassGainChannel::setModeChannel::setMuteChannel::setPanChannel::setPausedChannel::setPositionChannel::setPriorityChannel::setReverbPropertiesChannel::setSpeakerLevelsChannel::setSpeakerMixChannel::setUserDataChannel::setVolumeChannel::stop
FirelightTechnologiesFMODEx
Channel::addDSPThisfunctionaddsapre-createdDSPunitoreffecttotheheadoftheChannelDSPchain.
C++Syntax
FMOD_RESULTChannel::addDSP(
FMOD::DSP*dsp,
FMOD::DSPConnection**connection
);
CSyntax
FMOD_RESULTFMOD_Channel_AddDSP(
FMOD_CHANNEL*channel,
FMOD_DSP*dsp,
FMOD_DSPCONNECTION**connection
);
Parameters
dsp
Apointertoapre-createdDSPunittobeinsertedattheheadoftheChannelDSPchain.
connection
ApointertotheconnectioninvolvedbetweentheChannelDSPheadandthespecifieddspunit.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctionisawrapperfunctiontoinsertaDSPunitatthetopoftheChannelDSPchain.Itdisconnectstheheadunitfromitsinput,theninsertstheunitattheheadandreconnectsthepreviouslydisconnectedinputbackasasaninputtothenewunit.
Note:Theconnectionpointerretrievedherewillbecomeinvalidifyoudisconnectthe2dspunitsthatuseit.
SeeAlso
Channel::getDSPHeadSystem::createDSPSystem::createDSPByTypeSystem::createDSPByPluginSystem::addDSPChannelGroup::addDSPDSP::remove
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::get3DAttributesRetrievesthepositionandvelocityofa3dchannel.
C++Syntax
FMOD_RESULTChannel::get3DAttributes(
FMOD_VECTOR*pos,
FMOD_VECTOR*vel
);
CSyntax
FMOD_RESULTFMOD_Channel_Get3DAttributes(
FMOD_CHANNEL*channel,
FMOD_VECTOR*pos,
FMOD_VECTOR*vel
);
Parameters
pos
Addressofavariablethatreceivesthepositionin3Dspaceofthechannel.Optional.Specify0orNULLtoignore.
vel
Addressofavariablethatreceivesthevelocityin'distanceunitspersecond'in3Dspaceofthechannel.Seeremarks.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
A'distanceunit'isspecifiedbySystem::set3DSettings.Bydefaultthisissettometerswhichisadistancescaleof1.0.
SeeAlso
Channel::set3DAttributesFMOD_VECTORSystem::set3DSettings
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::get3DConeOrientationRetrievestheorientationofthesoundprojectionconeforthischannel.
C++Syntax
FMOD_RESULTChannel::get3DConeOrientation(
FMOD_VECTOR*orientation
);
CSyntax
FMOD_RESULTFMOD_Channel_Get3DConeOrientation(
FMOD_CHANNEL*channel,
FMOD_VECTOR*orientation
);
Parameters
orientation
Addressofavariablethatreceivestheorientationofthesoundprojectioncone.Thevectorinformationrepresentsthecenterofthesoundcone.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::set3DConeOrientation
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::get3DConeSettingsRetrievestheinsideandoutsideanglesofthesoundprojectioncone.
C++Syntax
FMOD_RESULTChannel::get3DConeSettings(
float*insideconeangle,
float*outsideconeangle,
float*outsidevolume
);
CSyntax
FMOD_RESULTFMOD_Channel_Get3DConeSettings(
FMOD_CHANNEL*channel,
float*insideconeangle,
float*outsideconeangle,
float*outsidevolume
);
Parameters
insideconeangle
Addressofavariablethatreceivestheinsideangleofthesoundprojectioncone,indegrees.Thisistheanglewithinwhichthesoundisatitsnormalvolume.Optional.Specify0orNULLtoignore.
outsideconeangle
Addressofavariablethatreceivestheoutsideangleofthesoundprojectioncone,indegrees.Thisistheangleoutsideofwhichthesoundisatitsoutsidevolume.Optional.Specify0orNULLtoignore.
outsidevolume
Addressofavariablethatreceivestheconeoutsidevolumeforthischannel.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::set3DConeSettingsSound::get3DConeSettings
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::get3DCustomRolloffRetrievesapointertothesound'scurrentcustomrolloffcurve.
C++Syntax
FMOD_RESULTChannel::get3DCustomRolloff(
FMOD_VECTOR**points,
int*numpoints
);
CSyntax
FMOD_RESULTFMOD_Channel_Get3DCustomRolloff(
FMOD_CHANNEL*channel,
FMOD_VECTOR**points,
int*numpoints
);
Parameters
points
Addressofavariabletoreceivethepointertothecurrentcustomrolloffpointlist.Optional.Specify0orNULLtoignore.
numpoints
Addressofavariabletoreceivethenumberofpointsinthecurrentcustomrolloffpointlist.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_VECTORChannel::set3DCustomRolloffSound::set3DCustomRolloffSound::get3DCustomRolloff
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::get3DDistanceFilterC++Syntax
FMOD_RESULTChannel::get3DDistanceFilter(
bool*custom,
float*customLevel,
float*centerFreq
);
CSyntax
FMOD_RESULTFMOD_Channel_Get3DDistanceFilter(
FMOD_CHANNEL*channel,
FMOD_BOOL*custom,
float*customLevel,
float*centerFreq
);
Parameters
custom
customLevel
centerFreq
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::get3DDopplerLevelRetrievesthecurrent3DdopplerlevelforthechannelsetbyChannel::set3DDopplerLevel.
C++Syntax
FMOD_RESULTChannel::get3DDopplerLevel(
float*level
);
CSyntax
FMOD_RESULTFMOD_Channel_Get3DDopplerLevel(
FMOD_CHANNEL*channel,
float*level
);
Parameters
level
Addressofavariabletoreceivesthecurrentdopplerscaleforthischannel.0=Nodoppler.1=Normaldoppler.5=max.Default=1.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::set3DDopplerLevel
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::get3DMinMaxDistanceRetrievesthecurrentminimumandmaximumaudibledistanceforachannel.
C++Syntax
FMOD_RESULTChannel::get3DMinMaxDistance(
float*mindistance,
float*maxdistance
);
CSyntax
FMOD_RESULTFMOD_Channel_Get3DMinMaxDistance(
FMOD_CHANNEL*channel,
float*mindistance,
float*maxdistance
);
Parameters
mindistance
Pointertoafloatingpointvaluetostoremindistance.Optional.Specify0orNULLtoignore.
maxdistance
Pointertoafloatingpointvaluetostoremaxdistance.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::set3DMinMaxDistanceSystem::set3DSettingsSound::set3DMinMaxDistance
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::get3DOcclusionRetrievestheocclusionfactorsforachannel.
C++Syntax
FMOD_RESULTChannel::get3DOcclusion(
float*directocclusion,
float*reverbocclusion
);
CSyntax
FMOD_RESULTFMOD_Channel_Get3DOcclusion(
FMOD_CHANNEL*channel,
float*directocclusion,
float*reverbocclusion
);
Parameters
directocclusion
Addressofavariablethatreceivestheocclusionfactorforavoiceforthedirectpath.0.0=notoccluded.1.0=fullyoccluded.Default=0.0.Optional.Specify0orNULLtoignore.
reverbocclusion
Addressofavariablethatreceivestheocclusionfactorforavoiceforthereverbmix.0.0=notoccluded.1.0=fullyoccluded.Default=0.0.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::set3DOcclusionChannelGroup::get3DOcclusion
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::get3DPanLevelRetrievesthecurrent3DmixlevelforthechannelsetbyChannel::set3DPanLevel.
C++Syntax
FMOD_RESULTChannel::get3DPanLevel(
float*level
);
CSyntax
FMOD_RESULTFMOD_Channel_Get3DPanLevel(
FMOD_CHANNEL*channel,
float*level
);
Parameters
level
0=SoundpansaccordingtoChannel::setSpeakerMix.1=Soundpansaccordingto3dposition.Default=1(allby3dposition).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::set3DPanLevelChannel::setSpeakerMix
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::get3DSpreadRetrievesthestereo(andabove)spreadanglespecifiedbyChannel::set3DSpread.
C++Syntax
FMOD_RESULTChannel::get3DSpread(
float*angle
);
CSyntax
FMOD_RESULTFMOD_Channel_Get3DSpread(
FMOD_CHANNEL*channel,
float*angle
);
Parameters
angle
Addressofavariablethatreceivesthespreadangleforsubchannels.0=allsubchannelsarelocatedatthesameposition.360=allsubchannelsarelocatedattheoppositeposition.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::set3DSpread
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getAudibilityReturnsthecombinedvolumeofthechannelafter3dsound,volume,channelgroupvolumeandgeometryocclusioncalculationshavebeenperformedonit.
C++Syntax
FMOD_RESULTChannel::getAudibility(
float*audibility
);
CSyntax
FMOD_RESULTFMOD_Channel_GetAudibility(
FMOD_CHANNEL*channel,
float*audibility
);
Parameters
audibility
Addressofavariablethatreceivesthechannelaudibilityvalue.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisdoesnotrepresentthewaveform,justthecalculatedvolumebasedon3ddistance,occlusion,volumeandchannelgroupvolume.ThisvalueisusedbytheFMODExvirtualchannelsystemtoorderitschannelsbetweenrealandvirtual.
SeeAlso
Channel::setVolumeChannel::getVolumeChannelGroup::setVolumeChannelGroup::getVolumeChannel::set3DOcclusionChannel::get3DOcclusionChannel::set3DAttributesChannel::get3DAttributes
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getChannelGroupRetrievesthecurrentlyassignedchannelgroupforthechannel.
C++Syntax
FMOD_RESULTChannel::getChannelGroup(
FMOD::ChannelGroup**channelgroup
);
CSyntax
FMOD_RESULTFMOD_Channel_GetChannelGroup(
FMOD_CHANNEL*channel,
FMOD_CHANNELGROUP**channelgroup
);
Parameters
channelgroup
Addressofavariabletoreceiveapointertothecurrentlyassignedchannelgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::setChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getCurrentSoundReturnsthecurrentlyplayingsoundforthischannel.
C++Syntax
FMOD_RESULTChannel::getCurrentSound(
FMOD::Sound**sound
);
CSyntax
FMOD_RESULTFMOD_Channel_GetCurrentSound(
FMOD_CHANNEL*channel,
FMOD_SOUND**sound
);
Parameters
sound
Addressofavariablethatreceivesthepointertothecurrentlyplayingsoundforthischannel.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifasoundisnotplayingthereturnedpointerwillbe0orNULL.
SeeAlso
System::playSoundSystem::playDSP
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getDSPHeadReturnsapointertotheDSPunitheadnodethathandlessoftwaremixingforthischannel.OnlyapplicabletochannelsplayingsoundscreatedwithFMOD_SOFTWARE.
C++Syntax
FMOD_RESULTChannel::getDSPHead(
FMOD::DSP**dsp
);
CSyntax
FMOD_RESULTFMOD_Channel_GetDSPHead(
FMOD_CHANNEL*channel,
FMOD_DSP**dsp
);
Parameters
dsp
AddressofavariablethatreceivespointertothecurrentheadDSPunitforthischannel.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
BydefaultachannelDSPunitusuallycontains1input,whichisthewavetable
input.IfSystem::playDSPhasbeenusedthentheinputtothechannelheadunitwillbetheunitthatwasspecifiedinthecall.SeethetutorialsformoreinformationonDSPnetworksandhowtomanipulatethem.
SeeAlso
System::createDSPSystem::createDSPByTypeSystem::playDSP
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getDelayGetsthecurrentlysetdelayvalues.
C++Syntax
FMOD_RESULTChannel::getDelay(
FMOD_DELAYTYPEdelaytype,
unsignedint*delayhi,
unsignedint*delaylo
);
CSyntax
FMOD_RESULTFMOD_Channel_GetDelay(
FMOD_CHANNEL*channel,
FMOD_DELAYTYPEdelaytype,
unsignedint*delayhi,
unsignedint*delaylo
);
Parameters
delaytype
SeeFMOD_DELAYTYPE.Thisdetermineswhatdelayhianddelaylowillrepresent.
delayhi
Addressofavariabletoreceivethetop(mostsignificant)32bitsofa64bitnumberrepresentingthetime.
delaylo
Addressofavariabletoreceivethebottom(leastsignificant)32bitsofa64bitnumberrepresentingthetime.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!OnlyworkswithsoundscreatedwithFMOD_SOFTWARE.
IfFMOD_DELAYTYPE_DSPCLOCK_STARTisused,thiswillbethevalueoftheDSPclocktimeatthetimeSystem::playSoundwascalled,iftheuserhasnotcalledChannel::setDelay..Whatisthe'dspclock'?TheDSPclockrepresentstheoutputstreamtothesoundcard,andisincrementedbytheoutputrateeverysecond(thoughofcoursewithmuchfinergranularitythanthis).Soifyouroutputrateis48khz,theDSPclockwillincrementby48000persecond.Thehiandlovaluesrepresentthis64bitnumber,withthedelaylorepresentingtheleastsignificant32bitsandthedelayhivaluerepresentingthemostsignificant32bits.
SeeAlso
FMOD_DELAYTYPEChannel::setDelaySystem::playSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getFrequencyReturnsthefrequencyinHZofthechannel.
C++Syntax
FMOD_RESULTChannel::getFrequency(
float*frequency
);
CSyntax
FMOD_RESULTFMOD_Channel_GetFrequency(
FMOD_CHANNEL*channel,
float*frequency
);
Parameters
frequency
AddressofavariablethatreceivesthecurrentfrequencyofthechannelinHZ.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::setFrequency
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getIndexRetrievestheinternalchannelindexforachannel.
C++Syntax
FMOD_RESULTChannel::getIndex(
int*index
);
CSyntax
FMOD_RESULTFMOD_Channel_GetIndex(
FMOD_CHANNEL*channel,
int*index
);
Parameters
index
Addressofavariabletoreceivethechannelindex.Thiswillbefrom0tothevaluespecifiedinSystem::initminus1.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Notethatworkingwithchannelindiciesdirectlyisnotrecommended.ItisrecommendedthatyouuseFMOD_CHANNEL_FREEfortheindexinSystem::playSoundtouseFMOD'schannelmanager.
SeeAlso
System::playSoundSystem::init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getInputChannelMixRetrievestheincominglevelsforachannelinasound.Amonosoundhas1inputchannel,astereohas2,etc.Itdependsonwhattypeofsoundisplayingonthechannelatthetime.
C++Syntax
FMOD_RESULTChannel::getInputChannelMix(
float*levels,
intnumlevels
);
CSyntax
FMOD_RESULTFMOD_Channel_GetInputChannelMix(
FMOD_CHANNEL*channel,
float*levels,
intnumlevels
);
Parameters
levels
Addressofanarrayoffloatvolumelevels,from0.0to1.0.Theserepresenttheincomingchannelsforthesoundplayingonthechannelatthetime.
numlevels
Numberoffloatstoreceiveintothearray.Maximum=themaximumnumberofinputchannelsspecifiedinSystem::setSoftwareFormat.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisdoesnotaffectwhichspeakersthesoundisroutedto.ThiscanbeusedinconjunctionwithfunctionslikeChannel::setPan,Channel::setSpeakerMix,Channel::setSpeakerLevels.Thisfunctiononlyscalestheinputchannelsfromthesound.
SeeAlso
Channel::setInputChannelMixChannel::setPanChannel::setSpeakerMixChannel::setSpeakerLevelsSystem::setSoftwareFormat
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getLoopCountRetrievesthecurrentloopcountforthespecifiedchannel.
C++Syntax
FMOD_RESULTChannel::getLoopCount(
int*loopcount
);
CSyntax
FMOD_RESULTFMOD_Channel_GetLoopCount(
FMOD_CHANNEL*channel,
int*loopcount
);
Parameters
loopcount
Addressofavariablethatreceivesthenumberoftimesachannelwillloopbeforestopping.0=oneshot.1=looponcethenstop.-1=loopforever.Default=-1
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionretrievesthecurrentloopcountdownvalueforthechannelbeingplayed.
Thismeansitwilldecrementuntilreaching0,asitplays.Toresetthevalue,useChannel::setLoopCount.
SeeAlso
Channel::setLoopCount
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getLoopPointsRetrievesthelooppointsforachannel.
C++Syntax
FMOD_RESULTChannel::getLoopPoints(
unsignedint*loopstart,
FMOD_TIMEUNITloopstarttype,
unsignedint*loopend,
FMOD_TIMEUNITloopendtype
);
CSyntax
FMOD_RESULTFMOD_Channel_GetLoopPoints(
FMOD_CHANNEL*channel,
unsignedint*loopstart,
FMOD_TIMEUNITloopstarttype,
unsignedint*loopend,
FMOD_TIMEUNITloopendtype
);
Parameters
loopstart
Addressofavariabletoreceivetheloopstartpoint.Thispointintimeisplayed,soitisinclusive.Optional.Specify0orNULLtoignore.
loopstarttype
Thetimeformatusedforthereturnedloopstartpoint.SeeFMOD_TIMEUNIT.
loopend
Addressofavariabletoreceivetheloopendpoint.Thispointintimeisplayed,soitisinclusive.Optional.Specify0orNULLtoignore.
loopendtype
Thetimeformatusedforthereturnedloopendpoint.SeeFMOD_TIMEUNIT.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_TIMEUNITChannel::setLoopPoints
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getLowPassGainRetrievesthegainofthedrysignalwhenlowpassfilteringisapplied.
C++Syntax
FMOD_RESULTChannel::getLowPassGain(
float*gain
);
CSyntax
FMOD_RESULTFMOD_Channel_GetLowPassGain(
FMOD_CHANNEL*channel,
float*gain
);
Parameters
gain
Addressofavariabletoreceivethegainlevel,from0.0to1.0inclusive.0.0=silent,1.0=fullvolume.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::setLowPassGain
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTChannel::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_Channel_GetMemoryInfo(
FMOD_CHANNEL*channel,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getModeRetrievesthecurrentmodebitflagsforthecurrentchannel.
C++Syntax
FMOD_RESULTChannel::getMode(
FMOD_MODE*mode
);
CSyntax
FMOD_RESULTFMOD_Channel_GetMode(
FMOD_CHANNEL*channel,
FMOD_MODE*mode
);
Parameters
mode
AddressofaanFMOD_MODEvariablethatreceivesthecurrentmodeforthischannel.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::setMode
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getMuteReturnsthecurrentmutestatusofthechannel.
C++Syntax
FMOD_RESULTChannel::getMute(
bool*mute
);
CSyntax
FMOD_RESULTFMOD_Channel_GetMute(
FMOD_CHANNEL*channel,
FMOD_BOOL*mute
);
Parameters
mute
true=channelismuted(silent),false=channelisatnormalvolume.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::setMute
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getPanReturnsthepanpositionofthechannel.
C++Syntax
FMOD_RESULTChannel::getPan(
float*pan
);
CSyntax
FMOD_RESULTFMOD_Channel_GetPan(
FMOD_CHANNEL*channel,
float*pan
);
Parameters
pan
Addressofavariabletoreceivetheleft/rightpanlevelforthechannel,from-1.0to1.0inclusive.-1.0=Fullleft,1.0=fullright.Default=0.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::setPan
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getPausedRetrievesthepausedstateofthechannel.
C++Syntax
FMOD_RESULTChannel::getPaused(
bool*paused
);
CSyntax
FMOD_RESULTFMOD_Channel_GetPaused(
FMOD_CHANNEL*channel,
FMOD_BOOL*paused
);
Parameters
paused
Addressofavariablethatreceivesthecurrentpausedstate.true=thesoundispaused.false=thesoundisnotpaused.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::setPaused
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getPositionReturnsthecurrentPCMoffsetorplaybackpositionforthespecifiedchannel.
C++Syntax
FMOD_RESULTChannel::getPosition(
unsignedint*position,
FMOD_TIMEUNITpostype
);
CSyntax
FMOD_RESULTFMOD_Channel_GetPosition(
FMOD_CHANNEL*channel,
unsignedint*position,
FMOD_TIMEUNITpostype
);
Parameters
position
Addressofavariablethatreceivesthepositionofthesound.
postype
Timeunittoretrieveintothepositionparameter.SeeFMOD_TIMEUNIT.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Certaintimeunitsdonotworkdependingonthefileformat.ForexampleFMOD_TIMEUNIT_MODORDERwillnotworkwithanmp3file.APCMsampleisaunitofmeasurementinaudiothatcontainsthedataforoneaudibleelementofsound.1samplemightbe16bitstereo,so1samplecontains4bytes.44,100samplesofa44khzsoundwouldrepresent1secondofdata.Ifthesoundisastream,andifyouareusingFMOD_NONBLOCKING,notethatyouhaveusedChannel::setPosition,thenthestreamwillgointoFMOD_OPENSTATE_SETPOSITIONstate(seeSound::getOpenState)andsoundcommandswillreturnFMOD_ERR_NOTREADY.Channel::getPositionwillnotupdateuntilthisnon-blockingsetpositionoperationhascompleted.
SeeAlso
Channel::setPositionFMOD_TIMEUNITSound::getLength
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getPriorityRetrievesthecurrentpriorityforthischannel.
C++Syntax
FMOD_RESULTChannel::getPriority(
int*priority
);
CSyntax
FMOD_RESULTFMOD_Channel_GetPriority(
FMOD_CHANNEL*channel,
int*priority
);
Parameters
priority
Addressofavariablethatreceivesthecurrentchannelpriority.0to256inclusive.0=mostimportant.256=leastimportant.Default=128.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::setPriority
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getReverbPropertiesRetrievesthecurrentreverbpropertiesforthischannel.
C++Syntax
FMOD_RESULTChannel::getReverbProperties(
FMOD_REVERB_CHANNELPROPERTIES*prop
);
CSyntax
FMOD_RESULTFMOD_Channel_GetReverbProperties(
FMOD_CHANNEL*channel,
FMOD_REVERB_CHANNELPROPERTIES*prop
);
Parameters
prop
AddressofavariabletoreceivetheFMOD_REVERB_CHANNELPROPERTIESinformation.Remembertoclearthisstructurebeforecallingthisfunction,orspecifythecorrectreverbinstancewithFMOD_REVERB_CHANNELFLAGS.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!Itisimportanttoclearthisstructureto0beforecalling,oratleastspecify
whichreverbinstanceyouaretalkingaboutbyusingtheFlagsmemberofFMOD_REVERB_CHANNELPROPERTIES,otherwiseyoumaygetanFMOD_ERR_REVERB_INSTANCEerror.
SeeAlso
Channel::setReverbPropertiesFMOD_REVERB_CHANNELPROPERTIESFMOD_REVERB_CHANNELFLAGS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getSpeakerLevelsRetrievesthecurrentpanmatrixlevelsettingsfromChannel::setSpeakerLevels.
C++Syntax
FMOD_RESULTChannel::getSpeakerLevels(
FMOD_SPEAKERspeaker,
float*levels,
intnumlevels
);
CSyntax
FMOD_RESULTFMOD_Channel_GetSpeakerLevels(
FMOD_CHANNEL*channel,
FMOD_SPEAKERspeaker,
float*levels,
intnumlevels
);
Parameters
speaker
Thespeakeridtogetthelevelsfor.Thiscanbecasttoanintegerifyouareusingadevicewithmorethanthepre-definedspeakerrange.
levels
Addressofavariablethatreceivesthecurrentlevelsforthechannel.Thisisanarrayoffloatingpointvalues.Thedestinationarraysizecanbespecifiedwiththenumlevelsparameter.
numlevels
Numberoffloatsinthedestinationarray.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctiondoesnotreturnlevelvaluesreflectingChannel::setVolume.Volumeisaseparatescalartothepanmatrixlevels.
SeeAlso
Channel::setSpeakerLevelsChannel::setPanChannel::setVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getSpeakerMixSetsthechannel'sspeakervolumelevelsforeachspeakerindividually.
C++Syntax
FMOD_RESULTChannel::getSpeakerMix(
float*frontleft,
float*frontright,
float*center,
float*lfe,
float*backleft,
float*backright,
float*sideleft,
float*sideright
);
CSyntax
FMOD_RESULTFMOD_Channel_GetSpeakerMix(
FMOD_CHANNEL*channel,
float*frontleft,
float*frontright,
float*center,
float*lfe,
float*backleft,
float*backright,
float*sideleft,
float*sideright
);
Parameters
frontleft
Addressofavariabletoreceivethecurrentvolumelevelforthischannelinthefrontleftspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume,upto5.0=5xamplification.
frontright
Addressofavariabletoreceivethecurrentvolumelevelforthischannelinthe
frontrightspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume,upto5.0=5xamplification.
center
Addressofavariabletoreceivethecurrentvolumelevelforthischannelinthecenterspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume,upto5.0=5xamplification.
lfe
Addressofavariabletoreceivethecurrentvolumelevelforthischannelinthesubwooferspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume,upto5.0=5xamplification.
backleft
Addressofavariabletoreceivethecurrentvolumelevelforthischannelinthebackleftspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume,upto5.0=5xamplification.
backright
Addressofavariabletoreceivethecurrentvolumelevelforthischannelinthebackrightspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume,upto5.0=5xamplification.
sideleft
Addressofavariabletoreceivethecurrentvolumelevelforthischannelinthesideleftspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume,upto5.0=5xamplification.
sideright
Addressofavariabletoreceivethecurrentvolumelevelforthischannelinthesiderightspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume,upto5.0=5xamplification.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
For3Dsound,thevaluessetherearenotrepresentativeofthe3dmix.For3DsoundthisfunctionismainlyforretrievingtheLFEvalueifitwassetbytheuser.ThisfunctionisnotaffectedbyChannel::setSpeakerLevels.ThisfunctiononlyreturnsthelevelssetbyChannel::setSpeakerMix.
SeeAlso
Channel::setSpeakerMixChannel::setSpeakerLevels
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getSpectrumRetrievesthespectrumfromthecurrentlyplayingoutputsignalforthecurrentchannelonly.
C++Syntax
FMOD_RESULTChannel::getSpectrum(
float*spectrumarray,
intnumvalues,
intchanneloffset,
FMOD_DSP_FFT_WINDOWwindowtype
);
CSyntax
FMOD_RESULTFMOD_Channel_GetSpectrum(
FMOD_CHANNEL*channel,
float*spectrumarray,
intnumvalues,
intchanneloffset,
FMOD_DSP_FFT_WINDOWwindowtype
);
Parameters
spectrumarray
Addressofavariablethatreceivesthespectrumdata.Thisisanarrayoffloatingpointvalues.Datawillrangeis0.0to1.0.Decibels=10.0f*(float)log10(val)*2.0f;Seeremarksforwhatthedatarepresents.
numvalues
Sizeofarrayinfloatingpointvaluesbeingpassedtothefunction.Mustbeapowerof2.(ie128/256/512etc).Min=64.Max=8192.
channeloffset
Channelofthesignaltoanalyze.Ifthesignalismultichannel(suchasastereo
output),thenthisvaluerepresentswhichchanneltoanalyze.Onastereosignal0=left,1=right.
windowtype
"Pre-FFT"windowmethod.ThisfiltersthePCMdatabeforeenteringthespectrumanalyzertoreducetransientfrequencyerrorformoreaccurateresults.SeeFMOD_DSP_FFT_WINDOWfordifferenttypesoffftwindowtechniquespossibleandforamoredetailedexplanation.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thelargerthenumvalues,themoreCPUtheFFTwilltake.Choosetherightvaluetotradeoffbetweenaccuracy/speed.Thelargerthenumvalues,themore'lag'thespectrumwillseemtoinherit.ThisisbecausetheFFTwindowsizestretchestheanalysisbackintimetowhatwasalreadyplayed.Forexampleifthenumvaluessizehappenedtobe44100andtheoutputratewas44100itwouldbeanalyzingthepastsecondofdata,andgivingyoutheaveragespectrumoverthattimeperiod.IfyouarenotdisplayingtheresultindB,thenthedatamayseemsmallerthanitshouldbe.Todisplayityoumaywanttonormalizethedata-thatis,findthemaximumvalueintheresultingspectrum,andscaleallvaluesinthearrayby1/max.(ieifthemaxwas0.5f,thenitwouldbecome1).Togetthespectrumforbothchannelsofastereosignal,callthisfunctiontwice,oncewithchanneloffset=0,andagainwithchanneloffset=1.Thenaddthespectrumstogetheranddivideby2togettheaveragespectrumforbothchannels.
Whatthedatarepresents.Toworkoutwhateachentryinthearrayrepresents,usethisformula
entry_hz=(output_rate/2)/numvalues
Thearrayrepresentsamplitudesofeachfrequencybandfrom0hztothenyquistrate.Thenyquistrateisequaltotheoutputratedividedby2.ForexamplewhenFMODissetto44100hzoutput,therangeofrepresentedfrequencieswillbe0hzto22049hz,atotalof22050hzrepresented.Ifinthesameexample,1024waspassedtothisfunctionasthenumvalues,eachentry'scontributionwouldbeasfollows.
entry_hz=(44100/2)/1024
entry_hz=21.53hz
Note:ThisfunctiononlydisplaysdataforsoundsplayingthatwerecreatedwithFMOD_SOFTWARE.FMOD_HARDWAREbasedsoundsareplayedusingthesoundcarddriverandarenotaccessable.
SeeAlso
FMOD_DSP_FFT_WINDOWSystem::getSpectrumChannelGroup::getSpectrumSystem::getWaveData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getSystemObjectRetrievestheparentSystemobjectthatwasusedtocreatethisobject.
C++Syntax
FMOD_RESULTChannel::getSystemObject(
FMOD::System**system
);
CSyntax
FMOD_RESULTFMOD_Channel_GetSystemObject(
FMOD_CHANNEL*channel,
FMOD_SYSTEM**system
);
Parameters
system
AddressofavariablethatreceivestheSystemobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::playSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getUserDataRetrievestheuservaluethatthatwassetbycallingtheChannel::setUserDatafunction.
C++Syntax
FMOD_RESULTChannel::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_Channel_GetUserData(
FMOD_CHANNEL*channel,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeChannel::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
NOTE:Ifthischannelwasspawnedbytheeventsystemthenitsuserdatafieldwillbeset,bytheeventsystem,totheeventinstancehandlethatspawnedit.Use
thisfunctiontogofromanarbitrarychannelbackuptotheeventthatownsit.
SeeAlso
Channel::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getVolumeRetrievesthevolumelevelforthechannel.
C++Syntax
FMOD_RESULTChannel::getVolume(
float*volume
);
CSyntax
FMOD_RESULTFMOD_Channel_GetVolume(
FMOD_CHANNEL*channel,
float*volume
);
Parameters
volume
Addressofavariabletoreceivethechannelvolumelevel,from0.0to1.0inclusive.0.0=silent,1.0=fullvolume.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::setVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::getWaveDataRetrievesapointertoablockofPCMdatathatrepresentsthecurrentlyplayingwaveformonthischannel.Thisfunctionisusefulforaveryeasywaytoplotanoscilliscope.
C++Syntax
FMOD_RESULTChannel::getWaveData(
float*wavearray,
intnumvalues,
intchanneloffset
);
CSyntax
FMOD_RESULTFMOD_Channel_GetWaveData(
FMOD_CHANNEL*channel,
float*wavearray,
intnumvalues,
intchanneloffset
);
Parameters
wavearray
Addressofavariablethatreceivesthecurrentlyplayingwaveformdata.Thisisanarrayoffloatingpointvalues.
numvalues
Numberoffloatstowritetothearray.Maximumvalue=16384.
channeloffset
Offsetintomultichanneldata.Monochannelsuse0.Stereochannelsuse0=left,1=right.Morethanstereousetheappropriateindex.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisistheactualresampledpcmdatawindowatthetimethefunctioniscalled.
Donotusethisfunctiontotryanddisplaythewholewaveformofthesound,asthisismoreofa'snapshot'ofthecurrentwaveformatthetimeitiscalled,andcouldreturnthesamedataifitiscalledveryquicklyinsuccession.SeetheDSPAPItocaptureacontinualstreamofwavedataasitplays,orseeSound::lock/Sound::unlockifyouwanttosimplydisplaythewaveformofasound.
Thisfunctionallowsretrievalofleftandrightdataforastereosoundindividually.Tocombinethemintoonesignal,simplyaddtheentriesofeachseperatebuffertogetherandthendividethemby2.Note:ThisfunctiononlydisplaysdataforsoundsplayingthatwerecreatedwithFMOD_SOFTWARE.FMOD_HARDWAREbasedsoundsareplayedusingthesoundcarddriverandarenotaccessable.
SeeAlso
Channel::getSpectrumChannelGroup::getWaveDataSystem::getWaveDataSound::lockSound::unlock
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::isPlayingReturnstheplayingstateforthecurrentchannel.
C++Syntax
FMOD_RESULTChannel::isPlaying(
bool*isplaying
);
CSyntax
FMOD_RESULTFMOD_Channel_IsPlaying(
FMOD_CHANNEL*channel,
FMOD_BOOL*isplaying
);
Parameters
isplaying
Addressofavariablethatreceivesthecurrentchannel'splayingstatus.true=thechanneliscurrentlyplayingasound.false=thechannelisnotplayingasound.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::playSoundSystem::playDSP
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::isVirtualReturnsthecurrentchannel'sstatusofwhetheritisvirtual(emulated)ornotduetoFMODEx'svirtualchannelmanagementsystem.
C++Syntax
FMOD_RESULTChannel::isVirtual(
bool*isvirtual
);
CSyntax
FMOD_RESULTFMOD_Channel_IsVirtual(
FMOD_CHANNEL*channel,
FMOD_BOOL*isvirtual
);
Parameters
isvirtual
Addressofavariablethatreceivesthecurrentchannel'svirtualstatus.true=thechannelisinaudibleandcurrentlybeingemulatedatnocpucost.false=thechannelisarealhardwareorsoftwarevoiceandshouldbeaudible.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Virtualchannelsarenotaudible,becausetherearenomorerealhardwareor
softwarechannelsavailable.Ifyouareplottingvirtualvoicesvsrealvoicesgraphically,andwonderingwhyFMODsometimeschoosesseeminglyrandomchannelstobevirtualthatareusuallyfaraway,thatisbecausetheyareprobablysilent.Itdoesn'tmatterwhicharevirtualandwhicharenotiftheyaresilent.Virtualvoicesarenotcalculationon'closesttolistener'calculation,theyarebasedonaudibility.SeethetutorialintheFMODExdocumentationformoreinformationonvirtualchannels.
SeeAlso
System::playSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::set3DAttributesSetsthepositionandvelocityofa3dchannel.
C++Syntax
FMOD_RESULTChannel::set3DAttributes(
constFMOD_VECTOR*pos,
constFMOD_VECTOR*vel
);
CSyntax
FMOD_RESULTFMOD_Channel_Set3DAttributes(
FMOD_CHANNEL*channel,
constFMOD_VECTOR*pos,
constFMOD_VECTOR*vel
);
Parameters
pos
Positionin3Dspaceofthechannel.Specifying0/nullwillignorethisparameter.
vel
Velocityin'distanceunitspersecond'in3Dspaceofthechannel.Seeremarks.Specifying0/nullwillignorethisparameter.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
A'distanceunit'isspecifiedbySystem::set3DSettings.Bydefaultthisissettometerswhichisadistancescaleof1.0.
Forastereo3dsound,youcansetthespreadoftheleft/rightpartsinspeakerspacebyusingChannel::set3DSpread.
SeeAlso
Channel::get3DAttributesFMOD_VECTORSystem::set3DSettingsChannel::set3DSpread
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::set3DConeOrientationSetstheorientationofthesoundprojectioncone.
C++Syntax
FMOD_RESULTChannel::set3DConeOrientation(
FMOD_VECTOR*orientation
);
CSyntax
FMOD_RESULTFMOD_Channel_Set3DConeOrientation(
FMOD_CHANNEL*channel,
FMOD_VECTOR*orientation
);
Parameters
orientation
PointertoanFMOD_VECTORdefiningthecoordinatesofthesoundconeorientationvector.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionhasnoeffectunlesstheconeangleandconeoutsidevolumehavealsobeensettovaluesotherthanthedefault.
SeeAlso
Channel::get3DConeOrientationChannel::set3DConeSettingsSound::set3DConeSettingsFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::set3DConeSettingsSetstheinsideandoutsideanglesofthesoundprojectioncone,aswellasthevolumeofthesoundoutsidetheoutsideangleofthesoundprojectioncone.
C++Syntax
FMOD_RESULTChannel::set3DConeSettings(
floatinsideconeangle,
floatoutsideconeangle,
floatoutsidevolume
);
CSyntax
FMOD_RESULTFMOD_Channel_Set3DConeSettings(
FMOD_CHANNEL*channel,
floatinsideconeangle,
floatoutsideconeangle,
floatoutsidevolume
);
Parameters
insideconeangle
Insideconeangle,indegrees.Thisistheanglewithinwhichthesoundisatitsnormalvolume.Mustnotbegreaterthanoutsideconeangle.Default=360.
outsideconeangle
Outsideconeangle,indegrees.Thisistheangleoutsideofwhichthesoundisatitsoutsidevolume.Mustnotbelessthaninsideconeangle.Default=360.
outsidevolume
Coneoutsidevolume,from0to1.0.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::get3DConeSettingsChannel::set3DConeOrientationSound::set3DConeSettings
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::set3DCustomRolloffPointachanneltouseacustomrolloffcurve.MustbeusedinconjunctionwithFMOD_3D_CUSTOMROLLOFFflagtobeactivated.
C++Syntax
FMOD_RESULTChannel::set3DCustomRolloff(
FMOD_VECTOR*points,
intnumpoints
);
CSyntax
FMOD_RESULTFMOD_Channel_Set3DCustomRolloff(
FMOD_CHANNEL*channel,
FMOD_VECTOR*points,
intnumpoints
);
Parameters
points
AnarrayofFMOD_VECTORstructureswherex=distanceandy=volumefrom0.0to1.0.zshouldbesetto0.
numpoints
Thenumberofpointsinthearray.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!Thisfunctiondoesnotduplicatethememoryforthepointsinternally.ThepointeryoupasstoFMODmustremainvaliduntilthereisnomoreuseforit.Donotfreethememorywhileinuse,orusealocalvariablethatgoesoutofscopewhileinuse.
Pointsmustbesortedbydistance!PassinganunsortedlisttoFMODwillresultinanerror.
Setthepointsparameterto0orNULLtodisablethepoints.IfFMOD_3D_CUSTOMROLLOFFissetandtherolloffcurveis0,FMODwillreverttoinversecurverolloff.
MinandmaxdistancearemeaninglesswhenFMOD_3D_CUSTOMROLLOFFisusedandthevaluesareignored.
Hereisanexampleofacustomarrayofpoints.
FMOD_VECTORcurve[3]=
{
{0.0f,1.0f,0.0f},
{2.0f,0.2f,0.0f},
{20.0f,0.0f,0.0f}
};
xrepresentsthedistance,yrepresentsthevolume.zisalways0.Distancesbetweenpointsarelinearlyinterpolated.Notethatafterthehighestdistancespecified,thevolumeinthelastentryisusedfromthatdistanceonwards.
SeeAlso
FMOD_MODEFMOD_VECTORChannel::get3DCustomRolloffSound::set3DCustomRolloffSound::get3DCustomRolloff
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::set3DDistanceFilterC++Syntax
FMOD_RESULTChannel::set3DDistanceFilter(
boolcustom,
floatcustomLevel,
floatcenterFreq
);
CSyntax
FMOD_RESULTFMOD_Channel_Set3DDistanceFilter(
FMOD_CHANNEL*channel,
FMOD_BOOLcustom,
floatcustomLevel,
floatcenterFreq
);
Parameters
custom
customLevel
centerFreq
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::set3DDopplerLevelSetsthechannelspecificdopplerscaleforthechannel.
C++Syntax
FMOD_RESULTChannel::set3DDopplerLevel(
floatlevel
);
CSyntax
FMOD_RESULTFMOD_Channel_Set3DDopplerLevel(
FMOD_CHANNEL*channel,
floatlevel
);
Parameters
level
0=Nodoppler.1=Normaldoppler.5=max.Default=1.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::get3DDopplerLevel
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::set3DMinMaxDistanceSetstheminimumandmaximumaudibledistanceforachannel.
C++Syntax
FMOD_RESULTChannel::set3DMinMaxDistance(
floatmindistance,
floatmaxdistance
);
CSyntax
FMOD_RESULTFMOD_Channel_Set3DMinMaxDistance(
FMOD_CHANNEL*channel,
floatmindistance,
floatmaxdistance
);
Parameters
mindistance
Thechannel'sminimumvolumedistancein"units".Seeremarksformoreonunits.
maxdistance
Thechannel'smaximumvolumedistancein"units".Seeremarksformoreonunits.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
MinDistanceistheminimumdistancethatthesoundemitterwillceasetocontinuegrowinglouderat(asitapproachesthelistener).Withinthemindistanceitstaysattheconstantloudestvolumepossible.Outsideofthismindistanceitbeginstoattenuate.MaxDistanceisthedistanceasoundstopsattenuatingat.Beyondthispointitwillstayatthevolumeitwouldbeatmaxdistanceunitsfromthelistenerandwillnotattenuateanymore.MinDistanceisusefultogivetheimpressionthatthesoundisloudorsoftin3dspace.Anexampleofthisisasmallquietobject,suchasabumblebee,whichyoucouldsetamindistanceofto0.1forexample,whichwouldcauseittoattenuatequicklyanddissapearwhenonlyafewmetersawayfromthelistener.Anotherexampleisajumbojet,whichyoucouldsettoamindistanceof100.0,whichwouldkeepthesoundvolumeatmaxuntilthelistenerwas100metersaway,thenitwouldbehundredsofmetersmorebeforeitwouldfadeout.
Insummary,increasethemindistanceofasoundtomakeit'louder'ina3dworld,anddecreaseittomakeit'quieter'ina3dworld.maxdistanceiseffectivelyobsoleteunlessyouneedthesoundtostopfadingoutatacertainpoint.Donotadjustthisfromthedefaultifyoudontneedto.Somepeoplehavetheconfusionthatmaxdistanceisthepointthesoundwillfadeoutto,thisisnotthecase.
A'distanceunit'isspecifiedbySystem::set3DSettings.Bydefaultthisissettometerswhichisadistancescaleof1.0.Thedefaultunitsforminimumandmaximumdistancesare1.0and10000.0f.Volumedropsoffatmindistance/distance.TodefinetheminandmaxdistancepersoundandnotperchanneluseSound::set3DMinMaxDistance.
IfFMOD_3D_CUSTOMROLLOFFisused,thenthesevaluesarestored,butignoredin3dprocessing.
SeeAlso
Channel::get3DMinMaxDistanceSystem::set3DSettingsSound::set3DMinMaxDistance
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::set3DOcclusionSetstheocclusionfactorsforachannel.IftheFMODgeometryengineisnotbeingused,thisfunctioncanbecalledtoproducethesameaudibleeffects,justwithoutthebuiltinpolygonprocessing.FMOD'sinternalgeometryenginecallsthisfunction.
C++Syntax
FMOD_RESULTChannel::set3DOcclusion(
floatdirectocclusion,
floatreverbocclusion
);
CSyntax
FMOD_RESULTFMOD_Channel_Set3DOcclusion(
FMOD_CHANNEL*channel,
floatdirectocclusion,
floatreverbocclusion
);
Parameters
directocclusion
Occlusionfactorforavoiceforthedirectpath.0.0=notoccluded.1.0=fullyoccluded.Default=0.0.
reverbocclusion
Occlusionfactorforavoiceforthereverbmix.0.0=notoccluded.1.0=fullyoccluded.Default=0.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.Ifthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedinthe
FMOD_RESULTenumeration.
Remarks
NormallythevolumeissimplyattenuatedbythedirectOcclusionfactor.IfFMOD_INIT_SOFTWARE_OCCLUSIONisspecified,FMOD_SOFTWAREbasedsoundswillalsousefrequencyfiltering,withaverysmallCPUhit.
SeeAlso
Channel::get3DOcclusionChannelGroup::set3DOcclusionFMOD_INITFLAGS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::set3DPanLevelSetshowmuchthe3denginehasaneffectonthechannel,versusthatsetbyChannel::setPan,Channel::setSpeakerMix,Channel::setSpeakerLevels.
C++Syntax
FMOD_RESULTChannel::set3DPanLevel(
floatlevel
);
CSyntax
FMOD_RESULTFMOD_Channel_Set3DPanLevel(
FMOD_CHANNEL*channel,
floatlevel
);
Parameters
level
1=Soundpansandattenuatesaccordingto3dposition.0=Attenuationisignoredandpan/speakerlevelsaredefinedbyChannel::setPan,Channel::setSpeakerMix,Channel::setSpeakerLevels.Default=1(allby3Dposition).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
OnlyaffectssoundscreatedFMOD_3D.
Usefulformorhpingasoundbetween3Dand2D.Thisismostcommoninvolumetricsound,whenthesoundgoesfromdirectional,to'allaroundyou'(anddoesn'tpanaccordingtolistenerposition/direction).FMOD_INIT_SOFTWARE_HRTFisalsointerpolatedtobe'off'iflevel=0,sothatyoudonotgetamufflingeffectbasedonlocationwhenthesoundissupposedtobeeffectively2D.
SeeAlso
Channel::get3DPanLevelChannel::setSpeakerMixChannel::setPanChannel::setSpeakerLevels
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::set3DSpreadSetsthespreadofa3dsoundinspeakerspace.Normallya3dsoundisaimedatonepositioninaspeakerarraydependingonthe3dposition,togiveitdirection.Leftandrightpartsofastereosoundforexampleareconsequentlysummedtogetherandbecome'mono'.Whenincreasingthe'spread'ofasound,theleftandrightpartsofastereosoundrotateawayfromtheiroriginalposition,togiveitmore'stereoness'.Therotationofthesoundchannelsaredonein'speakerspace'.Monosoundsarealsoabletobe'spread'withthisfunction.
C++Syntax
FMOD_RESULTChannel::set3DSpread(
floatangle
);
CSyntax
FMOD_RESULTFMOD_Channel_Set3DSpread(
FMOD_CHANNEL*channel,
floatangle
);
Parameters
angle
Speakerspreadangle.0=allsoundchannelsarelocatedatthesamespeakerlocationandis'mono'.360=allsubchannelsarelocatedattheoppositespeakerlocationtothespeakerlocationthatitshouldbeaccordingto3Dposition.Default=0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.Ifthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedinthe
FMOD_RESULTenumeration.
Remarks
OnlyaffectssoundscreatedwithFMOD_SOFTWARE.
Bydefault,ifastereosoundwasplayedin3d,anditwasdirectlyinfrontofyou,theleftandrightpartofthestereosoundwouldbesummedintothecenterspeaker(ona5.1setup),makingitsoundmono.Thisfunctionletsyoucontrolthespeakerspreadofastereo(andabove)soundwithinthespeakerarray,toseparatetheleftrightpartofastereosoundforexample.Intheabovecase,ina5.1setup,specifyingaspreadof90degreeswouldputtheleftpartofthesoundinthefrontleftspeaker,andtherightpartofthesoundinthefrontrightspeaker.Thisstereoseparationremainsintactasthelistenerrotatesandthesoundmovesaroundthespeakers.Tosummarize(forastereosound).1.Aspreadangleof0makesthestereosoundmonoatthepointofthe3demitter.2.Aspreadangleof90makestheleftpartofthestereosoundplaceitselfat45degreestotheleftandtherightpart45degreestotheright.3.Aspreadangleof180makestheleftpartofthesterosoundplaceitselfat90degreestotheleftandtherightpart90degreestotheright.4.Aspreadangleof360makesthestereosoundmonoattheoppositespeakerlocationtowherethe3demittershouldbelocated(bymovingtheleftpart180degreesleftandtherightpart180degreesright).Sointhiscase,behindyouwhenthesoundshouldbeinfrontofyou!
Multichannelsoundswithchannelcountsgreaterthanstereohavetheirsub-channelsspreadeventlythroughthespecifiedangle.Forexamplea6channelsoundovera90degreespreadhaseachsubchannellocated15degreesapartfromeachotherinthespeakerarray.
Monosoundsarespreadasiftheywereastereosignal,iethesignalissplitinto2.Thepowerofthesamewillremainthesameasitspreadsaroundthespeakers.
SeeAlso
Channel::get3DSpreadFMOD_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setCallbackSetsacallbackforachannelforaspecificevent.
C++Syntax
FMOD_RESULTChannel::setCallback(
FMOD_CHANNEL_CALLBACKcallback
);
CSyntax
FMOD_RESULTFMOD_Channel_SetCallback(
FMOD_CHANNEL*channel,
FMOD_CHANNEL_CALLBACKcallback
);
Parameters
callback
Pointertoacallbacktoreceivetheeventwhenithappens.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
CurrentlycallbacksaregenerallydrivenbySystem::updateandwilloccurwhenthisfunctioniscalled.TheoneexceptionisthatFMOD_CHANNEL_CALLBACKTYPE_ENDcanalsobetriggeredbyaplayingchannelifSound::getSubSoundiscalled,asitwillstopthechannelright
atthepointofcallilngthefunction.Callbacksusethestdcallcallingconventiononwindows.UseF_CALLBACKinbetweenyourreturntypeandfunctionname,NEVERcastacallbackto"FMOD_CHANNEL_CALLBACK"whenpassingittothisfunction.Thiscancausecrashesifthecallbackisincorrectlydeclared.Hereisanexampleofachannelcallback:
FMOD_RESULTF_CALLBACKmycallback(FMOD_CHANNEL*channel,FMOD_CHANNEL_CALLBACKTYPE
{
FMOD::Channel*cppchannel=(FMOD::Channel*)channel;
//Morecodegoeshere.
returnFMOD_OK;
}
SeeAlso
System::updateFMOD_CHANNEL_CALLBACKFMOD_CHANNEL_CALLBACKTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setChannelGroupSetsachanneltobelongtoaspecifiedchannelgroup.Achannelgroupcancontainmanychannels.
C++Syntax
FMOD_RESULTChannel::setChannelGroup(
FMOD::ChannelGroup*channelgroup
);
CSyntax
FMOD_RESULTFMOD_Channel_SetChannelGroup(
FMOD_CHANNEL*channel,
FMOD_CHANNELGROUP*channelgroup
);
Parameters
channelgroup
PointertoaChannelGroupobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Settingachanneltoachannelgroupremovesitfromanypreviousgroup,itdoesnotallowsharingofchannelgroups.
SeeAlso
Channel::getChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setDelaySetsanenddelayforasound(sothatdspcancontinuetoprocessthefinishedsound),setthestartofthesoundaccordingtotheglobalDSPclockvaluewhichrepresentsthetimeinthemixertimeline.
C++Syntax
FMOD_RESULTChannel::setDelay(
FMOD_DELAYTYPEdelaytype,
unsignedintdelayhi,
unsignedintdelaylo
);
CSyntax
FMOD_RESULTFMOD_Channel_SetDelay(
FMOD_CHANNEL*channel,
FMOD_DELAYTYPEdelaytype,
unsignedintdelayhi,
unsignedintdelaylo
);
Parameters
delaytype
SeeFMOD_DELAYTYPE.Thisdetermineswhatdelayhianddelaylowillrepresent.
delayhi
Top(mostsignificant)32bitsofa64bitnumberrepresentingthetime.
delaylo
Bottom(leastsignificant)32bitsofa64bitnumberrepresentingthetime.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!OnlyworkswithsoundscreatedwithFMOD_SOFTWARE.
UsingFMOD_DELAYTYPE_END_MS:Settingadelayafterasoundendsissometimesusefultoprolongthesound,eventhoughithasstopped,sothatDSPeffectscantrailout,orrenderthelastoftheirtails.(forexampleanechoorreverbeffect).Rememberthedelayhiparameteristheonlyparameterusedhere,anditisrepresentingmillseconds.UsingFMOD_DELAYTYPE_DSPCLOCK_START:Note!WorkswithsoundscreatedwithFMOD_SOFTWAREonly.ThisallowsasoundtobeplayedinthefutureonanexactsampleaccurateboundaryorDSPclockvalue.Thiscanbeusedforsynchronizingsoundstostartatanexacttimeintheoveralltimeline.
Whatisthe'DSPclock'?TheDSPclockrepresentstheoutputstreamtothesoundcard,andisincrementedbytheoutputrateeverysecond(thoughofcoursewithmuchfinergranularitythanthis).Soifyouroutputrateis48khz,theDSPclockwillincrementby48000persecond.Thehiandlovaluesrepresentthis64bitnumber,withthedelaylorepresentingtheleastsignificant32bitsandthedelayhivaluerepresentingthemostsignificant32bits.
UseFMOD_64BIT_ADDorFMOD_64BIT_SUBtoaddahi/locombinationtogetherandcopewithwraparound.
SeeAlso
FMOD_DELAYTYPEChannel::getDelay
Channel::isPlaying
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setFrequencySetsthechannel'sfrequencyorplaybackrate,inHZ.
C++Syntax
FMOD_RESULTChannel::setFrequency(
floatfrequency
);
CSyntax
FMOD_RESULTFMOD_Channel_SetFrequency(
FMOD_CHANNEL*channel,
floatfrequency
);
Parameters
frequency
AfrequencyvalueinHZ.Thisvaluecanalsobenegativetoplaythesoundbackwards(negativefrequenciesallowedwithFMOD_SOFTWAREbasednon-streamsoundsonly).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whenasoundisplayed,itplaysatthedefaultfrequencyofthesoundwhichcanbesetbySound::setDefaults.
Formostfileformats,thedefaultfrequencyisdeterminedbytheaudioformat.
SeeAlso
Channel::getFrequencySystem::getDriverCapsSound::setDefaults
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setInputChannelMixSetstheincominglevelsinasound.Thismeansifyouhaveamultichannelsoundyoucanturnchannelsonandoff.Amonosoundhas1inputchannel,astereohas2,etc.Itdependsonwhattypeofsoundisplayingonthechannelatthetime.
C++Syntax
FMOD_RESULTChannel::setInputChannelMix(
float*levels,
intnumlevels
);
CSyntax
FMOD_RESULTFMOD_Channel_SetInputChannelMix(
FMOD_CHANNEL*channel,
float*levels,
intnumlevels
);
Parameters
levels
Arrayoffloatvolumelevels,from0.0to1.0.Theserepresenttheincomingchannelsforthesoundplayingonthechannelatthetime.
numlevels
Numberoffloatsinthearray.Maximum=themaximumnumberofinputchannelsspecifiedinSystem::setSoftwareFormat.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.Ifthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedinthe
FMOD_RESULTenumeration.
Remarks
Note!ThisfunctionrequiresthesoundbecreatedwithFMOD_SOFTWARE.Hardwarevoicesarenotcapableofthisfunctionality.
SeeAlso
Channel::getInputChannelMixChannel::setPanChannel::setSpeakerMixChannel::setSpeakerLevelsSystem::setSoftwareFormat
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setLoopCountSetsachanneltoloopaspecifiednumberoftimesbeforestopping.
C++Syntax
FMOD_RESULTChannel::setLoopCount(
intloopcount
);
CSyntax
FMOD_RESULTFMOD_Channel_SetLoopCount(
FMOD_CHANNEL*channel,
intloopcount
);
Parameters
loopcount
Numberoftimestoloopbeforestopping.0=oneshot.1=looponcethenstop.-1=loopforever.Default=-1
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctiondoesnotaffectFMOD_HARDWAREbasedsoundsthatarenotstreamable.FMOD_SOFTWAREbasedsoundsoranytypeofsoundcreatedwith
System::CreateStreamorFMOD_CREATESTREAMwillsupportthisfunction.
Issueswithstreamedaudio.(SoundscreatedwithwithSystem::createStreamorFMOD_CREATESTREAM).Whenchangingtheloopcount,soundscreatedwithSystem::createStreamorFMOD_CREATESTREAMmayalreadyhavebeenpre-bufferedandexecutedtheirlooplogicaheadoftime,beforethiscallwasevenmade.Thisisdependantonthesizeofthesoundversusthesizeofthestreamdecodebuffer.SeeFMOD_CREATESOUNDEXINFO.Ifthishappens,youmayneedtoreflushthestreambuffer.Todothis,youcancallChannel::setPositionwhichforcesareflushofthestreambuffer.Notethiswillusuallyonlyhappenifyouhavesoundsorlooppointsthataresmallerthanthestreamdecodebuffersize.Otherwiseyouwillnotnormallyencounteranyproblems.
SeeAlso
Channel::getLoopCountChannel::setPositionSystem::createStreamFMOD_CREATESOUNDEXINFOFMOD_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setLoopPointsSetsthelooppointswithinachannel.
C++Syntax
FMOD_RESULTChannel::setLoopPoints(
unsignedintloopstart,
FMOD_TIMEUNITloopstarttype,
unsignedintloopend,
FMOD_TIMEUNITloopendtype
);
CSyntax
FMOD_RESULTFMOD_Channel_SetLoopPoints(
FMOD_CHANNEL*channel,
unsignedintloopstart,
FMOD_TIMEUNITloopstarttype,
unsignedintloopend,
FMOD_TIMEUNITloopendtype
);
Parameters
loopstart
Theloopstartpoint.Thispointintimeisplayed,soitisinclusive.
loopstarttype
Thetimeformatusedfortheloopstartpoint.SeeFMOD_TIMEUNIT.
loopend
Theloopendpoint.Thispointintimeisplayed,soitisinclusive.
loopendtype
Thetimeformatusedfortheloopendpoint.SeeFMOD_TIMEUNIT.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
NotsupportedbystaticsoundscreatedwithFMOD_HARDWARE.SupportedbysoundscreatedwithFMOD_SOFTWARE,orsoundsofanytype(hardwareorsoftware)createdwithSystem::createStreamorFMOD_CREATESTREAM.Ifasoundwas44100sampleslongandyouwantedtoloopthewholesound,loopstartwouldbe0,andloopendwouldbe44099,not44100.Youwouldn'tusemillisecondsinthiscasebecausetheyarenotsampleaccurate.Ifloopendissmallerorequaltoloopstart,itwillresultinanerror.Ifloopstartorloopendislargerthanthelengthofthesound,itwillresultinanerror.
Issueswithstreamedaudio.(SoundscreatedwithwithSystem::createStreamorFMOD_CREATESTREAM).Whenchangingthelooppoints,soundscreatedwithSystem::createStreamorFMOD_CREATESTREAMmayalreadyhavebeenpre-bufferedandexecutedtheirlooplogicaheadoftime,beforethiscallwasevenmade.Thisisdependantonthesizeofthesoundversusthesizeofthestreamdecodebuffer.SeeFMOD_CREATESOUNDEXINFO.Ifthishappens,youmayneedtoreflushthestreambuffer.Todothis,youcancallChannel::setPositionwhichforcesareflushofthestreambuffer.Notethiswillusuallyonlyhappenifyouhavesoundsorlooppointsthataresmallerthanthestreamdecodebuffersize.Otherwiseyouwillnotnormallyencounteranyproblems.
SeeAlso
FMOD_TIMEUNITFMOD_MODEChannel::getLoopPointsChannel::setLoopCountSystem::createStreamSystem::setStreamBufferSizeFMOD_CREATESOUNDEXINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setLowPassGainSetsthegainofthedrysignalwhenlowpassfilteringisapplied.
C++Syntax
FMOD_RESULTChannel::setLowPassGain(
floatgain
);
CSyntax
FMOD_RESULTFMOD_Channel_SetLowPassGain(
FMOD_CHANNEL*channel,
floatgain
);
Parameters
gain
Alineargainlevel,from0.0to1.0inclusive.0.0=silent,1.0=fullvolume.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Channel::getLowPassGain
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setModeChangessomeattributesforachannelbasedonthemodepassedin.
C++Syntax
FMOD_RESULTChannel::setMode(
FMOD_MODEmode
);
CSyntax
FMOD_RESULTFMOD_Channel_SetMode(
FMOD_CHANNEL*channel,
FMOD_MODEmode
);
Parameters
mode
Modebitstoset.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Flagssupported:FMOD_LOOP_OFFFMOD_LOOP_NORMALFMOD_LOOP_BIDI(onlyworkswithsoundscreatedwith
FMOD_SOFTWARE.OtherwiseitwillbehaveasFMOD_LOOP_NORMAL)FMOD_3D_HEADRELATIVEFMOD_3D_WORLDRELATIVEFMOD_2D(seenotesforwin32hardwarevoices)FMOD_3D(seenotesforwin32hardwarevoices)FMOD_3D_INVERSEROLLOFFFMOD_3D_LINEARROLLOFFFMOD_3D_LINEARSQUAREROLLOFFFMOD_3D_CUSTOMROLLOFFFMOD_3D_IGNOREGEOMETRYFMOD_DONTRESTOREVIRTUAL
Issueswithstreamedaudio.(SoundscreatedwithwithSystem::createStreamorFMOD_CREATESTREAM).Whenchangingtheloopmode,soundscreatedwithSystem::createStreamorFMOD_CREATESTREAMmayalreadyhavebeenpre-bufferedandexecutedtheirlooplogicaheadoftime,beforethiscallwasevenmade.Thisisdependantonthesizeofthesoundversusthesizeofthestreamdecodebuffer.SeeFMOD_CREATESOUNDEXINFO.Ifthishappens,youmayneedtoreflushthestreambuffer.Todothis,youcancallChannel::setPositionwhichforcesareflushofthestreambuffer.Notethiswillusuallyonlyhappenifyouhavesoundsorlooppointsthataresmallerthanthestreamdecodebuffersize.Otherwiseyouwillnotnormallyencounteranyproblems.
IssueswithPCMsamples.(SoundscreatedwithwithSystem::createSoundorFMOD_CREATESAMPLE).Whenchangingtheloopmode,ifthesoundwassetupasFMOD_LOOP_OFF,thensettoFMOD_LOOP_NORMALwiththisfunction,thesoundmayclickwhenplayingtheendofthesound.Thisisbecausethesoundneedstobepre-preparedforloopingusingSound::setMode,bymodifyingthecontentofthepcmdata(iedatapasttheendoftheactualsampledata)toallowtheinterpolatorstoreadaheadwithoutclicking.IfyouuseChannel::setModeitwillnotdothis(becausedifferentchannelsmayhavedifferentloopmodesforthesamesound)andmayclickifyoutrytosetittoloopingonanunpreparedsound.Ifyouwanttochangetheloopmodeatruntimeitmaybebettertoloadthesoundasloopingfirst(oruseSound::setMode),toletitpre-preparethedataasifitwasloopingsothatitdoesnotclickwheneverChannel::setModeisusedtoturnloopingon.
IfFMOD_3D_IGNOREGEOMETRYisnotspecified,theflagwillbeclearedifitwasspecifiedpreviously.
SeeAlso
FMOD_MODEChannel::getModeChannel::setPositionSound::setModeSystem::createStreamSystem::createSoundSystem::setStreamBufferSizeFMOD_CREATESOUNDEXINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setMuteMutes/un-mutesachannel,effectivelysilencingitorreturningittoitsnormalvolume.
C++Syntax
FMOD_RESULTChannel::setMute(
boolmute
);
CSyntax
FMOD_RESULTFMOD_Channel_SetMute(
FMOD_CHANNEL*channel,
FMOD_BOOLmute
);
Parameters
mute
true=channelbecomesmuted(silent),false=channelreturnstonormalvolume.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifachannelbelongstoamutedchannelgroup,itwillstaymutedregardlessofthechannelmutestate.Thechannelmutestatewillstillbereflectedinternallythough,ieChannel::getMutewillstillreturnthevalueyouset.Ifthe
channelgrouphasmutesettofalse,thisfunctionwillbecomeeffectiveagain.
SeeAlso
Channel::getMuteChannelGroup::setMute
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setPanSetsachannelspanpositionlinearly.
C++Syntax
FMOD_RESULTChannel::setPan(
floatpan
);
CSyntax
FMOD_RESULTFMOD_Channel_SetPan(
FMOD_CHANNEL*channel,
floatpan
);
Parameters
pan
Aleft/rightpanlevel,from-1.0to1.0inclusive.-1.0=Fullleft,0.0=center,1.0=fullright.Default=0.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctiononlyworksonsoundscreatedwithFMOD_2D.3DsoundsarenotpannableandwillreturnFMOD_ERR_NEEDS2D.
Onlysoundsthataremonoorstereocanbepanned.Multichannelsounds(ie>2channels)cannotbepanned.Monosoundsarepannedfromlefttorightusingconstantpowerpanning(nonlinearfade).Thismeanswhenpan=0.0,thebalanceforthesoundineachspeakeris71%leftand71%right,not50%leftand50%right.Thisgives(audibly)smootherpans.Stereosoundsheaveeachleft/rightvaluefadedupanddownaccordingtothespecifiedpanposition.Thismeanswhenpan=0.0,thebalanceforthesoundineachspeakeris100%leftand100%right.Whenpan=-1.0,onlytheleftchannelofthestereosoundisaudible,whenpan=1.0,onlytherightchannelofthestereosoundisaudible.
PanningdoesnotworkifthespeakermodeisFMOD_SPEAKERMODE_RAW.
SeeAlso
Channel::getPanFMOD_SPEAKERMODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setPausedSetsthepausedstateofthechannel.
C++Syntax
FMOD_RESULTChannel::setPaused(
boolpaused
);
CSyntax
FMOD_RESULTFMOD_Channel_SetPaused(
FMOD_CHANNEL*channel,
FMOD_BOOLpaused
);
Parameters
paused
Pausedstatetoset.true=channelispaused.false=channelisunpaused.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifachannelbelongstoapausedchannelgroup,itwillstaypausedregardlessofthechannelpausestate.Thechannelpausestatewillstillbereflectedinternallythough,ieChannel::getPausedwillstillreturnthevalueyouset.Ifthechannelgrouphaspausedsettofalse,thisfunctionwillbecomeeffectiveagain.
SeeAlso
Channel::getPausedChannelGroup::setPaused
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setPositionSetsthecurrentplaybackpositionforthecurrentlyplayingsoundtothespecifiedPCMoffset.
C++Syntax
FMOD_RESULTChannel::setPosition(
unsignedintposition,
FMOD_TIMEUNITpostype
);
CSyntax
FMOD_RESULTFMOD_Channel_SetPosition(
FMOD_CHANNEL*channel,
unsignedintposition,
FMOD_TIMEUNITpostype
);
Parameters
position
Positionofthechanneltosetinunitsspecifiedinthepostypeparameter.
postype
Timeunittosetthechannelpositionby.SeeFMOD_TIMEUNIT.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Certaintimeunitsdonotworkdependingonthefileformat.ForexampleFMOD_TIMEUNIT_MODORDERwillnotworkwithanmp3file.
Notethatifyouarecallingthisfunctiononastream,ithastopossiblyreflushitsbuffertogetzerolatencyplaybackwhenitresumesplaying,thereforeitcouldpotentiallycauseastallortakeasmallamountoftimetodothis.IfyouareusingFMOD_NONBLOCKING,notethatastreamwillgointoFMOD_OPENSTATE_SETPOSITIONstate(seeSound::getOpenState)andsoundcommandswillreturnFMOD_ERR_NOTREADY.Channel::getPositionwillalsonotupdateuntilthisnon-blockingsetpositionoperationhascompleted.
Warning!UsingaVBRsourcethatdoesnothaveanassociatedseektableorseekinformation(suchasMP3orMOD/S3M/XM/IT)maycauseinaccurateseekingifyouspecifyFMOD_TIMEUNIT_MSorFMOD_TIMEUNIT_PCM.IfyouwantFMODtocreateapcmvsbytesseektablesothatseekingisaccurate,youwillhavetospecifyFMOD_ACCURATETIMEwhenloadingoropeningthesound.ThismeansthereisaslightdelayasFMODscansthewholefilewhenloadingthesoundtocreatethistable.
SeeAlso
Channel::getPositionFMOD_TIMEUNITFMOD_MODESound::getLengthSound::getOpenState
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setPrioritySetsthepriorityforachannelafterithasbeenplayed.Asoundwithahigherprioritythananothersoundwillnotbestolenormadevirtualbythatsound.
C++Syntax
FMOD_RESULTChannel::setPriority(
intpriority
);
CSyntax
FMOD_RESULTFMOD_Channel_SetPriority(
FMOD_CHANNEL*channel,
intpriority
);
Parameters
priority
priorityforthechannel.0to256inclusive.0=mostimportant.256=leastimportant.Default=128.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Prioritywillmakeachannelmoreimportantorlessimportantthanitscounterparts.Whenvirtualchannelsareinplace,bydefaulttheimportanceof
thesound(whetheritisaudibleornotwhenmorechannelsareplayingthanexist)isbasedonthevolume,oraudiblityofthesound.Thisisdeterminedbydistancefromthelistenerin3d,thevolumesetwithChannel::setVolume,channelgroupvolume,andgeometryocclusionfactors.Tomakeaquietsoundmoreimportant,sothatitisn'tmadevirtualbyloudersounds,youcanusethisfunctiontoincreaseitsimportance,andkeepitaudible.
SeeAlso
Channel::getPriorityChannel::setVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setReverbPropertiesSetsthechannelspecificreverbproperties,includingthingslikewet/drymix.
C++Syntax
FMOD_RESULTChannel::setReverbProperties(
constFMOD_REVERB_CHANNELPROPERTIES*prop
);
CSyntax
FMOD_RESULTFMOD_Channel_SetReverbProperties(
FMOD_CHANNEL*channel,
constFMOD_REVERB_CHANNELPROPERTIES*prop
);
Parameters
prop
ApointertotheaFMOD_REVERB_CHANNELPROPERTIESstructure,withtherelevantreverbinstancespecifiedinFMOD_REVERB_CHANNELFLAGS.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!Itisimportanttoclearthisstructureto0beforecalling,oratleastspecifywhichreverbinstanceyouaretalkingaboutbyusingtheFlagsmemberofFMOD_REVERB_CHANNELPROPERTIES,otherwiseyoumaygetan
FMOD_ERR_REVERB_INSTANCEerror.
SeeAlso
Channel::getReverbPropertiesFMOD_REVERB_CHANNELPROPERTIESFMOD_REVERB_CHANNELFLAGS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setSpeakerLevelsSetstheincomingsoundlevelsforaparticularspeaker.Thisisaliteralsettingofchannel'sinternalpanmatrixanddoesNOTperformdownmixingdependingonspeakermode.
C++Syntax
FMOD_RESULTChannel::setSpeakerLevels(
FMOD_SPEAKERspeaker,
float*levels,
intnumlevels
);
CSyntax
FMOD_RESULTFMOD_Channel_SetSpeakerLevels(
FMOD_CHANNEL*channel,
FMOD_SPEAKERspeaker,
float*levels,
intnumlevels
);
Parameters
speaker
Thetargetspeakertomodifythelevelsfor.ThiscanbecasttoanintegerifyouareusingFMOD_SPEAKERMODE_RAWandwanttoaccessupto15speakers(outputchannels).
levels
Anarrayoffloatingpointnumbersfrom0.0to1.0representingthevolumeofeachinputchannelofasound.Seeremarksformore.
numlevels
Thenumberoffloatswithinthelevelsparameterbeingpassedtothisfunction.Inthecaseoftheabovemonoorstereosound,1or2couldbeusedrespectively.
Ifthesoundbeingplayedwasan8channelmultichannelsoundthen8levelswouldbeused.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Asanexampleofusageofthisfunction,ifthesoundplayedonthisspeakerwasmono,only1levelwouldbeneeded.Ifthesoundplayedonthischannelwasstereo,thenanarrayof2floatscouldbespecified.Forexample{0,1}onachannelplayingastereosoundwouldmutetheleftpartofthestereosoundwhenitisplayedonthisspeaker.
Onlyspeakersthatareusablewiththecurrentspeakermodewillbeaccepted.AnythingelsewillreturnFMOD_ERR_INVALID_SPEAKER.
WhenusingFMOD_SPEAKERMODE_MONOitispreferabletousethealiasFMOD_SPEAKER_MONO(orindex0),asFMOD_SPEAKER_FRONT_LEFTdoesn'treallymakesenseinthatsetting.WhenusingFMOD_SPEAKERMODE_RAW,the'speaker'parametercanbecasttoanintegerandusedasarawspeakerindex,disregardingFMOD'sspeakermappings.
Warning.Thisfunctionwillallocatememoryforthespeakerlevelmatrixandattachittothechannel.IfyouprefernottohaveadynamicmemoryallocationdoneatthispointuseChannel::setSpeakerMixinstead.
SeeAlso
Channel::getSpeakerLevels
Channel::setSpeakerMixFMOD_SPEAKERMODEFMOD_SPEAKERFMOD_OUTPUTTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setSpeakerMixSetsthechannel'sspeakervolumelevelsforeachspeakerindividually.
C++Syntax
FMOD_RESULTChannel::setSpeakerMix(
floatfrontleft,
floatfrontright,
floatcenter,
floatlfe,
floatbackleft,
floatbackright,
floatsideleft,
floatsideright
);
CSyntax
FMOD_RESULTFMOD_Channel_SetSpeakerMix(
FMOD_CHANNEL*channel,
floatfrontleft,
floatfrontright,
floatcenter,
floatlfe,
floatbackleft,
floatbackright,
floatsideleft,
floatsideright
);
Parameters
frontleft
Volumelevelforthischannelinthefrontleftspeakerofamultichannelspeakersetup.0.0=silent,1.0=normalvolume,5.0=5xamplification.
frontright
Volumelevelforthischannelinthefrontrightspeakerofamultichannelspeakersetup.0.0=silent,1.0=normalvolume,upto5.0=5xamplification.
center
Volumelevelforthischannelinthecenterspeakerofamultichannelspeakersetup.0.0=silent,1.0=normalvolume,5.0=5xamplification.
lfe
Volumelevelforthischannelinthesubwooferspeakerofamultichannelspeakersetup.0.0=silent,1.0=normalvolume,5.0=5xamplification.
backleft
Volumelevelforthischannelinthebackleftspeakerofamultichannelspeakersetup.0.0=silent,1.0=normalvolume,5.0=5xamplification.
backright
Volumelevelforthischannelinthebackrightspeakerofamultichannelspeakersetup.0.0=silent,1.0=normalvolume,5.0=5xamplification.
sideleft
Volumelevelforthischannelinthesideleftspeakerofamultichannelspeakersetup.0.0=silent,1.0=normalvolume,5.0=5xamplification.
sideright
Volumelevelforthischannelinthesiderightspeakerofamultichannelspeakersetup.0.0=silent,1.0=normalvolume,5.0=5xamplification.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctiononlyfullyworksonsoundscreatedwithFMOD_2DandFMOD_SOFTWARE.FMOD_3DbasedsoundsonlyallowsettingofLFEchannel,asallotherspeakerlevelsarecalculatedbyFMOD's3Dengine.
Speakersspecifiedthatdon'texistwillsimplybeignored.
Formoreadvancedspeakercontrol,includingsendingthedifferentchannelsofastereosoundtoarbitraryspeakers,seeChannel::setSpeakerLevels.
Thisfunctionallowsamplification!Youcangoupto5timesthevolumeofanormalsound,butwarningthismaycauseclipping/distortion!UsefulforLFEboosting.
SeeAlso
Channel::getSpeakerMixChannel::setSpeakerLevelsFMOD_SPEAKERMODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setUserDataSetsauservaluethattheChannelobjectwillstoreinternally.CanberetrievedwithChannel::getUserData.
C++Syntax
FMOD_RESULTChannel::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_Channel_SetUserData(
FMOD_CHANNEL*channel,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheChannelobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingChannel::getUserDatawouldhelpintheidentificationoftheobject.
NOTE:Ifthischannelwasspawnedbytheeventsystemthenitsuserdatafieldwillbeset,bytheeventsystem,totheeventinstancehandlethatspawneditandthisfunctionshouldNOTbecalled.
SeeAlso
Channel::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::setVolumeSetsthevolumeforthechannellinearly.
C++Syntax
FMOD_RESULTChannel::setVolume(
floatvolume
);
CSyntax
FMOD_RESULTFMOD_Channel_SetVolume(
FMOD_CHANNEL*channel,
floatvolume
);
Parameters
volume
Alinearvolumelevel,from0.0to1.0inclusive.0.0=silent,1.0=fullvolume.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whenasoundisplayed,itplaysatthedefaultvolumeofthesoundwhichcanbesetbySound::setDefaults.Formostfileformats,thevolumeisdeterminedbytheaudioformat.
SeeAlso
Channel::getVolumeChannelGroup::setVolumeSound::setDefaults
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Channel::stopStopsthechannelfromplaying.Makesitavailableforre-usebytheprioritysystem.
C++Syntax
FMOD_RESULTChannel::stop();
CSyntax
FMOD_RESULTFMOD_Channel_Stop(FMOD_CHANNEL*channel);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::playSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroupInterfaceChannelGroup::addDSPChannelGroup::addGroupChannelGroup::get3DOcclusionChannelGroup::getChannelChannelGroup::getDSPHeadChannelGroup::getGroupChannelGroup::getMemoryInfoChannelGroup::getMuteChannelGroup::getNameChannelGroup::getNumChannelsChannelGroup::getNumGroupsChannelGroup::getParentGroupChannelGroup::getPausedChannelGroup::getPitchChannelGroup::getSpectrumChannelGroup::getSystemObjectChannelGroup::getUserDataChannelGroup::getVolumeChannelGroup::getWaveDataChannelGroup::override3DAttributesChannelGroup::overrideFrequencyChannelGroup::overridePanChannelGroup::overrideReverbPropertiesChannelGroup::overrideSpeakerMixChannelGroup::overrideVolumeChannelGroup::releaseChannelGroup::set3DOcclusionChannelGroup::setMuteChannelGroup::setPausedChannelGroup::setPitchChannelGroup::setUserDataChannelGroup::setVolumeChannelGroup::stop
FirelightTechnologiesFMODEx
ChannelGroup::addDSPAddsaDSPeffecttothischannelgroup,affectingallchannelsthatbelongtoit.Becauseitisasubmix,onlyoneinstanceoftheeffectisadded,andallsubsequentchannelsareaffected.
C++Syntax
FMOD_RESULTChannelGroup::addDSP(
FMOD::DSP*dsp,
FMOD::DSPConnection**connection
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_AddDSP(
FMOD_CHANNELGROUP*channelgroup,
FMOD_DSP*dsp,
FMOD_DSPCONNECTION**connection
);
Parameters
dsp
Pointertothedspeffecttoadd.ThiscanbecreatedwithSystem::createDSP,System::createDSPByType,System::createDSPByPlugin.
connection
ApointertotheconnectioninvolvedbetweentheChannelGroupDSPheadandthespecifieddspunit.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctionisawrapperfunctiontoinsertaDSPunitatthetopofthechannelgroupDSPchain.Itdisconnectstheheadunitfromitsinput,theninsertstheunitattheheadandreconnectsthepreviouslydisconnectedinputbackasasaninputtothenewunit.
Note:Theconnectionpointerretrievedherewillbecomeinvalidifyoudisconnectthe2dspunitsthatuseit.
Note:IfthisfunctionreturnsFMOD_ERR_DSP_NOTFOUNDwhencalledonanevent'schannelgroup,thechannelgroup'sDSPunitmayhavebeenoptimizedawaybytheeventsystem.UseFMOD_EVENT_USERDSPwhengettingtheeventtoforcethechannelgrouptocontainaDSPunit.
SeeAlso
ChannelGroup::getDSPHeadSystem::createDSPSystem::createDSPByTypeSystem::createDSPByPluginSystem::getMasterChannelGroupSystem::createChannelGroupSystem::addDSPChannel::addDSPDSP::remove
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::addGroupAddsachannelgroupasachildofthecurrentchannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::addGroup(
FMOD::ChannelGroup*group
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_AddGroup(
FMOD_CHANNELGROUP*channelgroup,
FMOD_CHANNELGROUP*group
);
Parameters
group
channelgrouptoaddasachild.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
ChannelGroup::getNumGroupsChannelGroup::getGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::get3DOcclusionRetrievesthemasterocclusionfactorsforthechannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::get3DOcclusion(
float*directocclusion,
float*reverbocclusion
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_Get3DOcclusion(
FMOD_CHANNELGROUP*channelgroup,
float*directocclusion,
float*reverbocclusion
);
Parameters
directocclusion
Addressofavariablethatreceivestheocclusionfactorforthedirectpath.0.0=notoccluded.1.0=fullyoccluded.Default=0.0.Optional.Specify0orNULLtoignore.
reverbocclusion
Addressofavariablethatreceivestheocclusionfactorforthereverbmix.0.0=notoccluded.1.0=fullyoccluded.Default=0.0.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
ChannelGroup::set3DOcclusionChannel::set3DOcclusionChannel::get3DOcclusionSystem::getMasterChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getChannelRetrievestheahandletoachannelfromthecurrentchannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::getChannel(
intindex,
FMOD::Channel**channel
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetChannel(
FMOD_CHANNELGROUP*channelgroup,
intindex,
FMOD_CHANNEL**channel
);
Parameters
index
Indexofthechannelinsidethechannelgroup,from0tothenumberofchannelsreturnedbyChannelGroup::getNumChannels.
channel
AddressofavariabletoreceieveapointertoaChannelobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
ChannelGroup::getNumChannelsSystem::getMasterChannelGroupSystem::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getDSPHeadRetrievestheDSPunitresponsibleforthischannelgroup.Whenchannelsaresubmixedtothischannelgroup,thisistheDSPunittheytarget.
C++Syntax
FMOD_RESULTChannelGroup::getDSPHead(
FMOD::DSP**dsp
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetDSPHead(
FMOD_CHANNELGROUP*channelgroup,
FMOD_DSP**dsp
);
Parameters
dsp
AddressofavariabletoreceivethepointertotheheadDSPunitforthischannelgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UsethisunitifyouwishtoconnectcustomDSPunitstothechannelgrouporfilterthechannelsinthechannelgroupbyinsertingfilterunitsbetweenthisone
andtheincomingchannelmixerunit.ReadthetutorialonDSPifyouwishtoknowmoreaboutthis.ItisnotrecommendedusingthisifyoudonotunderstandhowtheFMODExDSPnetworkisconnected.AlternativelyyoucansimplyaddeffectsbyusingChannelGroup::addDSPwhichdoestheconnection/disconnectionworkforyou.
Note:IfthisfunctionreturnsFMOD_ERR_DSP_NOTFOUNDwhencalledonanevent'schannelgroup,thechannelgroup'sDSPunitmayhavebeenoptimizedawaybytheeventsystem.UseFMOD_EVENT_USERDSPwhengettingtheeventtoforcethechannelgrouptocontainaDSPunit.
SeeAlso
ChannelGroup::addDSPSystem::createDSPSystem::createDSPByTypeSystem::createDSPByPluginSystem::getMasterChannelGroupSystem::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getGroupRetrievesahandletoaspecifiedsubchannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::getGroup(
intindex,
FMOD::ChannelGroup**group
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetGroup(
FMOD_CHANNELGROUP*channelgroup,
intindex,
FMOD_CHANNELGROUP**group
);
Parameters
index
Indextospecifywhichsubchannelgrouptoreceieve.
group
Addressofavariabletoreceieveapointertoachannelgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
ChannelGroup::getNumGroupsChannelGroup::getParentGroupChannelGroup::addGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTChannelGroup::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetMemoryInfo(
FMOD_CHANNELGROUP*channelgroup,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getMuteRetrievesthemutestateofaChannelGroup.
C++Syntax
FMOD_RESULTChannelGroup::getMute(
bool*mute
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetMute(
FMOD_CHANNELGROUP*channelgroup,
FMOD_BOOL*mute
);
Parameters
mute
Addressofavariabletoreceivethepausestateofthechannelgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
ChannelGroup::setMuteChannel::setMuteChannel::getMuteSystem::getMasterChannelGroup
System::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getNameRetrievesthenameofthechannelgroup.Thenameissetwhenthegroupiscreated.
C++Syntax
FMOD_RESULTChannelGroup::getName(
char*name,
intnamelen
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetName(
FMOD_CHANNELGROUP*channelgroup,
char*name,
intnamelen
);
Parameters
name
Addressofavariablethatreceivesthenameofthechannelgroup.
namelen
Lengthinbytesofthetargetbuffertoreceievethestring.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::getMasterChannelGroupSystem::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getNumChannelsRetrievesthecurrentnumberofassignedchannelstothischannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::getNumChannels(
int*numchannels
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetNumChannels(
FMOD_CHANNELGROUP*channelgroup,
int*numchannels
);
Parameters
numchannels
Addressofavariabletoreceivethecurrentnumberofassignedchannelsinthischannelgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Usethisfunctiontoenumeratethechannelswithinthechannelgroup.YoucanthenuseChannelGroup::getChanneltoretrieveeachindividualchannel.
SeeAlso
ChannelGroup::getChannelSystem::getMasterChannelGroupSystem::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getNumGroupsRetrievesthenumberofsubgroupsunderthischannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::getNumGroups(
int*numgroups
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetNumGroups(
FMOD_CHANNELGROUP*channelgroup,
int*numgroups
);
Parameters
numgroups
Addressofavariabletoreceivethenumberofchannelgroupswithinthischannelgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
ChannelGroup::getGroupChannelGroup::addGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getParentGroupRetrievesahandletothischannelgroup'sparentchannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::getParentGroup(
FMOD::ChannelGroup**group
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetParentGroup(
FMOD_CHANNELGROUP*channelgroup,
FMOD_CHANNELGROUP**group
);
Parameters
group
Addressofavariabletorecieveapointertoachannelgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
ChannelGroup::getNumGroupsChannelGroup::getGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getPausedRetrievesthepausestateofaChannelGroup.
C++Syntax
FMOD_RESULTChannelGroup::getPaused(
bool*paused
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetPaused(
FMOD_CHANNELGROUP*channelgroup,
FMOD_BOOL*paused
);
Parameters
paused
Addressofavariabletoreceivethepausestateofthechannelgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
ChannelGroup::setPausedChannel::setPausedChannel::getPausedSystem::getMasterChannelGroup
System::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getPitchRetrievesthemasterpitchlevelforthechannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::getPitch(
float*pitch
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetPitch(
FMOD_CHANNELGROUP*channelgroup,
float*pitch
);
Parameters
pitch
Addressofavariabletoreceivethechannelgrouppitchvalue,from0.0to10.0inclusive.0.0=silent,1.0=fullvolume.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
ChannelGroup::setPitchChannelGroup::overrideFrequencySystem::getMasterChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getSpectrumRetrievesthespectrumfromthecurrentlyplayingchannelsassignedtothischannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::getSpectrum(
float*spectrumarray,
intnumvalues,
intchanneloffset,
FMOD_DSP_FFT_WINDOWwindowtype
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetSpectrum(
FMOD_CHANNELGROUP*channelgroup,
float*spectrumarray,
intnumvalues,
intchanneloffset,
FMOD_DSP_FFT_WINDOWwindowtype
);
Parameters
spectrumarray
Addressofavariablethatreceivesthespectrumdata.Thisisanarrayoffloatingpointvalues.Datawillrangeis0.0to1.0.Decibels=10.0f*(float)log10(val)*2.0f;Seeremarksforwhatthedatarepresents.
numvalues
Sizeofarrayinfloatingpointvaluesbeingpassedtothefunction.Mustbeapowerof2.(ie128/256/512etc).Min=64.Max=8192.
channeloffset
Channelofthesignaltoanalyze.Ifthesignalismultichannel(suchasastereo
output),thenthisvaluerepresentswhichchanneltoanalyze.Onastereosignal0=left,1=right.
windowtype
"Pre-FFT"windowmethod.ThisfiltersthePCMdatabeforeenteringthespectrumanalyzertoreducetransientfrequencyerrorformoreaccurateresults.SeeFMOD_DSP_FFT_WINDOWfordifferenttypesoffftwindowtechniquespossibleandforamoredetailedexplanation.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thelargerthenumvalues,themoreCPUtheFFTwilltake.Choosetherightvaluetotradeoffbetweenaccuracy/speed.Thelargerthenumvalues,themore'lag'thespectrumwillseemtoinherit.ThisisbecausetheFFTwindowsizestretchestheanalysisbackintimetowhatwasalreadyplayed.Forexampleifthewindowsizehappenedtobe44100andtheoutputratewas44100itwouldbeanalyzingthepastsecondofdata,andgivingyoutheaveragespectrumoverthattimeperiod.IfyouarenotdisplayingtheresultindB,thenthedatamayseemsmallerthanitshouldbe.Todisplayityoumaywanttonormalizethedata-thatis,findthemaximumvalueintheresultingspectrum,andscaleallvaluesinthearrayby1/max.(ieifthemaxwas0.5f,thenitwouldbecome1).Togetthespectrumforbothchannelsofastereosignal,callthisfunctiontwice,oncewithchanneloffset=0,andagainwithchanneloffset=1.Thenaddthespectrumstogetheranddivideby2togettheaveragespectrumforbothchannels.
Whatthedatarepresents.Toworkoutwhateachentryinthearrayrepresents,usethisformula
entry_hz=(output_rate/2)/numvalues
Thearrayrepresentsamplitudesofeachfrequencybandfrom0hztothenyquistrate.Thenyquistrateisequaltotheoutputratedividedby2.ForexamplewhenFMODissetto44100hzoutput,therangeofrepresentedfrequencieswillbe0hzto22049hz,atotalof22050hzrepresented.Ifinthesameexample,1024waspassedtothisfunctionasthenumvalues,eachentry'scontributionwouldbeasfollows.
entry_hz=(44100/2)/1024
entry_hz=21.53hz
Note:ThisfunctiononlydisplaysdataforsoundsplayingthatwerecreatedwithFMOD_SOFTWARE.FMOD_HARDWAREbasedsoundsareplayedusingthesoundcarddriverandarenotaccessable.WiththeEventsystem,eventsarenowoptimizedtoremovetheDSPunitfromachannelgrouptosavememory.ThiswillresultintheerrorFMOD_ERR_DSP_NOTFOUND.IfyouwishtoforcetheDSPnodetobecreatedwithanevent,useFMOD_EVENT_USERDSPflagwhengettinganevent.
SeeAlso
FMOD_DSP_FFT_WINDOWSystem::getSpectrumChannel::getSpectrumSystem::getMasterChannelGroupSystem::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getSystemObjectRetrievestheparentSystemobjectthatcreatedthischannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::getSystemObject(
FMOD::System**system
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetSystemObject(
FMOD_CHANNELGROUP*channelgroup,
FMOD_SYSTEM**system
);
Parameters
system
AddressofavariablethatreceivestheSystemobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::createChannelGroupSystem::getMasterChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getUserDataRetrievestheuservaluethatthatwassetbycallingtheChannelGroup::setUserDatafunction.
C++Syntax
FMOD_RESULTChannelGroup::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetUserData(
FMOD_CHANNELGROUP*channelgroup,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthetouserdataspecifiedwiththeChannelGroup::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
ChannelGroup::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getVolumeRetrievesthemastervolumelevelforthechannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::getVolume(
float*volume
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetVolume(
FMOD_CHANNELGROUP*channelgroup,
float*volume
);
Parameters
volume
Addressofavariabletoreceivethechannelgroupvolumelevel,from0.0to1.0inclusive.0.0=silent,1.0=fullvolume.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
ChannelGroup::setVolumeSystem::getMasterChannelGroupSystem::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::getWaveDataRetrievesapointertoablockofPCMdatathatrepresentsthecurrentlyplayingwaveformforthischannelgroup.Thisfunctionisusefulforaveryeasywaytoplotanoscilliscope.
C++Syntax
FMOD_RESULTChannelGroup::getWaveData(
float*wavearray,
intnumvalues,
intchanneloffset
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_GetWaveData(
FMOD_CHANNELGROUP*channelgroup,
float*wavearray,
intnumvalues,
intchanneloffset
);
Parameters
wavearray
Addressofavariablethatreceivesthecurrentlyplayingwaveformdata.Thisisanarrayoffloatingpointvalues.
numvalues
Numberoffloatstowritetothearray.Maximumvalue=16384.
channeloffset
Offsetintomultichanneldata.Monochannelsuse0.Stereochannelsuse0=left,1=right.Morethanstereousetheappropriateindex.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisistheactualresampled,filteredandvolumescaleddata,atthetimethisfunctioniscalled.
Donotusethisfunctiontotryanddisplaythewholewaveformofthesound,asthisismoreofa'snapshot'ofthecurrentwaveformatthetimeitiscalled,andcouldreturnthesamedataifitiscalledveryquicklyinsuccession.SeetheDSPAPItocaptureacontinualstreamofwavedataasitplays,orseeSound::lock/Sound::unlockifyouwanttosimplydisplaythewaveformofasound.
Thisfunctionallowsretrievalofleftandrightdataforastereosoundindividually.Tocombinethemintoonesignal,simplyaddtheentriesofeachseperatebuffertogetherandthendividethemby2.Note:ThisfunctiononlydisplaysdataforsoundsplayingthatwerecreatedwithFMOD_SOFTWARE.FMOD_HARDWAREbasedsoundsareplayedusingthesoundcarddriverandarenotaccessable.WiththeEventsystem,eventsarenowoptimizedtoremovetheDSPunitfromachannelgrouptosavememory.ThiswillresultintheerrorFMOD_ERR_DSP_NOTFOUND.IfyouwishtoforcetheDSPnodetobecreatedwithanevent,useFMOD_EVENT_USERDSPflagwhengettinganevent.
SeeAlso
System::getMasterChannelGroupSystem::createChannelGroupSound::lockSound::unlock
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::override3DAttributesOverridesthepositionandvelocityofallchannelswithinthischannelgroupandthoseofanysubchannelgroups.
C++Syntax
FMOD_RESULTChannelGroup::override3DAttributes(
constFMOD_VECTOR*pos,
constFMOD_VECTOR*vel
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_Override3DAttributes(
FMOD_CHANNELGROUP*channelgroup,
constFMOD_VECTOR*pos,
constFMOD_VECTOR*vel
);
Parameters
pos
Positionin3Dspaceofthechannelsinthegroup.Specifying0/nullwillignorethisparameter.
vel
Velocityin'distanceunitspersecond'in3Dspaceofthegroupofchannels.Seeremarks.Specifying0/nullwillignorethisparameter.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
A'distanceunit'isspecifiedbySystem::set3DSettings.Bydefaultthisissettometerswhichisadistancescaleof1.0.
SeeAlso
Channel::set3DAttributesChannel::get3DAttributesFMOD_VECTORSystem::set3DSettings
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::overrideFrequencyOverridesthefrequencyorplaybackrate,inHZofallchannelswithinthischannelgroupandthoseofanysubchannelgroups.
C++Syntax
FMOD_RESULTChannelGroup::overrideFrequency(
floatfrequency
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_OverrideFrequency(
FMOD_CHANNELGROUP*channelgroup,
floatfrequency
);
Parameters
frequency
AfrequencyvalueinHZ.Thisvaluecanalsobenegativetoplaythesoundbackwards(negativefrequenciesallowedwithFMOD_SOFTWAREbasednon-streamsoundsonly).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whenasoundisplayed,itplaysatthedefaultfrequencyofthesoundwhichcan
besetbySound::setDefaults.Formostfileformats,thedefaultfrequencyisdeterminedbytheaudioformat.
SeeAlso
Channel::setFrequencyChannel::getFrequencySystem::getDriverCapsSystem::getMasterChannelGroupSystem::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::overridePanSetspanpositionlinearlyofallchannelswithinthischannelgroupandthoseofanysubchannelgroups.
C++Syntax
FMOD_RESULTChannelGroup::overridePan(
floatpan
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_OverridePan(
FMOD_CHANNELGROUP*channelgroup,
floatpan
);
Parameters
pan
Aleft/rightpanlevel,from-1.0to1.0inclusive.-1.0=Fullleft,0.0=center,1.0=fullright.Default=0.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
PanningonlyworksonsoundscreatedwithFMOD_2D.3Dsoundsarenotpannable.
Onlysoundsthataremonoorstereocanbepanned.Multichannelsounds(ie>2channels)cannotbepanned.
Monosoundsarepannedfromlefttorightusingconstantpowerpanning.Thismeanswhenpan=0.0,thebalanceforthesoundineachspeakeris71%leftand71%right,not50%leftand50%right.Thisgives(audibly)smootherpans.Stereosoundsheaveeachleft/rightvaluefadedupanddownaccordingtothespecifiedpanposition.Thismeanswhenpan=0.0,thebalanceforthesoundineachspeakeris100%leftand100%right.Whenpan=-1.0,onlytheleftchannelofthestereosoundisaudible,whenpan=1.0,onlytherightchannelofthestereosoundisaudible.
SeeAlso
System::getMasterChannelGroupSystem::createChannelGroupChannel::setPanChannel::getPan
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::overrideReverbPropertiesOverridesthereverbpropertiesofallchannelswithinthischannelgroupandthoseofanysubchannelgroups.
C++Syntax
FMOD_RESULTChannelGroup::overrideReverbProperties(
constFMOD_REVERB_CHANNELPROPERTIES*prop
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_OverrideReverbProperties(
FMOD_CHANNELGROUP*channelgroup,
constFMOD_REVERB_CHANNELPROPERTIES*prop
);
Parameters
prop
PointertoaFMOD_REVERB_CHANNELPROPERTIESstructuredefinition.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_REVERB_CHANNELPROPERTIESSystem::setReverbPropertiesSystem::getReverbProperties
Channel::setReverbPropertiesChannel::getReverbPropertiesSystem::getMasterChannelGroupSystem::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::overrideSpeakerMixOverridesallchannelspeakerlevelsforeachspeakerindividually.
C++Syntax
FMOD_RESULTChannelGroup::overrideSpeakerMix(
floatfrontleft,
floatfrontright,
floatcenter,
floatlfe,
floatbackleft,
floatbackright,
floatsideleft,
floatsideright
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_OverrideSpeakerMix(
FMOD_CHANNELGROUP*channelgroup,
floatfrontleft,
floatfrontright,
floatcenter,
floatlfe,
floatbackleft,
floatbackright,
floatsideleft,
floatsideright
);
Parameters
frontleft
Levelforthischannelinthefrontleftspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume.
frontright
Levelforthischannelinthefrontrightspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume.
center
Levelforthischannelinthecenterspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume.
lfe
Levelforthischannelinthesubwooferspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume.
backleft
Levelforthischannelinthebackleftspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume.
backright
Levelforthischannelinthebackrightspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume.
sideleft
Levelforthischannelinthesideleftspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume.
sideright
Levelforthischannelinthesiderightspeakerofamultichannelspeakersetup.0.0=silent,1.0=fullvolume.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctiononlyworksonsoundscreatedwithFMOD_2D.3DsoundsarenotpannableandwillreturnFMOD_ERR_NEEDS2D.
OnlysoundscreatewithFMOD_SOFTWAREplayingonthischannelwillallowthisfunctionality.
Speakersspecifiedthatdon'texistwillsimplybeignored.
Formoreadvancedspeakercontrol,includingsendingthedifferentchannelsofastereosoundtoarbitraryspeakers,seeChannel::setSpeakerLevels.
SeeAlso
Channel::setSpeakerMixChannel::getSpeakerMixChannel::setSpeakerLevels
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::overrideVolumeOverridesthevolumeofallchannelswithinthischannelgroupandthoseofanysubchannelgroups.
C++Syntax
FMOD_RESULTChannelGroup::overrideVolume(
floatvolume
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_OverrideVolume(
FMOD_CHANNELGROUP*channelgroup,
floatvolume
);
Parameters
volume
Alinearvolumelevel,from0.0to1.0inclusive.0.0=silent,1.0=fullvolume.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.Thisisnottobeusedasamastervolumeforthegroup,asitwillmodifythevolumesofthechannelsthemselves.
Ifyouwanttoscalethevolumeofthegroup,useChannelGroup::setVolume.
SeeAlso
System::getMasterChannelGroupSystem::createChannelGroupChannelGroup::setVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::releaseFreesachannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::release();
CSyntax
FMOD_RESULTFMOD_ChannelGroup_Release(FMOD_CHANNELGROUP*channelgroup
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
AllchannelsassignedtothisgrouparereturnedbacktothemasterchannelgroupownedbytheSystemobject.SeeSystem::getMasterChannelGroup.AllchildgroupsassignedtothisgrouparereturnedbacktothemasterchannelgroupownedbytheSystemobject.SeeSystem::getMasterChannelGroup.
SeeAlso
System::createChannelGroupSystem::getMasterChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::set3DOcclusionSetsthemasterocclusionfactorsforthechannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::set3DOcclusion(
floatdirectocclusion,
floatreverbocclusion
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_Set3DOcclusion(
FMOD_CHANNELGROUP*channelgroup,
floatdirectocclusion,
floatreverbocclusion
);
Parameters
directocclusion
Occlusionfactorforthedirectpath.0.0=notoccluded.1.0=fullyoccluded.Default=0.0.
reverbocclusion
Occlusionfactorforthereverbmix.0.0=notoccluded.1.0=fullyoccluded.Default=0.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctiondoesnotgothroughandoverwritethechannelocclusionfactors.Itscalesthembythechannelgroup'socclusionfactors.ThatwaywhenChannel::set3DOcclusion/Channel::get3DOcclusioniscalledtherespectiveindividualchannelocclusionfactorswillstillbepreserved.ThismeansthatfinalChannelocclusionvalueswillbeaffectedbybothChannelGroupocclusionandgeometry(ifany).
SeeAlso
ChannelGroup::get3DOcclusionChannel::set3DOcclusionChannel::get3DOcclusionSystem::getMasterChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::setMuteMutesachannelgroup,andthechannelswithinit,orunmutesanyunmutedchannelsifsettofalse.
C++Syntax
FMOD_RESULTChannelGroup::setMute(
boolmute
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_SetMute(
FMOD_CHANNELGROUP*channelgroup,
FMOD_BOOLmute
);
Parameters
mute
Mutestatetoset.true=channelgroupstateissettomuted.false=channelgroupstateissettounmuted.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Achannelgroupmaintainsamutestate,thataffectschannelgroupsandchannelswithinit.Ifachannelgroupismuted,allchannelgroupsandchannelsbelowit
willbecomemuted.Channelswillnothavetheirperchannelmutestateoverwritten,sothatwhenachannelgroupisunmuted,themutedstateofthechannelswillcorrectastheyweresetonaperchannelbasis.Thismeanseventhoughachannelismuted,itcanreturnfalsewhenyoucallChannel::getMuteonthatchannel,becausethatwasthestateofthechannelatthetimebeforetheChannelGroupwasmuted.
SeeAlso
ChannelGroup::getMuteChannel::setMuteChannel::getMuteSystem::getMasterChannelGroupSystem::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::setPausedPausesachannelgroup,andthechannelswithinit,orunpausesanyunpausedchannelsifsettofalse.
C++Syntax
FMOD_RESULTChannelGroup::setPaused(
boolpaused
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_SetPaused(
FMOD_CHANNELGROUP*channelgroup,
FMOD_BOOLpaused
);
Parameters
paused
Pausedstatetoset.true=channelgroupstateissettopaused.false=channelgroupstateissettounpaused.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Achannelgroupmaintainsapausedstate,thataffectschannelgroupsandchannelswithinit.Ifachannelgroupispaused,allchannelgroupsandchannels
belowitwillbecomepaused.Channelswillnothavetheirperchannelpausestateoverwritten,sothatwhenachannelgroupisunpaused,thepausedstateofthechannelswillcorrectastheyweresetonaperchannelbasis.Thismeanseventhoughachannelispaused,itcanreturnfalsewhenyoucallChannel::getPausedonthatchannel,becausethatwasthestateofthechannelatthetimebeforetheChannelGroupwaspaused.
SeeAlso
ChannelGroup::getPausedChannel::setPausedChannel::getPausedSystem::getMasterChannelGroupSystem::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::setPitchSetsthemasterpitchforthechannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::setPitch(
floatpitch
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_SetPitch(
FMOD_CHANNELGROUP*channelgroup,
floatpitch
);
Parameters
pitch
Apitchlevel,from0.0to10.0inclusive.0.5=halfpitch,2.0=doublepitch.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctiondoesnotgothroughandoverwritethechannelfrequencies.Itscalesthembythechannelgroup'spitch.ThatwaywhenChannel::setFrequency/Channel::getFrequencyiscalledthe
respectiveindividualchannelfrequencieswillstillbepreserved.
SeeAlso
ChannelGroup::overrideFrequencySystem::getMasterChannelGroupChannelGroup::getPitchChannel::setFrequencyChannel::getFrequencyChannelGroup::overrideFrequency
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::setUserDataSetsauservaluethattheChannelGroupobjectwillstoreinternally.CanberetrievedwithChannelGroup::getUserData.
C++Syntax
FMOD_RESULTChannelGroup::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_SetUserData(
FMOD_CHANNELGROUP*channelgroup,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheChannelGroupobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingChannelGroup::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
ChannelGroup::getUserDataSystem::getMasterChannelGroupSystem::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::setVolumeSetsthemastervolumeforthechannelgrouplinearly.
C++Syntax
FMOD_RESULTChannelGroup::setVolume(
floatvolume
);
CSyntax
FMOD_RESULTFMOD_ChannelGroup_SetVolume(
FMOD_CHANNELGROUP*channelgroup,
floatvolume
);
Parameters
volume
Alinearvolumelevel,from0.0to1.0inclusive.0.0=silent,1.0=fullvolume.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctiondoesnotgothroughandoverwritethechannelvolumes.Itscalesthembythechannelgroup'svolume.ThatwaywhenChannel::setVolume/Channel::getVolumeiscalledthe
respectiveindividualchannelvolumeswillstillbepreserved.
SeeAlso
ChannelGroup::setVolumeChannel::setVolumeChannel::getVolumeChannelGroup::overrideVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ChannelGroup::stopStopsallchannelswithinthechannelgroup.
C++Syntax
FMOD_RESULTChannelGroup::stop();
CSyntax
FMOD_RESULTFMOD_ChannelGroup_Stop(FMOD_CHANNELGROUP*channelgroup
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::playSoundSystem::getMasterChannelGroupSystem::createChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroupInterfaceSoundGroup::getMaxAudibleSoundGroup::getMaxAudibleBehaviorSoundGroup::getMemoryInfoSoundGroup::getMuteFadeSpeedSoundGroup::getNameSoundGroup::getNumPlayingSoundGroup::getNumSoundsSoundGroup::getSoundSoundGroup::getSystemObjectSoundGroup::getUserDataSoundGroup::getVolumeSoundGroup::releaseSoundGroup::setMaxAudibleSoundGroup::setMaxAudibleBehaviorSoundGroup::setMuteFadeSpeedSoundGroup::setUserDataSoundGroup::setVolumeSoundGroup::stop
FirelightTechnologiesFMODEx
SoundGroup::getMaxAudibleRetrievesthenumberofconcurrentplaybacksofsoundsinasoundgrouptothespecifiedvalue.Ifthesoundsinthesoundgroupareplayingthismanytimes,anyatteptstoplaymoreofthesoundsinthesoundgroupwillfailwithFMOD_ERR_MAXAUDIBLE.
C++Syntax
FMOD_RESULTSoundGroup::getMaxAudible(
int*maxaudible
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_GetMaxAudible(
FMOD_SOUNDGROUP*soundgroup,
int*maxaudible
);
Parameters
maxaudible
Addressofavariabletorecievethenumberofplaybackstobeaudibleatonce.-1=unlimited.0meansnosoundsinthisgroupwillsucceed.Default=-1.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SoundGroup::getNumPlayingcanbeusedtodeterminehowmanyinstancesofthesoundsinthesoundgroupareplaying.
SeeAlso
SoundGroup::setMaxAudibleSoundGroup::getNumPlayingSystem::createSoundGroupSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::getMaxAudibleBehaviorRetrievesthecurrentmaxaudiblebehaviormethod.
C++Syntax
FMOD_RESULTSoundGroup::getMaxAudibleBehavior(
FMOD_SOUNDGROUP_BEHAVIOR*behavior
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_GetMaxAudibleBehavior(
FMOD_SOUNDGROUP*soundgroup,
FMOD_SOUNDGROUP_BEHAVIOR*behavior
);
Parameters
behavior
Addressofavariabletorecievethecurrentsoundgroupmaxplaybacksbehavior.DefaultisFMOD_SOUNDGROUP_BEHAVIOR_FAIL.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_SOUNDGROUP_BEHAVIORSoundGroup::setMaxAudibleBehaviorSoundGroup::setMaxAudible
SoundGroup::getMaxAudibleSoundGroup::setMuteFadeSpeedSoundGroup::getMuteFadeSpeedSystem::createSoundGroupSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTSoundGroup::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_GetMemoryInfo(
FMOD_SOUNDGROUP*soundgroup,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::getMuteFadeSpeedRetrievesthecurrenttimeinsecondsforFMOD_SOUNDGROUP_BEHAVIOR_MUTEbehaviortofadewith.
C++Syntax
FMOD_RESULTSoundGroup::getMuteFadeSpeed(
float*speed
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_GetMuteFadeSpeed(
FMOD_SOUNDGROUP*soundgroup,
float*speed
);
Parameters
speed
Addressofavariabletoreceivethefadetimeinseconds(1.0=1second).Default=0.0.(nofade).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
IfamodebesidesFMOD_SOUNDGROUP_BEHAVIOR_MUTEisused,thefadespeedisignored.
SeeAlso
SoundGroup::setMuteFadeSpeedSoundGroup::setMaxAudibleBehaviorSoundGroup::getMaxAudibleBehaviorSoundGroup::setMaxAudibleSoundGroup::getMaxAudibleSystem::createSoundGroupSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::getNameRetrievesthenameofthesoundgroup.
C++Syntax
FMOD_RESULTSoundGroup::getName(
char*name,
intnamelen
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_GetName(
FMOD_SOUNDGROUP*soundgroup,
char*name,
intnamelen
);
Parameters
name
Addressofavariablethatreceivesthenameofthesoundgroup.
namelen
Lengthinbytesofthetargetbuffertoreceievethestring.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::createSoundGroupSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::getNumPlayingRetrievesthenumberofcurrentlyplayingchannelsforthesoundgroup.
C++Syntax
FMOD_RESULTSoundGroup::getNumPlaying(
int*numplaying
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_GetNumPlaying(
FMOD_SOUNDGROUP*soundgroup,
int*numplaying
);
Parameters
numplaying
Addressofavariabletoreceivethenumberofactivelyplayingchannelsfromsoundsinthissoundgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisroutinereturnsthenumberofchannelsplaying.Ifthesoundgrouponlyhas1sound,andthatsoundisplayingtwice,thefigurereturnedwillbe2.
SeeAlso
System::createSoundGroupSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::getNumSoundsRetrievesthecurrentnumberofsoundsinthissoundgroup.
C++Syntax
FMOD_RESULTSoundGroup::getNumSounds(
int*numsounds
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_GetNumSounds(
FMOD_SOUNDGROUP*soundgroup,
int*numsounds
);
Parameters
numsounds
Addressofavariabletoreceivethenumberofsoundsinthissoundgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::createSoundGroupSystem::getMasterSoundGroupSoundGroup::setMaxAudibleSoundGroup::getSound
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::getSoundRetrievesapointertoasoundfromwithinasoundgroup.
C++Syntax
FMOD_RESULTSoundGroup::getSound(
intindex,
FMOD::Sound**sound
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_GetSound(
FMOD_SOUNDGROUP*soundgroup,
intindex,
FMOD_SOUND**sound
);
Parameters
index
Indexofthesoundthatistoberetrieved.
sound
AddressofavariabletoreceieveapointertoaSoundobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UseSoundGroup::getNumSoundsinconjunctionwiththisfunctiontoenumerateallsoundsinasoundgroup.
SeeAlso
System::createSoundGroupSystem::createSoundSoundGroup::getNumSoundsSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::getSystemObjectRetrievestheparentSystemobjectthatwasusedtocreatethisobject.
C++Syntax
FMOD_RESULTSoundGroup::getSystemObject(
FMOD::System**system
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_GetSystemObject(
FMOD_SOUNDGROUP*soundgroup,
FMOD_SYSTEM**system
);
Parameters
system
AddressofapointerthatreceivestheSystemobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::createSoundGroupSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::getUserDataRetrievestheuservaluethatthatwassetbycallingtheSoundGroup::setUserDatafunction.
C++Syntax
FMOD_RESULTSoundGroup::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_GetUserData(
FMOD_SOUNDGROUP*soundgroup,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeSoundGroup::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
SoundGroup::setUserDataSystem::createSoundGroup
System::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::getVolumeRetrievesthevolumeforthesoundswithinasoundgroup.
C++Syntax
FMOD_RESULTSoundGroup::getVolume(
float*volume
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_GetVolume(
FMOD_SOUNDGROUP*soundgroup,
float*volume
);
Parameters
volume
Addressofavariabletoreceivethesoundgroupvolumelevel,from0.0to1.0inclusive.0.0=silent,1.0=fullvolume.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
SoundGroup::setVolumeSystem::createSoundGroupSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::releaseReleasesasoundgroupobjectandreturnsallsoundsbacktothemastersoundgroup.
C++Syntax
FMOD_RESULTSoundGroup::release();
CSyntax
FMOD_RESULTFMOD_SoundGroup_Release(FMOD_SOUNDGROUP*soundgroup);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Youcannotreleasethemastersoundgroup.
SeeAlso
System::createSoundGroupSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::setMaxAudibleLimitsthenumberofconcurrentplaybacksofsoundsinasoundgrouptothespecifiedvalue.Afterthis,ifthesoundsinthesoundgroupareplayingthismanytimes,anyatteptstoplaymoreofthesoundsinthesoundgroupwillbydefaultfailwithFMOD_ERR_MAXAUDIBLE.UseSoundGroup::setMaxAudibleBehaviortochangethewaythesoundplaybackbehaveswhentoomanysoundsareplaying.Muting,failingandstealingbehaviorscanbespecified.
C++Syntax
FMOD_RESULTSoundGroup::setMaxAudible(
intmaxaudible
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_SetMaxAudible(
FMOD_SOUNDGROUP*soundgroup,
intmaxaudible
);
Parameters
maxaudible
Numberofplaybackstobeaudibleatonce.-1=unlimited.0meansnosoundsinthisgroupwillsucceed.Default=-1.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SoundGroup::getNumPlayingcanbeusedtodeterminehowmanyinstancesofthesoundsinthesoundgrouparecurrentlyplaying.
SeeAlso
System::createSoundGroupSoundGroup::getMaxAudibleSoundGroup::getNumPlayingSoundGroup::setMaxAudibleBehaviorSoundGroup::getMaxAudibleBehaviorSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::setMaxAudibleBehaviorThisfunctionchangesthewaythesoundplaybackbehaveswhentoomanysoundsareplayinginasoundgroup.Muting,failingandstealingbehaviorscanbespecified.
C++Syntax
FMOD_RESULTSoundGroup::setMaxAudibleBehavior(
FMOD_SOUNDGROUP_BEHAVIORbehavior
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_SetMaxAudibleBehavior(
FMOD_SOUNDGROUP*soundgroup,
FMOD_SOUNDGROUP_BEHAVIORbehavior
);
Parameters
behavior
SpecifyabehaviordeterminedwithaFMOD_SOUNDGROUP_BEHAVIORflag.DefaultisFMOD_SOUNDGROUP_BEHAVIOR_FAIL.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_SOUNDGROUP_BEHAVIORSoundGroup::getMaxAudibleBehaviorSoundGroup::setMaxAudibleSoundGroup::getMaxAudibleSoundGroup::setMuteFadeSpeedSoundGroup::getMuteFadeSpeedSystem::createSoundGroupSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::setMuteFadeSpeedSpecifyatimeinsecondsforFMOD_SOUNDGROUP_BEHAVIOR_MUTEbehaviortofadewith.Bydefaultthereisnofade.WhenmoresoundsareplayinginaSoundGroupthanarespecifiedwithSoundGroup::setMaxAudible,theleastimportantsound(ielowestpriority/lowestaudiblevolumedueto3dposition,volumeetc)willfadetosilenceifFMOD_SOUNDGROUP_BEHAVIOR_MUTEisused,andanyprevioussoundsthatweresilentbecauseofthisrulewillfadeiniftheyaremoreimportant.
C++Syntax
FMOD_RESULTSoundGroup::setMuteFadeSpeed(
floatspeed
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_SetMuteFadeSpeed(
FMOD_SOUNDGROUP*soundgroup,
floatspeed
);
Parameters
speed
Fadetimeinseconds(1.0=1second).Default=0.0.(nofade).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
IfamodebesidesFMOD_SOUNDGROUP_BEHAVIOR_MUTEisused,thefadespeedisignored.
SeeAlso
SoundGroup::getMuteFadeSpeedSoundGroup::setMaxAudibleBehaviorSoundGroup::getMaxAudibleBehaviorSoundGroup::setMaxAudibleSoundGroup::getMaxAudibleSystem::createSoundGroupSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::setUserDataSetsauservaluethattheSoundGroupobjectwillstoreinternally.CanberetrievedwithSoundGroup::getUserData.
C++Syntax
FMOD_RESULTSoundGroup::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_SetUserData(
FMOD_SOUNDGROUP*soundgroup,
void*userdata
);
Parameters
userdata
Addressofuserdatathattheuserwishesstoredwithinthesoundgroupobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingSoundGroup::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
SoundGroup::getUserDataSystem::createSoundGroupSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::setVolumeSetsthevolumeforasoundgroup,affectingallchannelsplayingthesoundsinthissoundgroup.
C++Syntax
FMOD_RESULTSoundGroup::setVolume(
floatvolume
);
CSyntax
FMOD_RESULTFMOD_SoundGroup_SetVolume(
FMOD_SOUNDGROUP*soundgroup,
floatvolume
);
Parameters
volume
Alinearvolumelevel,from0.0to1.0inclusive.0.0=silent,1.0=fullvolume.Default=1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
SoundGroup::getVolumeSystem::createSoundGroup
System::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
SoundGroup::stopStopsallsoundswithinthissoundgroup.
C++Syntax
FMOD_RESULTSoundGroup::stop();
CSyntax
FMOD_RESULTFMOD_SoundGroup_Stop(FMOD_SOUNDGROUP*soundgroup);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::playSoundSystem::createSoundGroupSystem::getMasterSoundGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSPInterfaceDSP::addInputDSP::disconnectAllDSP::disconnectFromDSP::getActiveDSP::getBypassDSP::getDefaultsDSP::getInfoDSP::getInputDSP::getMemoryInfoDSP::getNumInputsDSP::getNumOutputsDSP::getNumParametersDSP::getOutputDSP::getParameterDSP::getParameterInfoDSP::getSpeakerActiveDSP::getSystemObjectDSP::getTypeDSP::getUserDataDSP::releaseDSP::removeDSP::resetDSP::setActiveDSP::setBypassDSP::setDefaultsDSP::setParameterDSP::setSpeakerActiveDSP::setUserDataDSP::showConfigDialog
FirelightTechnologiesFMODEx
DSP::addInputAddsthespecifiedDSPunitasaninputoftheDSPobject.
C++Syntax
FMOD_RESULTDSP::addInput(
FMOD::DSP*target,
FMOD::DSPConnection**connection
);
CSyntax
FMOD_RESULTFMOD_DSP_AddInput(
FMOD_DSP*dsp,
FMOD_DSP*target,
FMOD_DSPCONNECTION**connection
);
Parameters
target
TheDSPunittoaddasaninputofthecurrentunit.
connection
Theconnectionbetweenthe2units.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.Addingaunitasaninputmeansthattherecanbemultipleunitsaddedtothetarget.
Inputsareautomaticallymixedtogether,thenthemixeddataissenttotheunit's
output(s).
TofindthenumberofinputsoroutputsaunithasuseDSP::getNumInputsorDSP::getNumOutputs.
Note:Theconnectionpointerretrievedherewillbecomeinvalidifyoudisconnectthe2dspunitsthatuseit.
Remarks
Ifyouwanttoaddaunitasanoutputofanotherunit,thenadd'this'unitasaninputofthatunitinstead.
SeeAlso
DSP::getNumInputsDSP::getInputDSP::getNumOutputsDSP::disconnectFrom
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::disconnectAllHelperfunctiontodisconnecteitherallinputsoralloutputsofadspunit.
C++Syntax
FMOD_RESULTDSP::disconnectAll(
boolinputs,
booloutputs
);
CSyntax
FMOD_RESULTFMOD_DSP_DisconnectAll(
FMOD_DSP*dsp,
FMOD_BOOLinputs,
FMOD_BOOLoutputs
);
Parameters
inputs
true=disconnectallinputstothisDSPunit.false=leaveinputconnectionsalone.
outputs
true=disconnectalloutputstothisDSPunit.false=leaveoutputconnectionsalone.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisoptimizedtobefasterthandisconnectinginputsandoutputsmanuallyonebyone.
Importantnote:IfyouhaveahandletoDSPConnectionpointersthatbindanyoftheinputsoroutputstothisDSPunit,thentheywillbecomeinvalid.Theconnectionsaresentbacktoafreelisttobere-usedagainbyalateraddInputcommand.
SeeAlso
DSP::disconnectFrom
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::disconnectFromDisconnecttheDSPunitfromthespecifiedtarget.
C++Syntax
FMOD_RESULTDSP::disconnectFrom(
FMOD::DSP*target
);
CSyntax
FMOD_RESULTFMOD_DSP_DisconnectFrom(
FMOD_DSP*dsp,
FMOD_DSP*target
);
Parameters
target
Theunitthatthisunitistoberemovedfrom.Specify0orNULLtodisconnecttheunitfromalloutputsandinputs.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Notethatwhenyoudisconnectaunit,itisuptoyoutoreconnectthenetworksothatdataflowcancontinue.
Importantnote:Ifyouhaveahandletotheconnectionpointerthatbindsthese2DSPunits,thenitwillbecomeinvalid.Theconnectionisthensentbacktoafreelisttobere-usedagainbyalateraddInputcommand.
SeeAlso
DSP::addInputDSP::disconnectAll
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getActiveRetrievestheactivestateofaDSPunit.
C++Syntax
FMOD_RESULTDSP::getActive(
bool*active
);
CSyntax
FMOD_RESULTFMOD_DSP_GetActive(
FMOD_DSP*dsp,
FMOD_BOOL*active
);
Parameters
active
Addressofavariablethatreceivestheactivestateoftheunit.true=unitisactivated,false=unitisdeactivated.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
DSP::setActiveDSP::setBypass
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getBypassRetrievesthebypassstateoftheDSPunit.
C++Syntax
FMOD_RESULTDSP::getBypass(
bool*bypass
);
CSyntax
FMOD_RESULTFMOD_DSP_GetBypass(
FMOD_DSP*dsp,
FMOD_BOOL*bypass
);
Parameters
bypass
AddressofavariablethatreceievesthebypassstateforaDSPunit.true=unitisnotprocessingaudiodata,false=unitisprocessingaudiodata.Default=false.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifaunitisbypassed,itwillstillprocessitsinputs,unlikeDSP::setActive(whensettofalse)whichcausesinputstostopprocessingaswell.
SeeAlso
DSP::setBypassDSP::setActive
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getDefaultsRetrievesthedefaultfrequency,volume,panandmoreforthisDSPunitifitwastoeverbeplayedonachannelusingSystem::playDSP.
C++Syntax
FMOD_RESULTDSP::getDefaults(
float*frequency,
float*volume,
float*pan,
int*priority
);
CSyntax
FMOD_RESULTFMOD_DSP_GetDefaults(
FMOD_DSP*dsp,
float*frequency,
float*volume,
float*pan,
int*priority
);
Parameters
frequency
AddressofavariablethatreceivesthedefaultfrequencyfortheDSPunit.Optional.Specify0orNULLtoignore.
volume
AddressofavariablethatreceivesthedefaultvolumefortheDSPunit.Resultwillbefrom0.0to1.0.0.0=Silent,1.0=fullvolume.Default=1.0.Optional.Specify0orNULLtoignore.
pan
AddressofavariablethatreceivesthedefaultpanfortheDSPunit.Resultwill
befrom-1.0to+1.0.-1.0=Fullleft,0.0=center,1.0=fullright.Default=0.0.Optional.Specify0orNULLtoignore.
priority
AddressofavariablethatreceivesthedefaultpriorityfortheDSPunitwhenplayedonachannel.Resultwillbefrom0to256.0=mostimportant,256=leastimportant.Default=128.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
DSP::setDefaultsSystem::playDSP
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getInfoRetrievesinformationaboutthecurrentDSPunit,includingname,version,defaultchannelsandwidthandheightofconfigurationdialogboxifitexists.
C++Syntax
FMOD_RESULTDSP::getInfo(
char*name,
unsignedint*version,
int*channels,
int*configwidth,
int*configheight
);
CSyntax
FMOD_RESULTFMOD_DSP_GetInfo(
FMOD_DSP*dsp,
char*name,
unsignedint*version,
int*channels,
int*configwidth,
int*configheight
);
Parameters
name
Addressofavariablethatreceivesthenameoftheunit.Thiswillbeamaximumof32bytes.IftheDSPunithasfilledall32byteswiththenamewithnoterminating\0nullcharacteritisuptothecallertoappendanullcharacter.Optional.Specify0orNULLtoignore.
version
AddressofavariablethatreceivestheversionnumberoftheDSPunit.VersionnumberisusuallyformatedashexAAAABBBBwheretheAAAAisthemajorversionnumberandtheBBBBistheminorversionnumber.Optional.Specify0orNULLtoignore.
channels
Addressofavariablethatreceivesthenumberofchannelstheunitwasinitializedwith.0meansthepluginwillprocesswhatevernumberofchannelsiscurrentlyinthenetwork.>0wouldbemostlyusediftheunitisaunitthatonlygeneratessound,orisnotflexibleenoughtotakeanynumberofinputchannels.Optional.Specify0orNULLtoignore.
configwidth
AddressofavariablethatreceivesthewidthofanoptionalconfigurationdialogboxthatcanbedisplayedwithDSP::showConfigDialog.0meansthedialogisnotpresent.Optional.Specify0orNULLtoignore.
configheight
AddressofavariablethatreceivestheheightofanoptionalconfigurationdialogboxthatcanbedisplayedwithDSP::showConfigDialog.0meansthedialogisnotpresent.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
DSP::showConfigDialog
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getInputRetrievesapointertoaDSPunitwhichisactingasaninputtothisunit.
C++Syntax
FMOD_RESULTDSP::getInput(
intindex,
FMOD::DSP**input,
FMOD::DSPConnection**inputconnection
);
CSyntax
FMOD_RESULTFMOD_DSP_GetInput(
FMOD_DSP*dsp,
intindex,
FMOD_DSP**input,
FMOD_DSPCONNECTION**inputconnection
);
Parameters
index
Indexoftheinputunittoretrieve.
input
Addressofavariablethatreceievesthepointertothedesiredinputunit.
inputconnection
Theconnectionbetweenthe2units.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.
IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Aninputisaunitwhichfeedsaudiodatatothisunit.Iftherearemorethan1inputtothisunit,theinputswillbemixed,andthecurrentunitprocessesthemixedresult.FindoutthenumberofinputunitstothisunitbycallingDSP::getNumInputs.
Performancewarning!Becausethisfunctionneedstoflushthedspqueuebeforeitcandetermineifthespecifiednumericalinputisavailableornot,thisfunctionmayblocksignificantlywhilethebackgroundmixerthreadoperates.
Note:Theconnectionpointerretrievedherewillbecomeinvalidifyoudisconnectthe2dspunitsthatuseit.
SeeAlso
DSP::getNumInputsDSP::addInputDSP::getOutputDSPConnection::getMixDSPConnection::setMix
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTDSP::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_DSP_GetMemoryInfo(
FMOD_DSP*dsp,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getNumInputsRetrievesthenumberofinputsconnectedtotheDSPunit.
C++Syntax
FMOD_RESULTDSP::getNumInputs(
int*numinputs
);
CSyntax
FMOD_RESULTFMOD_DSP_GetNumInputs(
FMOD_DSP*dsp,
int*numinputs
);
Parameters
numinputs
Addressofavariablethatreceivesthenumberofinputsconnectedtothisunit.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Inputsareunitsthatfeeddatatothisunit.Whentherearemultipleinputs,theyaremixedtogether.
Performancewarning!Becausethisfunctionneedstoflushthedspqueue
beforeitcandeterminehowmanyunitsareavailable,thisfunctionmayblocksignificantlywhilethebackgroundmixerthreadoperates.
SeeAlso
DSP::getNumOutputsDSP::getInput
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getNumOutputsRetrievesthenumberofoutputsconnectedtotheDSPunit.
C++Syntax
FMOD_RESULTDSP::getNumOutputs(
int*numoutputs
);
CSyntax
FMOD_RESULTFMOD_DSP_GetNumOutputs(
FMOD_DSP*dsp,
int*numoutputs
);
Parameters
numoutputs
Addressofavariablethatreceivesthenumberofoutputsconnectedtothisunit.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Outputsareunitsthatthisunitfeedsdatato.Whentherearemultipleoutputs,thedataissplitandsenttoeachunitindividually.
Performancewarning!Becausethisfunctionneedstoflushthedspqueue
beforeitcandeterminehowmanyunitsareavailable,thisfunctionmayblocksignificantlywhilethebackgroundmixerthreadoperates.
SeeAlso
DSP::getNumInputsDSP::getOutput
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getNumParametersRetrievesthenumberofparametersaDSPunithastocontrolitsbehaviour.
C++Syntax
FMOD_RESULTDSP::getNumParameters(
int*numparams
);
CSyntax
FMOD_RESULTFMOD_DSP_GetNumParameters(
FMOD_DSP*dsp,
int*numparams
);
Parameters
numparams
AddressofavariablethatreceivesthenumberofparameterscontainedwithinthisDSPunit.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UsethistoenumerateallparametersofaDSPunitwithDSP::getParameterandDSP::getParameterInfo.
SeeAlso
DSP::setParameterDSP::getParameterDSP::getParameterInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getOutputRetrievesapointertoaDSPunitwhichisactingasanoutputtothisunit.
C++Syntax
FMOD_RESULTDSP::getOutput(
intindex,
FMOD::DSP**output,
FMOD::DSPConnection**outputconnection
);
CSyntax
FMOD_RESULTFMOD_DSP_GetOutput(
FMOD_DSP*dsp,
intindex,
FMOD_DSP**output,
FMOD_DSPCONNECTION**outputconnection
);
Parameters
index
Indexoftheoutputunittoretrieve.
output
Addressofavariablethatreceievesthepointertothedesiredoutputunit.
outputconnection
Theconnectionbetweenthe2units.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.
IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Anoutputisaunitwhichthisunitwillfeeddatatooonceithasprocesseditsdata.FindoutthenumberofoutputunitstothisunitbycallingDSP::getNumOutputs.
Performancewarning!Becausethisfunctionneedstoflushthedspqueuebeforeitcandetermineifthespecifiednumericaloutputisavailableornot,thisfunctionmayblocksignificantlywhilethebackgroundmixerthreadoperates.
Note:Theconnectionpointerretrievedherewillbecomeinvalidifyoudisconnectthe2dspunitsthatuseit.
SeeAlso
DSP::getNumOutputsDSP::addInputDSP::getInputDSPConnection::getMixDSPConnection::setMix
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getParameterRetrievesaDSPunit'sparameterbyindex.Tofindouttheparameternamesandrange,seetheseealsofield.
C++Syntax
FMOD_RESULTDSP::getParameter(
intindex,
float*value,
char*valuestr,
intvaluestrlen
);
CSyntax
FMOD_RESULTFMOD_DSP_GetParameter(
FMOD_DSP*dsp,
intindex,
float*value,
char*valuestr,
intvaluestrlen
);
Parameters
index
Parameterindexforthisunit.FindthenumberofparameterswithDSP::getNumParameters.
value
Addressofavariablethatreceivestheparametervalue.TheparameterpropertiescanberetrievedwithDSP::getParameterInfo.
valuestr
AddressofavariablethatreceivesthestringcontainingaformattedormoremeaningfulrepresentationoftheDSPparameter'svalue.Forexampleifaswitch
parameterhasonandoff(0.0or1.0)itwilldisplay"ON"or"OFF"byusingthisparameter.
valuestrlen
Lengthoftheusersuppliedmemoryinbytesthatvaluestrwillwriteto.Thiswillnotexceed16bytes.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
DSP::getParameterInfoDSP::getNumParametersDSP::setParameterFMOD_DSP_OSCILLATORFMOD_DSP_LOWPASSFMOD_DSP_ITLOWPASSFMOD_DSP_HIGHPASSFMOD_DSP_ECHOFMOD_DSP_DELAYFMOD_DSP_FLANGEFMOD_DSP_TREMOLOFMOD_DSP_DISTORTIONFMOD_DSP_NORMALIZEFMOD_DSP_PARAMEQFMOD_DSP_PITCHSHIFTFMOD_DSP_CHORUSFMOD_DSP_ITECHOFMOD_DSP_COMPRESSORFMOD_DSP_SFXREVERBFMOD_DSP_LOWPASS_SIMPLE
FMOD_DSP_HIGHPASS_SIMPLE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getParameterInfoRetrieveinformationaboutaspecifiedparameterwithintheDSPunit.
C++Syntax
FMOD_RESULTDSP::getParameterInfo(
intindex,
char*name,
char*label,
char*description,
intdescriptionlen,
float*min,
float*max
);
CSyntax
FMOD_RESULTFMOD_DSP_GetParameterInfo(
FMOD_DSP*dsp,
intindex,
char*name,
char*label,
char*description,
intdescriptionlen,
float*min,
float*max
);
Parameters
index
Parameterindexforthisunit.FindthenumberofparameterswithDSP::getNumParameters.
name
Addressofavariablethatreceivesthenameoftheparameter.Anexampleis"Gain".Thisisamaximumstringlengthof16bytes(append\0incasethepluginhasusedall16bytesforthestring).
label
Addressofavariablethatreceivesthelabeloftheparameter(ieaparametertypethatmightgonexttotheparameter).Anexampleis"dB".Thisisamaximumstringlengthof16bytes(append\0incasethepluginhasusedall16bytesforthestring).
description
Addressofavariablethatreceivesthemoredescriptivetextabouttheparameter(ieforatooltip).Anexampleis"Controlstheinputlevelfortheeffectindecibels".
descriptionlen
MaximumlengthofusersupplieddescriptionstringinbytesthatFMODwillwriteto.
min
Minimumrangeoftheparameter.
max
Maximumrangeoftheparameter.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UseDSP::getNumParameterstofindoutthenumberofparametersforthisDSPunit.
SeeAlso
DSP::setParameterDSP::getParameterDSP::getNumParameters
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getSpeakerActiveRetrievestheactivestateoftheeffectonthegivenspeaker.
C++Syntax
FMOD_RESULTDSP::getSpeakerActive(
FMOD_SPEAKERspeaker,
bool*active
);
CSyntax
FMOD_RESULTFMOD_DSP_GetSpeakerActive(
FMOD_DSP*dsp,
FMOD_SPEAKERspeaker,
FMOD_BOOL*active
);
Parameters
speaker
Thespeakerchannelthatisbeingchecked
active
AddressofavariablethatreceievestheactivestateforaDSPunit.true=DSPunitisactiveonthatspeakerchannel,false=DSPunitisnotactiveonthatspeakerchannel.Default=true.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
DSP::setSpeakerActiveDSP::getActive
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getSystemObjectRetrievestheparentSystemobjectthatwasusedtocreatethisobject.
C++Syntax
FMOD_RESULTDSP::getSystemObject(
FMOD::System**system
);
CSyntax
FMOD_RESULTFMOD_DSP_GetSystemObject(
FMOD_DSP*dsp,
FMOD_SYSTEM**system
);
Parameters
system
AddressofavariablethatreceivestheSystemobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::createDSPSystem::createDSPByTypeSystem::getDSPHeadChannel::getDSPHead
ChannelGroup::getDSPHead
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getTypeRetrievesthepre-definedtypeofaFMODregisteredDSPunit.
C++Syntax
FMOD_RESULTDSP::getType(
FMOD_DSP_TYPE*type
);
CSyntax
FMOD_RESULTFMOD_DSP_GetType(
FMOD_DSP*dsp,
FMOD_DSP_TYPE*type
);
Parameters
type
AddressofavariabletorecievetheFMODdsptype.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisisonlyvalidforbuiltinFMODeffects.AnyuserpluginswillsimplyreturnFMOD_DSP_TYPE_UNKNOWN.
SeeAlso
FMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::getUserDataRetrievestheuservaluethatthatwassetbycallingtheDSP::setUserDatafunction.
C++Syntax
FMOD_RESULTDSP::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_DSP_GetUserData(
FMOD_DSP*dsp,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivestheuserdataspecifiedwiththeDSP::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
DSP::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::releaseFreesaDSPobject.
C++Syntax
FMOD_RESULTDSP::release();
CSyntax
FMOD_RESULTFMOD_DSP_Release(FMOD_DSP*dsp);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThiswillfreetheDSPobject.
SeeAlso
System::createDSPSystem::createDSPByTypeSystem::getDSPHeadChannel::getDSPHeadChannelGroup::getDSPHead
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::removeRemovesaunitfromaDSPchainandconnectstheunit'sinputandoutputtogetherafteritisgone.
C++Syntax
FMOD_RESULTDSP::remove();
CSyntax
FMOD_RESULTFMOD_DSP_Remove(FMOD_DSP*dsp);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctionisgenerallyonlyusedwithunitsthathavebeenaddedwithSystem::addDSPorChannel::addDSP.Aunitthathasbeenaddedinthiswaygenerallyonlyhasoneinputandoneoutput,sothisfunctionassumesthisandtakesinput0andconnectsitwithoutput0afterithasbeenremoved,sothatthedataflowisnotbroken.
Importantnote:IfyouhaveahandletoDSPConnectionpointersthatbindanyoftheinputsoroutputstothisDSPunit,thentheywillbecomeinvalid.Theconnectionsaresentbacktoafreelisttobere-usedagainbyalateraddInputcommand.
Note:IftheunithasnotbeenaddedwithaddDSPitwillnotrestorelinks,andwilljustdisconnectallinputsandoutputs,makingitequivalentto
disconnectAll(true,true).
SeeAlso
System::addDSPChannel::addDSPChannelGroup::addDSP
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::resetCallstheDSPunit'sresetfunction,whichwillclearinternalbuffersandresettheunitbacktoaninitialstate.
C++Syntax
FMOD_RESULTDSP::reset();
CSyntax
FMOD_RESULTFMOD_DSP_Reset(FMOD_DSP*dsp);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
CallingthisfunctionisusefuliftheDSPunitreliesonahistorytoprocessitself(ieanechofilter).Ifyoudisconnectedtheunitandreconnectedittoadifferentpartofthenetworkwithadifferentsound,youwouldwanttocallthistoresettheunitsstate(ieclearandresettheechofilter)sothatyoudontgetleftoverartifactsfromtheplaceitusedtobeconnected.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::setActiveEnablesordisablesaunitforbeingprocessed.
C++Syntax
FMOD_RESULTDSP::setActive(
boolactive
);
CSyntax
FMOD_RESULTFMOD_DSP_SetActive(
FMOD_DSP*dsp,
FMOD_BOOLactive
);
Parameters
active
true=unitisactivated,false=unitisdeactivated.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisdoesnotconnectordisconnectaunitinanyway,itjustdisablesitsothatitisnotprocessed.Ifaunitisdisabled,andhasinputs,theywillalsoceasetobeprocessed.Todisableaunitbutallowtheinputsoftheunittocontinuebeingprocessed,use
DSP::setBypassinstead.
SeeAlso
DSP::getActiveDSP::setBypass
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::setBypassEnablesordisablesthereadcallbackofaDSPunitsothatitdoesordoesn'tprocessthedatacomingintoit.ADSPunitthatisdisabledstillprocessesitsinputs,itwilljustbe'dry'.
C++Syntax
FMOD_RESULTDSP::setBypass(
boolbypass
);
CSyntax
FMOD_RESULTFMOD_DSP_SetBypass(
FMOD_DSP*dsp,
FMOD_BOOLbypass
);
Parameters
bypass
BooleantocausethereadcallbackoftheDSPunittobebypassedornot.Default=false.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifaunitisbypassed,itwillstillprocessitsinputs.
Todisabletheunitandallofitsinputs,useDSP::setActiveinstead.
SeeAlso
DSP::getBypassDSP::setActive
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::setDefaultsIfaDSPunitistobeplayedonachannelwithSystem::playDSP,thiswillsetthedefaultsforfrequency,volume,panandmoreforthechannel.
C++Syntax
FMOD_RESULTDSP::setDefaults(
floatfrequency,
floatvolume,
floatpan,
intpriority
);
CSyntax
FMOD_RESULTFMOD_DSP_SetDefaults(
FMOD_DSP*dsp,
floatfrequency,
floatvolume,
floatpan,
intpriority
);
Parameters
frequency
DefaultplaybackfrequencyfortheDSPunit,inhz.(ie44100hz).
volume
DefaultvolumefortheDSPunit.0.0to1.0.0.0=Silent,1.0=fullvolume.Default=1.0.
pan
DefaultpanfortheDSPunit.-1.0to+1.0.-1.0=Fullleft,0.0=center,1.0=fullright.Default=0.0.
priority
DefaultpriorityfortheDSPunitwhenplayedonachannel.0to256.0=mostimportant,256=leastimportant.Default=128.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thereareno'ignore'valuesfortheseparameters.UseDSP::getDefaultsifyouwanttochangeonly1andleaveothersunaltered.
SeeAlso
System::playDSPDSP::getDefaults
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::setParameterSetsaDSPunit'sparameterbyindex.Tofindouttheparameternamesandrange,seetheseealsofield.
C++Syntax
FMOD_RESULTDSP::setParameter(
intindex,
floatvalue
);
CSyntax
FMOD_RESULTFMOD_DSP_SetParameter(
FMOD_DSP*dsp,
intindex,
floatvalue
);
Parameters
index
Parameterindexforthisunit.FindthenumberofparameterswithDSP::getNumParameters.
value
Parametervalue.TheparameterpropertiescanberetrievedwithDSP::getParameterInfo.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
DSP::getParameterInfoDSP::getNumParametersDSP::getParameterFMOD_DSP_OSCILLATORFMOD_DSP_LOWPASSFMOD_DSP_ITLOWPASSFMOD_DSP_HIGHPASSFMOD_DSP_ECHOFMOD_DSP_DELAYFMOD_DSP_FLANGEFMOD_DSP_TREMOLOFMOD_DSP_DISTORTIONFMOD_DSP_NORMALIZEFMOD_DSP_PARAMEQFMOD_DSP_PITCHSHIFTFMOD_DSP_CHORUSFMOD_DSP_ITECHOFMOD_DSP_COMPRESSORFMOD_DSP_SFXREVERBFMOD_DSP_LOWPASS_SIMPLEFMOD_DSP_HIGHPASS_SIMPLE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::setSpeakerActiveEnablesordisablestheDSPeffectonthegivenspeakerchannel.ThisisusedtoreducetheoverheadofDSPeffectbyonlyapplyingtheeffecttothespeakerchannelswhereitisneeded.
C++Syntax
FMOD_RESULTDSP::setSpeakerActive(
FMOD_SPEAKERspeaker,
boolactive
);
CSyntax
FMOD_RESULTFMOD_DSP_SetSpeakerActive(
FMOD_DSP*dsp,
FMOD_SPEAKERspeaker,
FMOD_BOOLactive
);
Parameters
speaker
Thespeakerchannelthatisbeingset.
active
BooleantocausetheDSPtobeactive/inactiveonagivenspeakerchannel.Default=true.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
IfaspeakerchannelisdeactivateditwillnothavetheDSPeffectappliedtoit.
SeeAlso
DSP::getSpeakerActiveDSP::setActive
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::setUserDataSetsauservaluethattheDSPobjectwillstoreinternally.CanberetrievedwithDSP::getUserData.
C++Syntax
FMOD_RESULTDSP::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_DSP_SetUserData(
FMOD_DSP*dsp,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheDSPobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingDSP::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
DSP::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSP::showConfigDialogDisplayorhideaDSPunitconfigurationdialogboxinsidethetargetwindow.
C++Syntax
FMOD_RESULTDSP::showConfigDialog(
void*hwnd,
boolshow
);
CSyntax
FMOD_RESULTFMOD_DSP_ShowConfigDialog(
FMOD_DSP*dsp,
void*hwnd,
FMOD_BOOLshow
);
Parameters
hwnd
TargetHWNDinwindowstodisplayconfigurationdialog.
show
true=showdialogboxinsidetargethwnd.false=removedialogfromtargethwnd.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
DialogboxesareusedbyDSPpluginsthatprefertouseagraphicaluserinterfacetomodifytheirparametersratherthanusingtheothermethodofenumeratingtheparametersandusingDSP::setParameter.TheseareusuallyVSTplugins.FMODExpluginsdonothaveconfigurationdialogboxes.Tofindoutwhatsizewindowtocreatetostoretheconfigurationscreen,useDSP::getInfowhereyoucangetthewidthandheight.
SeeAlso
DSP::getInfoDSP::setParameterDSP::getParameter
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSPConnectionInterfaceDSPConnection::getInputDSPConnection::getLevelsDSPConnection::getMemoryInfoDSPConnection::getMixDSPConnection::getOutputDSPConnection::getUserDataDSPConnection::setLevelsDSPConnection::setMixDSPConnection::setUserData
FirelightTechnologiesFMODEx
DSPConnection::getInputRetrievestheDSPunitthatistheinputofthisconnection.
C++Syntax
FMOD_RESULTDSPConnection::getInput(
FMOD::DSP**input
);
CSyntax
FMOD_RESULTFMOD_DSPConnection_GetInput(
FMOD_DSPCONNECTION*dspconnection,
FMOD_DSP**input
);
Parameters
input
AddressofapointerthatreceivesthepointertotheDSPunitthatistheinputofthisconnection.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ADSPConnectionjoins2DSPunitstogether(thinkofitasthelinebetween2circles).EachDSPConnectionhas1inputand1output.
Note!IfaDSP::addInputjustoccured,theconnectionmightnotbereadybecausetheDSPsystemisstillqueuedtoconnectinthebackground.IfsothefunctionwillreturnFMOD_ERR_NOTREADYandtheinputwillbenull.Polluntilitisready.
SeeAlso
DSPConnection::getOutputDSP::addInput
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSPConnection::getLevelsRetrievesthespeakermixforaDSPconnectionforaparticularoutputspeaker.
C++Syntax
FMOD_RESULTDSPConnection::getLevels(
FMOD_SPEAKERspeaker,
float*levels,
intnumlevels
);
CSyntax
FMOD_RESULTFMOD_DSPConnection_GetLevels(
FMOD_DSPCONNECTION*dspconnection,
FMOD_SPEAKERspeaker,
float*levels,
intnumlevels
);
Parameters
speaker
Thetargetspeakertogetthelevelsfrom.Thiscanbecasttoanintegerifyouareusingadevicewithmorethanthepre-definedspeakerrange.
levels
Addressofanarrayoffloatingpointnumberstogetthespeakerlevelsofaninput.
numlevels
Thenumberoffloatswithinthelevelsparameterbeingpassedtothisfunction.Inthecaseoftheabovemonoorstereosound,1or2couldbeusedrespectively.Ifthesoundbeingplayedwasan8channelmultichannelsoundthen8levelswouldbeused.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!Toconservememorythestoredlevelsareconvertedfromfloatingpointto16bitintegers(4.12fixedpoint).ThismeanswhenusingDSP::getInputLevelsthevaluesmaynotcomebackexactlyastheywereset.
SeeAlso
DSPConnection::setLevelsDSPConnection::getInputDSPConnection::getOutputDSPConnection::setMix
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSPConnection::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTDSPConnection::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_DSPConnection_GetMemoryInfo(
FMOD_DSPCONNECTION*dspconnection,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSPConnection::getMixRetrievesthevolumeoftheconnection-thescaleleveloftheinputbeforebeingpassedtotheoutput.
C++Syntax
FMOD_RESULTDSPConnection::getMix(
float*volume
);
CSyntax
FMOD_RESULTFMOD_DSPConnection_GetMix(
FMOD_DSPCONNECTION*dspconnection,
float*volume
);
Parameters
volume
Addressofavariabletoreceivethevolumeormixlevelofthespecifiedinput.0.0=silent,1.0=fullvolume.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
DSPConnection::setMixDSP::getInput
DSP::getOutput
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSPConnection::getOutputRetrievestheDSPunitthatistheoutputofthisconnection.
C++Syntax
FMOD_RESULTDSPConnection::getOutput(
FMOD::DSP**output
);
CSyntax
FMOD_RESULTFMOD_DSPConnection_GetOutput(
FMOD_DSPCONNECTION*dspconnection,
FMOD_DSP**output
);
Parameters
output
AddressofapointerthatreceivesthepointertotheDSPunitthatistheoutputofthisconnection.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ADSPConnectionjoins2DSPunitstogether(thinkofitasthelinebetween2circles).EachDSPConnectionhas1inputand1output.
Note!IfaDSP::addInputjustoccured,theconnectionmightnotbereadybecausetheDSPsystemisstillqueuedtoconnectinthebackground.IfsothefunctionwillreturnFMOD_ERR_NOTREADYandtheinputwillbenull.Polluntilitisready.
SeeAlso
DSPConnection::getInputDSP::addInput
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSPConnection::getUserDataSetsauservaluethattheDSPConnectionobjectwillstoreinternally.CanberetrievedwithDSPConnection::getUserData.
C++Syntax
FMOD_RESULTDSPConnection::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_DSPConnection_GetUserData(
FMOD_DSPCONNECTION*dspconnection,
void**userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheDSPConnectionobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.
SeeAlso
DSPConnection::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSPConnection::setLevelsForaparticularspeaker,thelevelsoftheincomingchannelsoftheconnectionaresetsothattheywillbescaledbeforebeingpassedtotheoutput.
C++Syntax
FMOD_RESULTDSPConnection::setLevels(
FMOD_SPEAKERspeaker,
float*levels,
intnumlevels
);
CSyntax
FMOD_RESULTFMOD_DSPConnection_SetLevels(
FMOD_DSPCONNECTION*dspconnection,
FMOD_SPEAKERspeaker,
float*levels,
intnumlevels
);
Parameters
speaker
Thetargetspeakertomodifythelevelsfor.Thiscanbecasttoanintegerifyouareusingadevicewithmorethanthepre-definedspeakerrange.
levels
Anarrayoffloatingpointnumbersfrom0.0to1.0representingthevolumeofeachinputchannelofasound.Seeremarksformore.
numlevels
Thenumberoffloatswithinthelevelsparameterbeingpassedtothisfunction.Inthecaseoftheabovemonoorstereosound,1or2couldbeusedrespectively.Ifthesoundbeingplayedwasan8channelmultichannelsoundthen8levelswouldbeused.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Asanexampleofusageofthisfunction,ifthesoundplayedonthisspeakerwasmono,only1levelwouldbeneeded.Ifthesoundplayedonthischannelwasstereo,thenanarrayof2floatscouldbespecified.Forexample{0,1}onachannelplayingastereosoundwouldmutetheleftpartofthestereosoundwhenitisplayedonthisspeaker.
Note!Toconservememorythelevelsareconvertedfromfloatingpointto16bitintegers(4.12fixedpoint).ThismeanswhenusingDSPConnection::getLevelsthevaluesmaynotcomebackexactlyastheywereset.
SeeAlso
DSPConnection::getLevelsDSPConnection::getInputDSPConnection::getOutputDSPConnection::setMix
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSPConnection::setMixSetsthevolumeoftheconnectionsothattheinputisscaledbythisvaluebeforebeingpassedtotheoutput.
C++Syntax
FMOD_RESULTDSPConnection::setMix(
floatvolume
);
CSyntax
FMOD_RESULTFMOD_DSPConnection_SetMix(
FMOD_DSPCONNECTION*dspconnection,
floatvolume
);
Parameters
volume
Volumeormixleveloftheconnection.0.0=silent,1.0=fullvolume.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
DSPConnection::getMixDSP::getInputDSP::getOutput
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DSPConnection::setUserDataSetsauservaluethattheDSPConnectionobjectwillstoreinternally.CanberetrievedwithDSPConnection::getUserData.
C++Syntax
FMOD_RESULTDSPConnection::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_DSPConnection_SetUserData(
FMOD_DSPCONNECTION*dspconnection,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheDSPConnectionobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.
SeeAlso
DSPConnection::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
GeometryInterfaceGeometry::addPolygonGeometry::getActiveGeometry::getMaxPolygonsGeometry::getMemoryInfoGeometry::getNumPolygonsGeometry::getPolygonAttributesGeometry::getPolygonNumVerticesGeometry::getPolygonVertexGeometry::getPositionGeometry::getRotationGeometry::getScaleGeometry::getUserDataGeometry::releaseGeometry::saveGeometry::setActiveGeometry::setPolygonAttributesGeometry::setPolygonVertexGeometry::setPositionGeometry::setRotationGeometry::setScaleGeometry::setUserData
FirelightTechnologiesFMODEx
Geometry::addPolygonAddsapolygontoanexistinggeometryobject.
C++Syntax
FMOD_RESULTGeometry::addPolygon(
floatdirectocclusion,
floatreverbocclusion,
booldoublesided,
intnumvertices,
constFMOD_VECTOR*vertices,
int*polygonindex
);
CSyntax
FMOD_RESULTFMOD_Geometry_AddPolygon(
FMOD_GEOMETRY*geometry,
floatdirectocclusion,
floatreverbocclusion,
FMOD_BOOLdoublesided,
intnumvertices,
constFMOD_VECTOR*vertices,
int*polygonindex
);
Parameters
directocclusion
Occlusionvaluefrom0.0to1.0whichaffectsvolumeoraudiblefrequencies.0.0=Thepolygondoesnotoccludevolumeoraudiblefrequencies(soundwillbefullyaudible),1.0=Thepolygonfullyoccludes(soundwillbesilent).
reverbocclusion
Occlusionvaluefrom0.0to1.0whichaffectsthereverbmix.0.0=Thepolygondoesnotoccludereverb(reverbreflectionsstilltravelthroughthispolygon),1.0=Thepolyfullyfullyoccludesreverb(reverbreflectionswillbesilentthroughthispolygon).
doublesided
Descriptionofpolygonifitisdoublesidedorsinglesided.true=polygonisdoublesided,false=polygonissinglesided,andthewindingofthepolygon(whichdeterminesthepolygon'snormal)determineswhichsideofthepolygonwillcauseocclusion.
numvertices
Numberofverticesinthispolygon.Thismustbeatleast3.Polygons(morethan3sides)aresupported.
vertices
Apointertoanarrayofverticeslocatedinobjectspace,withthecountbeingthenumberofverticesdescribedusingthenumverticesparameter.
polygonindex
Addressofavariabletoreceievethepolygonindexforthisobject.Thisindexcanbeusedlaterwithotherperpolygonbasedgeometryfunctions.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!-Allverticesmustlayinthesameplaneotherwisebehaviourmaybeunpredictable.-Thepolygonisassumedtobeconvex.Anonconvexpolygonwillproduceunpredictablebehaviour.-Polygonswithzeroareawillbeignored.
Verticesofanobjectareinobjectspace,notworldspace,andsoarerelativetotheposition,orcenteroftheobject.SeeGeometry::setPosition.
SeeAlso
Geometry::getNumPolygonsGeometry::setPositionFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::getActiveRetrievestheusersetactivestateofthegeometryobject.
C++Syntax
FMOD_RESULTGeometry::getActive(
bool*active
);
CSyntax
FMOD_RESULTFMOD_Geometry_GetActive(
FMOD_GEOMETRY*geometry,
FMOD_BOOL*active
);
Parameters
active
Addressofavariabletoreceivetheactivestateoftheobject.true=active,false=notactive.Default=true.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Geometry::setActive
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::getMaxPolygonsRetrievesthemaximumnumberofpolygonsandverticesallocatableforthisobject.Thisisnotthenumberofpolygonsorverticescurrentlypresent.ThemaximumnumberwassetwithSystem::createGeometry.
C++Syntax
FMOD_RESULTGeometry::getMaxPolygons(
int*maxpolygons,
int*maxvertices
);
CSyntax
FMOD_RESULTFMOD_Geometry_GetMaxPolygons(
FMOD_GEOMETRY*geometry,
int*maxpolygons,
int*maxvertices
);
Parameters
maxpolygons
Addressofavariabletoreceievethemaximumpossiblenumberofpolygonsinthisobject.
maxvertices
Addressofavariabletoreceievethemaximumpossiblenumberofverticesinthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::createGeometrySystem::loadGeometry
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTGeometry::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_Geometry_GetMemoryInfo(
FMOD_GEOMETRY*geometry,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::getNumPolygonsRetrievesthenumberofpolygonsstoredwithinthisgeometryobject.
C++Syntax
FMOD_RESULTGeometry::getNumPolygons(
int*numpolygons
);
CSyntax
FMOD_RESULTFMOD_Geometry_GetNumPolygons(
FMOD_GEOMETRY*geometry,
int*numpolygons
);
Parameters
numpolygons
Addressofavariabletoreceivethenumberofpolygonswithinthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
PolygonsareaddedtoageometryobjectviaGeometry::addPolygon.
SeeAlso
Geometry::AddPolygon
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::getPolygonAttributesRetrievestheattributesforaparticularpolygoninsideageometryobject.
C++Syntax
FMOD_RESULTGeometry::getPolygonAttributes(
intindex,
float*directocclusion,
float*reverbocclusion,
bool*doublesided
);
CSyntax
FMOD_RESULTFMOD_Geometry_GetPolygonAttributes(
FMOD_GEOMETRY*geometry,
intindex,
float*directocclusion,
float*reverbocclusion,
FMOD_BOOL*doublesided
);
Parameters
index
Polygonindexinsidetheobject.
directocclusion
Addressofavariabletoreceievetheocclusionvaluefrom0.0to1.0whichaffectsvolumeoraudiblefrequencies.0.0=Thepolygondoesnotoccludevolumeoraudiblefrequencies(soundwillbefullyaudible),1.0=Thepolygonfullyoccludes(soundwillbesilent).
reverbocclusion
Addressofavariabletoreceievetheocclusionvaluefrom0.0to1.0whichaffectsthereverbmix.0.0=Thepolygondoesnotoccludereverb(reverb
reflectionsstilltravelthroughthispolygon),1.0=Thepolyfullyfullyoccludesreverb(reverbreflectionswillbesilentthroughthispolygon).
doublesided
Addressofavariabletoreceievethedescriptionofpolygonifitisdoublesidedorsinglesided.true=polygonisdoublesided,false=polygonissinglesided,andthewindingofthepolygon(whichdeterminesthepolygon'snormal)determineswhichsideofthepolygonwillcauseocclusion.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Geometry::getPolygonAttributesGeometry::getNumPolygons
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::getPolygonNumVerticesGetsthenumberofverticesinapolygonwhichispartofthegeometryobject.
C++Syntax
FMOD_RESULTGeometry::getPolygonNumVertices(
intindex,
int*numvertices
);
CSyntax
FMOD_RESULTFMOD_Geometry_GetPolygonNumVertices(
FMOD_GEOMETRY*geometry,
intindex,
int*numvertices
);
Parameters
index
Polygonindex.Thismustbeintherangeof0toGeometry::getNumPolygonsminus1.
numvertices
Addressofavariabletoreceivethenumberofverticesfortheselectedpolygon.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Geometry::getNumPolygons
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::getPolygonVertexRetrievesthepositionofthevertexinsideageometryobject.
C++Syntax
FMOD_RESULTGeometry::getPolygonVertex(
intindex,
intvertexindex,
FMOD_VECTOR*vertex
);
CSyntax
FMOD_RESULTFMOD_Geometry_GetPolygonVertex(
FMOD_GEOMETRY*geometry,
intindex,
intvertexindex,
FMOD_VECTOR*vertex
);
Parameters
index
Polygonindex.Thismustbeintherangeof0toGeometry::getNumPolygonsminus1.
vertexindex
Vertexindexinsidethepolygon.Thismustbeintherangeof0toGeometry::getPolygonNumVerticesminus1.
vertex
AddressofanFMOD_VECTORstructurewhichwillreceivethenewvertexlocationinobjectspace.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Verticesarerelativetothepositionoftheobject.SeeGeometry::setPosition.
SeeAlso
Geometry::getPolygonNumVerticesGeometry::setPositionGeometry::getNumPolygonsFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::getPositionRetrievesthepositionoftheobjectin3Dworldspace.
C++Syntax
FMOD_RESULTGeometry::getPosition(
FMOD_VECTOR*position
);
CSyntax
FMOD_RESULTFMOD_Geometry_GetPosition(
FMOD_GEOMETRY*geometry,
FMOD_VECTOR*position
);
Parameters
position
Addressofavariabletoreceivethe3dpositionoftheobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Geometry::setPositionFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::getRotationRetrievestheorientationofthegeometryobject.
C++Syntax
FMOD_RESULTGeometry::getRotation(
FMOD_VECTOR*forward,
FMOD_VECTOR*up
);
CSyntax
FMOD_RESULTFMOD_Geometry_GetRotation(
FMOD_GEOMETRY*geometry,
FMOD_VECTOR*forward,
FMOD_VECTOR*up
);
Parameters
forward
Addressofavariablethatreceivestheforwardsorientationofthegeometryobject.Specify0orNULLtoignore.
up
Addressofavariablethatreceivestheupwardsorientationofthegeometryobject.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeremarksinSystem::set3DListenerAttributesformoredescriptiononforwardandupvectors.
SeeAlso
Geometry::setRotationSystem::set3DListenerAttributesFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::getScaleRetrievestherelativescalevectorofthegeometryobject.Anobjectcanbescaled/warpedinall3dimensionsseparatelyusingthevector.
C++Syntax
FMOD_RESULTGeometry::getScale(
FMOD_VECTOR*scale
);
CSyntax
FMOD_RESULTFMOD_Geometry_GetScale(
FMOD_GEOMETRY*geometry,
FMOD_VECTOR*scale
);
Parameters
scale
Addressofavariabletoreceievethescalevectoroftheobject.Default=1.0,1.0,1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Geometry::setScaleFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::getUserDataRetrievestheuservaluethatthatwassetbycallingtheGeometry::setUserDatafunction.
C++Syntax
FMOD_RESULTGeometry::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_Geometry_GetUserData(
FMOD_GEOMETRY*geometry,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeGeometry::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Geometry::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::releaseFreesageometryobjectandreleasesitsmemory.
C++Syntax
FMOD_RESULTGeometry::release();
CSyntax
FMOD_RESULTFMOD_Geometry_Release(FMOD_GEOMETRY*geometry);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::saveSavesthegeometryobjectasaserializedbinaryblock,toausermemorybuffer.ThiscanthenbesavedtoafileifrequiredandloadedlaterwithSystem::loadGeometry.
C++Syntax
FMOD_RESULTGeometry::save(
void*data,
int*datasize
);
CSyntax
FMOD_RESULTFMOD_Geometry_Save(
FMOD_GEOMETRY*geometry,
void*data,
int*datasize
);
Parameters
data
Addressofavariabletoreceivetheserializedgeometryobject.Specify0orNULLtohavethedatasizeparameterreturnthesizeofthememoryrequiredforthissavedobject.
datasize
Addressofavariabletoreceivethesizeinbytesrequiredtosavethisobjectwhen'data'parameteris0orNULL.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.Ifthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedinthe
FMOD_RESULTenumeration.
Remarks
Tousethisfunctionyouwillnormallyneedtocallittwice.Oncetogetthesizeofthedata,thenagaintowritethedatatoyourpointer.
SeeAlso
System::loadGeometrySystem::createGeometry
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::setActiveEnablesordisablesanobjectfrombeingprocessedinthegeometryengine.
C++Syntax
FMOD_RESULTGeometry::setActive(
boolactive
);
CSyntax
FMOD_RESULTFMOD_Geometry_SetActive(
FMOD_GEOMETRY*geometry,
FMOD_BOOLactive
);
Parameters
active
true=active,false=notactive.Default=true.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Geometry::getActive
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::setPolygonAttributesSetsindividualattributesforeachpolygoninsideageometryobject.
C++Syntax
FMOD_RESULTGeometry::setPolygonAttributes(
intindex,
floatdirectocclusion,
floatreverbocclusion,
booldoublesided
);
CSyntax
FMOD_RESULTFMOD_Geometry_SetPolygonAttributes(
FMOD_GEOMETRY*geometry,
intindex,
floatdirectocclusion,
floatreverbocclusion,
FMOD_BOOLdoublesided
);
Parameters
index
Polygonindexinsidetheobject.
directocclusion
Occlusionvaluefrom0.0to1.0whichaffectsvolumeoraudiblefrequencies.0.0=Thepolygondoesnotoccludevolumeoraudiblefrequencies(soundwillbefullyaudible),1.0=Thepolygonfullyoccludes(soundwillbesilent).
reverbocclusion
Occlusionvaluefrom0.0to1.0whichaffectsthereverbmix.0.0=Thepolygondoesnotoccludereverb(reverbreflectionsstilltravelthroughthispolygon),1.0=Thepolyfullyfullyoccludesreverb(reverbreflectionswillbesilentthrough
thispolygon).
doublesided
Descriptionofpolygonifitisdoublesidedorsinglesided.true=polygonisdoublesided,false=polygonissinglesided,andthewindingofthepolygon(whichdeterminesthepolygon'snormal)determineswhichsideofthepolygonwillcauseocclusion.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Geometry::getPolygonAttributesGeometry::getNumPolygons
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::setPolygonVertexAltersthepositionofapolygon'svertexinsideageometryobject.
C++Syntax
FMOD_RESULTGeometry::setPolygonVertex(
intindex,
intvertexindex,
constFMOD_VECTOR*vertex
);
CSyntax
FMOD_RESULTFMOD_Geometry_SetPolygonVertex(
FMOD_GEOMETRY*geometry,
intindex,
intvertexindex,
constFMOD_VECTOR*vertex
);
Parameters
index
Polygonindex.Thismustbeintherangeof0toGeometry::getNumPolygonsminus1.
vertexindex
Vertexindexinsidethepolygon.Thismustbeintherangeof0toGeometry::getPolygonNumVerticesminus1.
vertex
AddressofanFMOD_VECTORwhichholdsthenewvertexlocation.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!Theremaybesomesignificantoverheadwiththisfunctionasitmaycausesomereconfigurationofinternaldatastructuresusedtospeedupsound-raytesting.YoumaygetbetterresultsifyouwanttomodifyyourobjectbyusingGeometry::setPosition,Geometry::setScaleandGeometry::setRotation.
SeeAlso
Geometry::getPolygonNumVerticesGeometry::getPolygonNumVerticesGeometry::setPositionGeometry::setScaleGeometry::setRotationGeometry::getNumPolygonsFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::setPositionSetsthepositionoftheobjectinworldspace,whichisthesamespaceFMODsoundsandlistenersresidein.
C++Syntax
FMOD_RESULTGeometry::setPosition(
constFMOD_VECTOR*position
);
CSyntax
FMOD_RESULTFMOD_Geometry_SetPosition(
FMOD_GEOMETRY*geometry,
constFMOD_VECTOR*position
);
Parameters
position
Pointertoavectorcontainingthe3dpositionoftheobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Geometry::getPositionGeometry::setRotationGeometry::setScale
FMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::setRotationSetstheorientationofthegeometryobject.
C++Syntax
FMOD_RESULTGeometry::setRotation(
constFMOD_VECTOR*forward,
constFMOD_VECTOR*up
);
CSyntax
FMOD_RESULTFMOD_Geometry_SetRotation(
FMOD_GEOMETRY*geometry,
constFMOD_VECTOR*forward,
constFMOD_VECTOR*up
);
Parameters
forward
Theforwardsorientationofthegeometryobject.Thisvectormustbeofunitlengthandperpendiculartotheupvector.Youcanspecify0orNULLtonotupdatetheforwardsorientationofthegeometryobject.
up
Theupwardsorientationofthegeometryobject.Thisvectormustbeofunitlengthandperpendiculartotheforwardsvector.Youcanspecify0orNULLtonotupdatetheupwardsorientationofthegeometryobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeremarksinSystem::set3DListenerAttributesformoredescriptiononforwardandupvectors.
SeeAlso
Geometry::getRotationSystem::set3DListenerAttributesFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::setScaleSetstherelativescalevectorofthegeometryobject.Anobjectcanbescaled/warpedinall3dimensionsseparatelyusingthevectorwithouthavingtomodifypolygondata.
C++Syntax
FMOD_RESULTGeometry::setScale(
constFMOD_VECTOR*scale
);
CSyntax
FMOD_RESULTFMOD_Geometry_SetScale(
FMOD_GEOMETRY*geometry,
constFMOD_VECTOR*scale
);
Parameters
scale
Thescalevectoroftheobject.Default=1.0,1.0,1.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Geometry::getScaleGeometry::setRotation
Geometry::setPositionFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Geometry::setUserDataSetsauservaluethattheGeometryobjectwillstoreinternally.CanberetrievedwithGeometry::getUserData.
C++Syntax
FMOD_RESULTGeometry::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_Geometry_SetUserData(
FMOD_GEOMETRY*geometry,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheGeometryobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingGeometry::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
Geometry::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
ReverbInterfaceReverb::get3DAttributesReverb::getActiveReverb::getMemoryInfoReverb::getPropertiesReverb::getUserDataReverb::releaseReverb::set3DAttributesReverb::setActiveReverb::setPropertiesReverb::setUserData
FirelightTechnologiesFMODEx
Reverb::get3DAttributesRetrievesthe3dattributesofaReverbobject.
C++Syntax
FMOD_RESULTReverb::get3DAttributes(
FMOD_VECTOR*position,
float*mindistance,
float*maxdistance
);
CSyntax
FMOD_RESULTFMOD_Reverb_Get3DAttributes(
FMOD_REVERB*reverb,
FMOD_VECTOR*position,
float*mindistance,
float*maxdistance
);
Parameters
position
Addressofavariablethatwillreceivethe3dpositionofthecenterofthereverbin3dspace.Default={0,0,0}.
mindistance
Addressofavariablethatwillreceivethedistancefromthecenterpointthatthereverbwillhavefulleffectat.Default=0.0.
maxdistance
Addressofavariablethatwillreceivethedistancefromthecenterpointthatthereverbwillnothaveanyeffect.Default=0.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
The3Dreverbobjectisaspherehaving3Dattributes(position,minimumdistance,maximumdistance)andreverbproperties.Thepropertiesand3Dattributesofallreverbobjectscollectivelydetermine,alongwiththelistener'sposition,thesettingsofandinputgainsintoasingle3DreverbDSP.Pleasenotethatthisonlyappliestosoftwarechannels.Whenthelisteneriswithinthesphereofeffectofoneormore3dreverbs,thelistener's3Dreverbpropertiesareaweightedcombinationofsuch3dreverbs.Whenthelistenerisoutsideallofthereverbs,the3Dreverbsettingissettothedefaultambientreverbsetting.
SeeAlso
Reverb::set3DAttributesSystem::createReverb
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Reverb::getActiveRetrievestheactivestateofthereverbobject.
C++Syntax
FMOD_RESULTReverb::getActive(
bool*active
);
CSyntax
FMOD_RESULTFMOD_Reverb_GetActive(
FMOD_REVERB*reverb,
FMOD_BOOL*active
);
Parameters
active
Addressofavariabletoreceivethecurrentactivestateofthereverbobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Reverb::setActiveSystem::createReverb
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Reverb::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTReverb::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_Reverb_GetMemoryInfo(
FMOD_REVERB*reverb,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Reverb::getPropertiesRetrievesthecurrentreverbenvironment.
C++Syntax
FMOD_RESULTReverb::getProperties(
FMOD_REVERB_PROPERTIES*properties
);
CSyntax
FMOD_RESULTFMOD_Reverb_GetProperties(
FMOD_REVERB*reverb,
FMOD_REVERB_PROPERTIES*properties
);
Parameters
properties
Addressofavariablethatreceivesthecurrentreverbenvironmentdescription.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Reverb::setPropertiesSystem::createReverb
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Reverb::getUserDataRetrievestheuservaluethatthatwassetbycallingtheReverb::setUserDatafunction.
C++Syntax
FMOD_RESULTReverb::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_Reverb_GetUserData(
FMOD_REVERB*reverb,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeReverb::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Reverb::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Reverb::releaseReleasesthememoryforareverbobjectandmakesitinactive.
C++Syntax
FMOD_RESULTReverb::release();
CSyntax
FMOD_RESULTFMOD_Reverb_Release(FMOD_REVERB*reverb);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifnoreverbobjectsarecreated,theambientreverbwillbetheonlyaudiblereverb.BydefaultthisambientreverbsettingissettoOFF.
SeeAlso
System::createReverbSystem::setReverbAmbientProperties
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Reverb::set3DAttributesSetsthe3dpropertiesofa'virtual'reverbobject.
C++Syntax
FMOD_RESULTReverb::set3DAttributes(
constFMOD_VECTOR*position,
floatmindistance,
floatmaxdistance
);
CSyntax
FMOD_RESULTFMOD_Reverb_Set3DAttributes(
FMOD_REVERB*reverb,
constFMOD_VECTOR*position,
floatmindistance,
floatmaxdistance
);
Parameters
position
Pointertoavectorcontainingthe3dpositionofthecenterofthereverbin3dspace.Default={0,0,0}.
mindistance
Thedistancefromthecenterpointthatthereverbwillhavefulleffectat.Default=0.0.
maxdistance
Thedistancefromthecenterpointthatthereverbwillnothaveanyeffect.Default=0.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
The3Dreverbobjectisaspherehaving3Dattributes(position,minimumdistance,maximumdistance)andreverbproperties.Thepropertiesand3Dattributesofallreverbobjectscollectivelydetermine,alongwiththelistener'sposition,thesettingsofandinputgainsintoasingle3DreverbDSP.Pleasenotethatthisonlyappliestosoftwarechannels.Whenthelisteneriswithinthesphereofeffectofoneormore3dreverbs,thelistener's3Dreverbpropertiesareaweightedcombinationofsuch3dreverbs.Whenthelistenerisoutsideallofthereverbs,the3Dreverbsettingissettothedefaultambientreverbsetting.
SeeAlso
Reverb::get3DAttributesSystem::createReverb
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Reverb::setActiveDisablesorenablesareverbobjectsothatitdoesordoesnotcontributetothe3dscene.
C++Syntax
FMOD_RESULTReverb::setActive(
boolactive
);
CSyntax
FMOD_RESULTFMOD_Reverb_SetActive(
FMOD_REVERB*reverb,
FMOD_BOOLactive
);
Parameters
active
true=active,false=notactive.Default=true.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Reverb::setActiveSystem::createReverb
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Reverb::setPropertiesSetsreverbparametersforthecurrentreverbobject.Reverbparameterscanbesetmanually,orautomaticallyusingthepre-definedpresetsgiveninthefmod.hheader.
C++Syntax
FMOD_RESULTReverb::setProperties(
constFMOD_REVERB_PROPERTIES*properties
);
CSyntax
FMOD_RESULTFMOD_Reverb_SetProperties(
FMOD_REVERB*reverb,
constFMOD_REVERB_PROPERTIES*properties
);
Parameters
properties
AddressofanFMOD_REVERB_PROPERTIESstructurewhichdefinestheattributesforthereverb.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_REVERB_PROPERTIES
Reverb::getPropertiesSystem::createReverb
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Reverb::setUserDataSetsauservaluethattheReverbobjectwillstoreinternally.CanberetrievedwithReverb::getUserData.
C++Syntax
FMOD_RESULTReverb::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_Reverb_SetUserData(
FMOD_REVERB*reverb,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheReverbobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingReverb::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
Reverb::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FunctionsDebug_GetLevelDebug_SetLevelFile_GetDiskBusyFile_SetDiskBusyMemory_GetStatsMemory_InitializeSystem_Create
FirelightTechnologiesFMODEx
Debug_GetLevelRetrievesthecurrentdebuglogginglevel.
C++Syntax
FMOD_RESULTDebug_GetLevel(
FMOD_DEBUGLEVEL*level
);
CSyntax
FMOD_RESULTFMOD_Debug_GetLevel(
FMOD_DEBUGLEVEL*level
);
Parameters
level
Addressofavariabletoreceievecurrentdebuglevel.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisonlyhasaneffectwith'logging'versionsofFMODEx.ForexampleonwindowsitmustbeviafmodexL.dll,notfmodex.dll.OnXboxitwouldbefmodxboxL.libnotfmodxbox.lib.FMOD_ERR_UNSUPPORTEDwillbereturnedonnonloggingversionsofFMODEx(iefullrelease).
SeeAlso
Debug_SetLevelFMOD_DEBUGLEVEL
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Debug_SetLevelSetsthelevelofdebugloggingtothetty/outputforloggingversionsofFMODEx.
C++Syntax
FMOD_RESULTDebug_SetLevel(
FMOD_DEBUGLEVELlevel
);
CSyntax
FMOD_RESULTFMOD_Debug_SetLevel(
FMOD_DEBUGLEVELlevel
);
Parameters
level
Loggingleveltoset.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisonlyhasaneffectwith'logging'versionsofFMODEx.ForexampleonwindowsitmustbeviafmodexL.dll,notfmodex.dll.OnXboxitwouldbefmodxboxL.libnotfmodxbox.lib.FMOD_ERR_UNSUPPORTEDwillbereturnedonnonloggingversionsof
FMODEx(iefullrelease).
SeeAlso
Debug_GetLevelFMOD_DEBUGLEVEL
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
File_GetDiskBusyInformationfunctiontoretreivethestateoffmod'sdiskaccess.
C++Syntax
FMOD_RESULTFile_GetDiskBusy(
int*busy
);
CSyntax
FMOD_RESULTFMOD_File_GetDiskBusy(
int*busy
);
Parameters
busy
Addressofanintegertoreceivethebusystateofthediskatthecurrenttime.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Donotusethisfunctiontosyncrhonizeyourownreadswith,asduetotiming,youmightcallthisfunctionanditsaysfalse=itisnotbusy,butthesplitsecondaftercallthisfunction,internallyFMODmightsetittobusy.UseFile_SetDiskBusyforpropermutualexclusionasitusessemaphores.
SeeAlso
File_SetDiskBusy
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
File_SetDiskBusyMutexfunctiontosynchronizeuserfilereadswithFMOD'sfilereads.Thisfunctiontellsfmodthatyouareusingthedisksothatitwillblockuntilyouarefinishedwithit.ThisfunctionalsoblocksifFMODisalreadyusingthedisk,sothatyoucannotdoareadatthesametimeFMODisreading.
C++Syntax
FMOD_RESULTFile_SetDiskBusy(
intbusy
);
CSyntax
FMOD_RESULTFMOD_File_SetDiskBusy(
intbusy
);
Parameters
busy
1=youareabouttoperformadiskaccess.0=youarefinishedwiththedisk.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Usethisfunctionasawrapperaroundyourownfilereadingfunctionsifyou
wanttodosimulatenousfilereadingwhileFMODisalsoreading.ie
FMOD_File_SetDiskBusy(1);
myfread(...);
FMOD_File_SetDiskBusy(0);
Warning!Thisisacriticalsectioninternally.Ifyoudonotmatchyourbusy=truewithabusy=falseyourprogrammayhang!IfyouforgettosetdiskbusytofalseitwillstopFMODfromreadingfromthedisk.
SeeAlso
File_GetDiskBusy
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Memory_GetStatsReturnsinformationonthememoryusageofFMOD.ThisisusefulfordeterminingafixedmemorysizetomakeFMODworkwithinforfixedmemorymachinessuchasconsoles.
C++Syntax
FMOD_RESULTMemory_GetStats(
int*currentalloced,
int*maxalloced,
boolblocking
);
CSyntax
FMOD_RESULTFMOD_Memory_GetStats(
int*currentalloced,
int*maxalloced,
FMOD_BOOLblocking
);
Parameters
currentalloced
Addressofavariablethatreceivesthecurrentlyallocatedmemoryattimeofcall.Optional.Specify0orNULLtoignore.
maxalloced
AddressofavariablethatreceivesthemaximumallocatedmemorysinceSystem::initorMemory_Initialize.Optional.Specify0orNULLtoignore.
blocking
Booleanindicatingwhethertofavourspeedoraccuracy.SpecifyingtrueforthisparameterwillflushtheDSPnetworktomakesureallqueuedallocationshappenimmediately,whichcanbecostly.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
NotethatifusingFMOD::Memory_Initialize,thememoryusagewillbeslightlyhigherthanwithoutit,asFMODhastohaveasmallamountofmemoryoverheadtomanagetheavailablememory.
SeeAlso
System::initMemory_Initialize
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Memory_InitializeSpecifiesamethodforFMODtoallocatememory,eitherthroughcallbacksoritsowninternalmemorymanagement.YoucanalsosupplyapoolofmemoryforFMODtoworkwithanditwilldosowithnoextracallstomallocorfree.
C++Syntax
FMOD_RESULTMemory_Initialize(
void*poolmem,
intpoollen,
FMOD_MEMORY_ALLOCCALLBACKuseralloc,
FMOD_MEMORY_REALLOCCALLBACKuserrealloc,
FMOD_MEMORY_FREECALLBACKuserfree,
FMOD_MEMORY_TYPEmemtypeflags
);
CSyntax
FMOD_RESULTFMOD_Memory_Initialize(
void*poolmem,
intpoollen,
FMOD_MEMORY_ALLOCCALLBACKuseralloc,
FMOD_MEMORY_REALLOCCALLBACKuserrealloc,
FMOD_MEMORY_FREECALLBACKuserfree,
FMOD_MEMORY_TYPEmemtypeflags
);
Parameters
poolmem
IfyouwantafixedblockofmemoryforFMODtouse,passitinhere.Specifythelengthinpoollen.SpecifyingNULLdoesn'tuseinternalmanagementanditreliesoncallbacks.
poollen
LengthinbytesofthepoolofmemoryforFMODtousespecifiedin.Specifying0turnsoffinternalmemorymanagementandreliespurelyoncallbacks.Lengthmustbeamultipleof512.
useralloc
OnlysupportedifpoolisNULL.OtherwiseitoverridestheFMODinternalcallstoalloc.Compatiblewithansimalloc().
userrealloc
OnlysupportedifpoolisNULL.OtherwiseitoverridestheFMODinternalcallstorealloc.Compatiblewithansirealloc().
userfree
OnlysupportedifpoolisNULL.OtherwiseitoverridestheFMODinternalcallstofree.Compatiblewithansifree().
memtypeflags
FMOD_MEMORY_TYPEflagsyouwishtoreceivethroughyourmemorycallbacks.SeeFMOD_MEMORY_TYPE.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctionisusefulforsystemsthatwantFMODtousetheirownmemorymanagementorforfixedmemorydevicessuchasXbox360thatdon'twantanyallocationsoccurringoutoftheircontrolcausingfragmentationorunpredictableoverflowsinatightmemoryspace.
FMODonlydoesallocationwhencreatingstreams,musicorsamplesandtheSystem::initstage.Itneverallocatesordeallocatesmemoryduringthecourseofruntimeprocessing.Tofindouttherequiredfixedsizetheusercancall
Memory_Initializewithanoverlylargepoolsize(ornopool)andfindoutthemaximumRAMusageatanyonetimewithMemory_GetStats.
FMODbehavesdifferentlybasedonwhatyoupassintothisfunctionin3differentcombinations.Forexample:
FMOD::Memory_Initialize(NULL,0,NULL,NULL,NULL);//FallsbackpurelytoansiCmalloc,reallocandfree.
FMOD::Memory_Initialize(NULL,0,myalloc,myrealloc,myfree);//CallsusersuppliedcallbackseverytimeFMODdoesamemoryallocationordeallocation.
FMOD::Memory_Initialize(ptr,len,NULL,NULL,NULL);//Uses"ptr"andmanagesmemoryinternally.NOextramallocsorfreesareperformedfromthispoint.
Callbacksandmemorypoolscannotbecombined.Ifamemorypoolisprovidedbytheuser,FMODaccessesthatpoolusingitsownmemorymanagementscheme.FMOD'sinternalmemorymanagementschemeisextremelyefficientandalsofasterthanthestandardCmallocandfree.
NOTE!Yourmemorycallbacksmustbethreadsafeotherwiseunexpectedbehaviourmayoccur.FMODcallsmemoryallocationfunctionsfromotherthreads(suchastheasynchronousloadingthreadusedwhenyouspecifyFMOD_NONBLOCKING)andsometimesfromthemixerthread.
NOTE!Ifyouspecifyafixedsizepoolthatistoosmall,FMODwillreturnFMOD_ERR_MEMORYwhenthelimitofthefixedsizepoolisexceeded.Atthispoint,it'spossiblethatFMODmaybecomeunstable.Tomaintainstability,donotallowFMODtorunoutofmemory.
SeeAlso
FMOD_MEMORY_ALLOCCALLBACKFMOD_MEMORY_REALLOCCALLBACKFMOD_MEMORY_FREECALLBACKMemory_GetStatsSystem::close
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
System_CreateFMODSystemcreationfunction.ThismustbecalledtocreateanFMODSystemobjectbeforeyoucandoanythingelse.Usethisfunctiontocreate1,ormultipleinstancesofFMODSystemobjects.
C++Syntax
FMOD_RESULTSystem_Create(
FMOD::System**system
);
CSyntax
FMOD_RESULTFMOD_System_Create(
FMOD_SYSTEM**system
);
Parameters
system
AddressofapointerthatreceivesthenewFMODSystemobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UseSystem::releasetofreeasystemobject.
SeeAlso
System::initSystem::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
CallbacksFMOD_3D_ROLLOFFCALLBACKFMOD_CHANNEL_CALLBACKFMOD_CODEC_CLOSECALLBACKFMOD_CODEC_GETLENGTHCALLBACKFMOD_CODEC_GETPOSITIONCALLBACKFMOD_CODEC_METADATACALLBACKFMOD_CODEC_OPENCALLBACKFMOD_CODEC_READCALLBACKFMOD_CODEC_SETPOSITIONCALLBACKFMOD_CODEC_SOUNDCREATECALLBACKFMOD_DSP_CREATECALLBACKFMOD_DSP_DIALOGCALLBACKFMOD_DSP_GETPARAMCALLBACKFMOD_DSP_READCALLBACKFMOD_DSP_RELEASECALLBACKFMOD_DSP_RESETCALLBACKFMOD_DSP_SETPARAMCALLBACKFMOD_DSP_SETPOSITIONCALLBACKFMOD_FILE_ASYNCCANCELCALLBACKFMOD_FILE_ASYNCREADCALLBACKFMOD_FILE_CLOSECALLBACKFMOD_FILE_OPENCALLBACKFMOD_FILE_READCALLBACKFMOD_FILE_SEEKCALLBACKFMOD_MEMORY_ALLOCCALLBACKFMOD_MEMORY_FREECALLBACKFMOD_MEMORY_REALLOCCALLBACKFMOD_OUTPUT_CLOSECALLBACKFMOD_OUTPUT_GETDRIVERCAPSCALLBACKFMOD_OUTPUT_GETDRIVERNAMECALLBACKFMOD_OUTPUT_GETHANDLECALLBACKFMOD_OUTPUT_GETNUMDRIVERSCALLBACKFMOD_OUTPUT_GETPOSITIONCALLBACKFMOD_OUTPUT_INITCALLBACKFMOD_OUTPUT_LOCKCALLBACK
FMOD_OUTPUT_READFROMMIXERFMOD_OUTPUT_UNLOCKCALLBACKFMOD_OUTPUT_UPDATECALLBACKFMOD_SOUND_NONBLOCKCALLBACKFMOD_SOUND_PCMREADCALLBACKFMOD_SOUND_PCMSETPOSCALLBACKFMOD_SYSTEM_CALLBACK
FirelightTechnologiesFMODEx
FMOD_3D_ROLLOFFCALLBACKCallbackforsystemwide3dchannelvolumecalculationwhichoverridesfmod'sinternalcalculationcode.
C/C++Syntax
floatF_CALLBACKFMOD_3D_ROLLOFFCALLBACK(
FMOD_CHANNEL*channel,
floatdistance
);
Parameters
channel
Pointertoachannelhandle.
distance
Distanceinunits(metersbydefault).
ReturnValues
Remarks
C++Users.CastFMOD_CHANNEL*toFMOD::Channel*insidethecallbackanduseasnormal.
NOTE:Whenusingtheeventsystem,callChannel::getUserDatatogettheeventinstancehandleoftheeventthatspawnedthechannelinquestion.
SeeAlso
System::set3DRolloffCallbackSystem::set3DListenerAttributesSystem::get3DListenerAttributesChannel::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CHANNEL_CALLBACKCallbackforchannelevents.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_CHANNEL_CALLBACK(
FMOD_CHANNEL*channel,
FMOD_CHANNEL_CALLBACKTYPEtype,
void*commanddata1,
void*commanddata2
);
Parameters
channel
Pointertoachannelhandle.
type
Thetypeofcallback.RefertoFMOD_CHANNEL_CALLBACKTYPE.
commanddata1
Thefirstcallbacktypespecificdatageneratedbythecallback.Seeremarksformeaning.
commanddata2
Thesecondcallbacktypespecificdatageneratedbythecallback.Seeremarksformeaning.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.Ifthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedinthe
FMOD_RESULTenumeration.
Remarks
C++Users.CastFMOD_CHANNEL*toFMOD::Channel*insidethecallbackanduseasnormal.
'commanddata1'and'commanddata2'meanings.These2valuesaresetbythecallbackdependingonwhatishappeninginthecallbackandthetypeofcallback.
FMOD_CHANNEL_CALLBACKTYPE_ENDcommanddata1:Always0.commanddata2:Always0.FMOD_CHANNEL_CALLBACKTYPE_VIRTUALVOICE
commanddata1:(casttoint)0whenvoiceisswappedfromemulatedtoreal.1whenvoiceisswappedfromrealtoemulated.commanddata2:Always0.FMOD_CHANNEL_CALLBACKTYPE_SYNCPOINT
commanddata1:(casttoint)Theindexofthesyncpoint.UseSound::getSyncPointInfotoretrievethesyncpoint'sattributes.commanddata2:Always0.FMOD_CHANNEL_CALLBACKTYPE_OCCLUSION
commanddata1:(casttofloat*)pointertoafloatingpointdirectvaluethatcanberead(dereferenced)andmodifiedafterthegeometryenginehascalculateditforthischannel.commanddata2:(casttofloat*)pointertoafloatingpointreverbvaluethatcanberead(dereferenced)andmodifiedafterthegeometryenginehascalculateditforthischannel.
Note!CurrentlytheusermustcallSystem::updateforthesecallbackstotrigger!
SeeAlso
Channel::setCallbackFMOD_CHANNEL_CALLBACKTYPE
System::update
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CODEC_CLOSECALLBACKClosecallbackforthecodecforwhenFMODtriestocloseasoundusingthiscodec.Thisisthecallbackanycodecrelatedmemoryisfreed,andthingsaregenerallyde-initialized/shutdownforthecodec.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_CODEC_CLOSECALLBACK(
FMOD_CODEC_STATE*codec_state
);
Parameters
codec_state
Pointertothecodecstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_CODEC_STATEFMOD_CODEC_DESCRIPTIONFMOD_CODEC_OPENCALLBACKFMOD_CODEC_READCALLBACKFMOD_CODEC_GETLENGTHCALLBACKFMOD_CODEC_SETPOSITIONCALLBACKFMOD_CODEC_GETPOSITIONCALLBACKFMOD_CODEC_SOUNDCREATECALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CODEC_GETLENGTHCALLBACKCallbacktoreturnthelengthofthesonginwhateverformatrequiredwhenSound::getLengthiscalled.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_CODEC_GETLENGTHCALLBACK(
FMOD_CODEC_STATE*codec_state,
unsignedint*length,
FMOD_TIMEUNITlengthtype
);
Parameters
codec_state
Pointertothecodecstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
length
Addressofavariablethatistoreceivethelengthofthesounddeterminedbytheformatspecifiedinthelengttypeparameter.
lengthtype
Timeunittypeoflengthtoreturn.ThiswillbeoneofthetimeunitssuppliedbythecodecauthorintheFMOD_CODEC_DESCRIPTIONstructure.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_TIMEUNITFMOD_CODEC_STATEFMOD_CODEC_DESCRIPTIONFMOD_CODEC_OPENCALLBACKFMOD_CODEC_CLOSECALLBACKFMOD_CODEC_READCALLBACKFMOD_CODEC_SETPOSITIONCALLBACKFMOD_CODEC_GETPOSITIONCALLBACKFMOD_CODEC_SOUNDCREATECALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CODEC_GETPOSITIONCALLBACKTellcallbackforthecodecforwhenFMODtriestogetthecurrentpositionwithinthewithChannel::getPosition.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_CODEC_GETPOSITIONCALLBACK(
FMOD_CODEC_STATE*codec_state,
unsignedint*position,
FMOD_TIMEUNITpostype
);
Parameters
codec_state
Pointertothecodecstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
position
Addressofavariabletoreceivethecurrentpositioninthecodecbasedonthetimeunitspecifiedinthepostypeparameter.
postype
Timeunittypeofthepositionparameterthatisrequested.ThiswillbeoneofthetimeunitssuppliedbythecodecauthorintheFMOD_CODEC_DESCRIPTIONstructure.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
Channel::getPositionFMOD_CODEC_STATEFMOD_CODEC_DESCRIPTIONFMOD_CODEC_OPENCALLBACKFMOD_CODEC_CLOSECALLBACKFMOD_CODEC_READCALLBACKFMOD_CODEC_GETLENGTHCALLBACKFMOD_CODEC_SETPOSITIONCALLBACKFMOD_CODEC_SOUNDCREATECALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CODEC_METADATACALLBACKCallbackforsoundsthathavetheir
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_CODEC_METADATACALLBACK(
FMOD_CODEC_STATE*codec_state,
FMOD_TAGTYPEtype,
char*name,
void*data,
unsignedintdatalen,
FMOD_TAGDATATYPEdatatype,
intunique
);
Parameters
codec_state
Pointertothecodecstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
type
Sourceoftagbeingupdated,ieid3v2oroggvorbistagforexample.SeeFMOD_TAGDATATYPE.
name
Nameofthetagbeingupdated.
data
Contentsoftag.
datalen
Lengthofthetagdatainbytes.
datatype
Datatypeoftag.Binary/string/unicodeetc.SeeFMOD_TAGDATATYPE.
unique
Ifthisistrue,thenthetag(determinedbythename)beingupdatedistheonlyoneofitstype.Ifitisfalsethentherearemultipleversionsofthistagwiththesamename.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thiscallbackisusuallycalledfromsoundsthatcanudatetheirmetadata/taginfoatruntime.SuchasoundcouldbeaninternetSHOUTcast/Icecaststreamforexample.
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_CODEC_STATEFMOD_CODEC_DESCRIPTIONFMOD_CODEC_OPENCALLBACKFMOD_CODEC_CLOSECALLBACKFMOD_CODEC_READCALLBACKFMOD_CODEC_GETLENGTHCALLBACKFMOD_CODEC_SETPOSITIONCALLBACK
FMOD_CODEC_GETPOSITIONCALLBACKFMOD_CODEC_SOUNDCREATECALLBACKFMOD_TAGDATATYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CODEC_OPENCALLBACKOpencallbackforthecodecforwhenFMODtriestoopenasoundusingthiscodec.Thisisthecallbackthefileformatcheckisdonein,codecrelatedmemoryisallocated,andthingsaregenerallyinitialized/setupforthecodec.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_CODEC_OPENCALLBACK(
FMOD_CODEC_STATE*codec_state,
FMOD_MODEusermode,
FMOD_CREATESOUNDEXINFO*userexinfo
);
Parameters
codec_state
Pointertothecodecstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
usermode
ModethattheusersuppliedviaSystem::createSound.Thisisinformationalandcanbeignored,orusedifithasrelevancetoyourcodec.
userexinfo
ExtrainfostructurethattheusersuppliedviaSystem::createSound.Thisisinformationalandcanbeignored,orusedifithasrelevancetoyourcodec.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Theusermodeanduserexinfoparameterstellthecodecwhatwaspassedinbytheuser.Generallythesecanbeignored,asthefileformatusuallydeterminestheformatandfrequencyofthesound.
Ifyouhaveaflexibleformatcodec(ieyoudon'tmindwhatoutputformatyourcodecwritesto),youmightwanttousetheparameterthatwaspassedinbytheusertospecifytheoutputsoundformat/frequency.Forexampleifyounormallycreateacodecthatisalways32bitfloatingpoint,theusermightsupply16bitintegertosavememory,soyoucouldusethisinformationtodecodeyourdatatothisformatinsteadoftheoriginaldefaultformat.Readandseekwithinthefileusingthe'fileread'and'fileseek'membersoftheFMOD_CODECcodecthatispassedin.Note:DONOTUSEYOUROWNFILESYSTEM.Thereasonsforthisare:
Theusermayhavesettheirownfilesystemviauserfilesystemcallbacks.FMODallowsfilereadingviadisk,memoryandTCP/IP.Ifyouuseyourown
fileroutinesyouwilllosethisability.
Important!FMODwillpingallcodecstryingtofindtherightoneforthefiletheuserhaspassedin.MakesurethefirstlineofyourcodecopenisaFASTformatcheck.Ieitreadsanidentifyingstring,checksitandreturnsanerrorFMOD_ERR_FORMATifitisnotfound.TheremaybealotofcodecsloadedintoFMOD,soyoudon'twantyoursslowingdowntheSystem::createSoundcallbecauseitisinneficientindeterminingifitistherightformatornot.
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
System::createSoundFMOD_CREATESOUNDEXINFOFMOD_CODEC_STATEFMOD_CODEC_DESCRIPTIONFMOD_CODEC_CLOSECALLBACKFMOD_CODEC_READCALLBACKFMOD_CODEC_GETLENGTHCALLBACKFMOD_CODEC_SETPOSITIONCALLBACKFMOD_CODEC_GETPOSITIONCALLBACKFMOD_CODEC_SOUNDCREATECALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CODEC_READCALLBACKReadcallbackforthecodecforwhenFMODtriestoreadsomedatafromthefiletothedestinationformat(formatspecifiedintheopencallback).
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_CODEC_READCALLBACK(
FMOD_CODEC_STATE*codec_state,
void*buffer,
unsignedintsizebytes,
unsignedint*bytesread
);
Parameters
codec_state
Pointertothecodecstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
buffer
BuffertoreadPCMdatato.NotethattheformatofthisdataistheformatdescribedinFMOD_CODEC_WAVEFORMAT.
sizebytes
Numberofbytestoread
bytesread
Numberofbytesactuallyread
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.
IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifyoucannotreadnumberofbytesrequested,simplyreturnFMOD_OKandgivebytesreadthenumberofbytesyouread.Readandseekwithinthefileusingthe'fileread'and'fileseek'membersoftheFMOD_CODECcodecthatispassedin.Note:DONOTUSEYOUROWNFILESYSTEM.Thereasonsforthisare:
Theusermayhavesettheirownfilesystemviauserfilesystemcallbacks.FMODallowsfilereadingviadisk,memoryandTCP/IP.Ifyouuseyourown
fileroutinesyouwilllosethisability.
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_CODEC_STATEFMOD_CODEC_DESCRIPTIONFMOD_CODEC_OPENCALLBACKFMOD_CODEC_CLOSECALLBACKFMOD_CODEC_GETLENGTHCALLBACKFMOD_CODEC_SETPOSITIONCALLBACKFMOD_CODEC_GETPOSITIONCALLBACKFMOD_CODEC_SOUNDCREATECALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CODEC_SETPOSITIONCALLBACKSeekcallbackforthecodecforwhenFMODtriestoseekwithinthefilewithChannel::setPosition.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_CODEC_SETPOSITIONCALLBACK(
FMOD_CODEC_STATE*codec_state,
intsubsound,
unsignedintposition,
FMOD_TIMEUNITpostype
);
Parameters
codec_state
Pointertothecodecstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
subsound
Subsoundwithinwhichtoseek.
position
Positiontoseektointhesoundbasedonthetimeunitspecifiedinthepostypeparameter.
postype
Timeunittypeofthepositionparameter.ThiswillbeoneofthetimeunitssuppliedbythecodecauthorintheFMOD_CODEC_DESCRIPTIONstructure.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Readandseekwithinthefileusingthe'fileread'and'fileseek'membersoftheFMOD_CODECcodecthatispassedin.Note:DONOTUSEYOUROWNFILESYSTEM.Thereasonsforthisare:
Theusermayhavesettheirownfilesystemviauserfilesystemcallbacks.FMODallowsfilereadingviadisk,memoryandTCP/IP.Ifyouuseyourown
fileroutinesyouwilllosethisability.
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
Channel::setPositionFMOD_CODEC_STATEFMOD_CODEC_DESCRIPTIONFMOD_CODEC_OPENCALLBACKFMOD_CODEC_CLOSECALLBACKFMOD_CODEC_READCALLBACKFMOD_CODEC_GETLENGTHCALLBACKFMOD_CODEC_GETPOSITIONCALLBACKFMOD_CODEC_SOUNDCREATECALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CODEC_SOUNDCREATECALLBACKSoundcreationcallbackforthecodecwhenFMODfinishescreatingthesound.Iesothecodeccansetmoreparametersfortherelatedcreatedsound,ielooppoints/modeor3Dattributesetc.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_CODEC_SOUNDCREATECALLBACK(
FMOD_CODEC_STATE*codec_state,
intsubsound,
FMOD_SOUND*sound
);
Parameters
codec_state
Pointertothecodecstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
subsound
Subsoundindexbeingcreated.
sound
Pointertothesoundbeingcreated.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
System::createSoundSystem::createStreamFMOD_CODEC_STATEFMOD_CODEC_DESCRIPTIONFMOD_CODEC_OPENCALLBACKFMOD_CODEC_CLOSECALLBACKFMOD_CODEC_READCALLBACKFMOD_CODEC_GETLENGTHCALLBACKFMOD_CODEC_SETPOSITIONCALLBACKFMOD_CODEC_GETPOSITIONCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_CREATECALLBACKThiscallbackiscalledoncewhenausercreatesaDSPunitofthistype.Itisusedtoallocatememory,initializevariablesandthelike.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_DSP_CREATECALLBACK(
FMOD_DSP_STATE*dsp_state
);
Parameters
dsp_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.DonotcastthistoFMOD_DSP!ThehandletotheusercreatedDSPhandleisstoredwithintheFMOD_DSP_STATEstructure.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Functionsthattheuserwouldhavetocallforthiscallbacktobecalled.System::createDSPSystem::createDSPByTypeSystem::createDSPByPluginSometimesauserwillre-useaDSPunitinsteadofreleasingitandcreatinganewone,soitmaybeusefultoimplementFMOD_DSP_RESETCALLBACKto
resetanyvariablesorbufferswhentheusercallsit.
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_DSP_STATESystem::createDSPSystem::createDSPByTypeSystem::createDSPByPluginFMOD_DSP_RESETCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_DIALOGCALLBACKThiscallbackiscalledwhentheuserwantstheplugintodisplayaconfigurationdialogbox.Thisisnotalwaysnescessary,sothiscanbeleftblankifwanted.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_DSP_DIALOGCALLBACK(
FMOD_DSP_STATE*dsp_state,
void*hwnd,
intshow
);
Parameters
dsp_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.DonotcastthistoFMOD_DSP!ThehandletotheusercreatedDSPhandleisstoredwithintheFMOD_DSP_STATEstructure.
hwnd
Thisisthetargethwndtodisplaythedialogin.Itmustnotpopuponthishwnd,itmustactuallybedrawnwithinit.
show
1=showthedialog,0=hide/removethedialog.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Functionsthattheuserwouldhavetocallforthiscallbacktobecalled.DSP::showConfigDialog.
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_DSP_STATEDSP::showConfigDialog
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_GETPARAMCALLBACKThiscallbackiscalledwhentheuserwantstogetanindexedparameterfromaDSPunit.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_DSP_GETPARAMCALLBACK(
FMOD_DSP_STATE*dsp_state,
intindex,
float*value,
char*valuestr
);
Parameters
dsp_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.DonotcastthistoFMOD_DSP!ThehandletotheusercreatedDSPhandleisstoredwithintheFMOD_DSP_STATEstructure.
index
Theindexintotheparameterlistfortheparametertheuserwantstoget.
value
Pointertoafloatingpointvariabletoreceivetheselectedparametervalue.
valuestr
Apointertoastringtoreceivethevalueoftheselectedparameter,butintextform.Thismightbeusefultodisplaywordsinsteadofnumbers.Forexample"ON"or"OFF"insteadof1.0and0.0.Thelengthofthebufferbeingpassedinisalways16bytes,sodonotexceedthis.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Functionsthattheuserwouldhavetocallforthiscallbacktobecalled.DSP::getParameter.FMOD_DSP_GETPARAMCALLBACK.
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_DSP_STATEDSP::getParameterFMOD_DSP_SETPARAMCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_READCALLBACKThiscallbackiscalledbackregularlywhentheunithasbeencreated,insertedtotheDSPnetwork,andsettoactivebytheuser.Thiscallbackrequirestheusertofilltheoutputpointerwithdata.Incomingdataisprovidedandmaybefilteredonitswaytotheoutputpointer.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_DSP_READCALLBACK(
FMOD_DSP_STATE*dsp_state,
float*inbuffer,
float*outbuffer,
unsignedintlength,
intinchannels,
intoutchannels
);
Parameters
dsp_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.DonotcastthistoFMOD_DSP!ThehandletotheusercreatedDSPhandleisstoredwithintheFMOD_DSP_STATEstructure.
inbuffer
Pointertoincomingfloatingpoint-1.0to+1.0rangeddata.
outbuffer
Pointertooutgoingfloatingpoint-1.0to+1.0rangeddata.Thedspwritermustwritetothispointerelsetherewillbesilence.
length
Thelengthoftheincomingandoutgoingbufferinsamples.Togetthelengthofthebufferinbytes,theusermustmultiplythisnumberbythenumberofchannelscomingin(andout,theymaybedifferent)andthenmultiplyby4for1float=4bytes.
inchannels
ThenumberofchannelsofinterleavedPCMdataintheinbufferparameter.Amonosignalcominginwouldbe1.Astereosignalcominginwouldbe2.
outchannels
ThenumberofchannelsofinterleavedPCMdataintheoutbufferparameter.Amonosignalgoingoutwouldbe1.Astereosignalgoingoutwouldbe2.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Functionsthattheuserwouldhavetocallforthiscallbacktobecalled.None.ThiscallbackiscalledautomaticallyandperiodicallywhentheDSPengineupdates.Forareadupdatetobecalleditwouldhavetobeenabled,andthisisdonewithDSP::setActive.Therangeof-1to1isasoftlimit.Inthecaseoftheinbufferitisnotguaranteedtobeinthatrange,andinthecaseoftheoutbufferFMODwillacceptvaluesoutsidethatrange.Howeverallvalueswillbeclampedtotherangeof-1to1inthefinalmix.
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_DSP_STATEDSP::setActive
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_RELEASECALLBACKThiscallbackiscalledwhentheuserreleasestheDSPunit.ItisusedtofreeanyresourcesallocatedduringthecourseofthelifetimeoftheDSPorperformanyshutdowncodeneededtocleanuptheDSPunit.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_DSP_RELEASECALLBACK(
FMOD_DSP_STATE*dsp_state
);
Parameters
dsp_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.DonotcastthistoFMOD_DSP!ThehandletotheusercreatedDSPhandleisstoredwithintheFMOD_DSP_STATEstructure.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Functionsthattheuserwouldhavetocallforthiscallbacktobecalled.DSP::release
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_DSP_STATEDSP::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_RESETCALLBACKThiscallbackfunctioniscalledbyDSP::resettoallowtheeffecttoresetitselftoadefaultstate.Thisisusefulifaneffectisforexamplestillholdingaudiodataforasoundthathasstopped,andtheunitwantstoberelocatedtoanewsound.Resettingtheunitwouldclearanybuffers,puttheeffectbacktoitsinitialstate,andgetitreadyfornewsounddata.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_DSP_RESETCALLBACK(
FMOD_DSP_STATE*dsp_state
);
Parameters
dsp_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.DonotcastthistoFMOD_DSP!ThehandletotheusercreatedDSPhandleisstoredwithintheFMOD_DSP_STATEstructure.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Functionsthattheuserwouldhavetocallforthiscallbacktobecalled.DSP::reset
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_DSP_STATEDSP::reset
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_SETPARAMCALLBACKThiscallbackiscalledwhentheuserwantstosetaparameterforaDSPunit.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_DSP_SETPARAMCALLBACK(
FMOD_DSP_STATE*dsp_state,
intindex,
floatvalue
);
Parameters
dsp_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.DonotcastthistoFMOD_DSP!ThehandletotheusercreatedDSPhandleisstoredwithintheFMOD_DSP_STATEstructure.
index
Theindexintotheparameterlistfortheparametertheuserwantstoset.
value
Thevaluepassedinbytheusertosetfortheselectedparameter.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Functionsthattheuserwouldhavetocallforthiscallbacktobecalled.DSP::setParameter.
Rangecheckingisnotneeded.FMODwillclamptheincomingvaluetothespecifiedmin/max.RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_DSP_STATEDSP::setParameterFMOD_DSP_GETPARAMCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_SETPOSITIONCALLBACKCallbackthatiscalledwhentheusersetsthepositionofachannelwithChannel::setPosition.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_DSP_SETPOSITIONCALLBACK(
FMOD_DSP_STATE*dsp_state,
unsignedintposition
);
Parameters
dsp_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.DonotcastthistoFMOD_DSP!ThehandletotheusercreatedDSPhandleisstoredwithintheFMOD_DSP_STATEstructure.
position
Positioninchannelstreamtosetto.UnitsarePCMsamples(ieFMOD_TIMEUNIT_PCM).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Functionsthattheuserwouldhavetocallforthiscallbacktobecalled.
Channel::setPosition.IfaDSPunitisattachedtoachannelandtheusercallsChannel::setPositionthenthisfuncitonwillbecalled.RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_DSP_STATEChannel::setPosition
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_FILE_ASYNCCANCELCALLBACKCallbacktonotifyuserthattheresourcesassociatedwiththefileareabouttobefreed.Anyasynchronousoperationsmustbecancelledatthispointbeforereturningfromthecallback.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_FILE_ASYNCCANCELCALLBACK(
void*handle,
void*userdata
);
Parameters
handle
Thisisthehandlereturnedfromtheopencallbacktouseforyourownfileroutines.
userdata
DatainitializedintheFMOD_FILE_OPENCALLBACK.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifasynchronousoperationsonthisfilearenotcancelledbeforereturningfomthiscallback,thenFMODwillfreethememoryassociatedwiththefileandthe
userroutinemayreadtoaninvalid/freedpointer-causingacrash.
SeeAlso
System::setFileSystemFMOD_FILE_OPENCALLBACKFMOD_FILE_CLOSECALLBACKFMOD_FILE_READCALLBACKFMOD_FILE_SEEKCALLBACKFMOD_FILE_ASYNCREADCALLBACKFMOD_ASYNCREADINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_FILE_ASYNCREADCALLBACKCallbackforreadingfromafileasynchronously.DifferenttoFMOD_FILE_READCALLBACKinthatthisfunctioncanbereturnedfromimmediatelywithoutsupplyinganydata,whichwillsimplycauseFMODtowaitinternallyfordata.TheuserwillfilloutthewriteablevariablesintheFMOD_ASYNCREADINFOstructure(inanythread),andwhentheFMOD_ASYNCREADINFO::resultfieldissettosomethingotherthanFMOD_ERR_NOTREADYthenitwillcontinue.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_FILE_ASYNCREADCALLBACK(
FMOD_ASYNCREADINFO*info,
void*userdata
);
Parameters
info
PointertoFMOD_ASYNCREADINFOstructure.Usethisstructureforyourownsystem,toobtainthepointertowritetoandnumberofbytestoread,aswellasotherinformation.
userdata
UserdatainitializedintheFMOD_FILE_OPENCALLBACK.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Toreturnimmediately,returnFMOD_OK.
Ifduringyourcodepath,therewasafatalerror,forexampleifyouranoutofmemoryreturnFMOD_ERR_MEMORYandthiswillcauseFMODtostopwhatitwastryingtodoandreturntheerrorbacktothecaller.
Remarks
NOTE:Ifuserasyncreadisprocessedinthemainthread,thenitwillhangtheapplication,becauseFMODwillwaitinternallyuntildataisready,andthemainthreadprocesswillnotbeabletosupplythedata.Forthisreasontheuser'sfileaccessshouldnormallybefromaseparatethread.
SeeAlso
System::setFileSystemFMOD_FILE_OPENCALLBACKFMOD_FILE_CLOSECALLBACKFMOD_FILE_READCALLBACKFMOD_FILE_SEEKCALLBACKFMOD_FILE_ASYNCCANCELCALLBACKFMOD_ASYNCREADINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_FILE_CLOSECALLBACKCalbackforclosingafile.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_FILE_CLOSECALLBACK(
void*handle,
void*userdata
);
Parameters
handle
Thisisthehandlereturnedfromtheopencallbacktouseforyourownfileroutines.
userdata
UserdatainitializedintheFMOD_FILE_OPENCALLBACK.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Closeanyusercreatedfilehandleandperformanycleanupnescessaryforthefilehere.IfthecallbackisfromSystem::attachFileSystem,thenthereturnvalueisignored.
SeeAlso
System::setFileSystemSystem::attachFileSystemFMOD_FILE_OPENCALLBACKFMOD_FILE_READCALLBACKFMOD_FILE_SEEKCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_FILE_OPENCALLBACKCallbackforopeningafile.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_FILE_OPENCALLBACK(
constchar*name,
intunicode,
unsignedint*filesize,
void**handle,
void**userdata
);
Parameters
name
Thisisthefilenamepassedinbytheuser.Youmaytreatthisasyoulike.
unicode
Tellsthecallbackifthestringbeingpassedinisadoublebyteunicodestringornot.Youmayhavetosupportthisunlessyouknowthetargetapplicationwillnotsupportunicode.
filesize
Thesizeofthefiletobepassedbacktofmod,inbytes.
handle
Thisistostoreahandlegeneratedbytheuser.Thiswillbethehandlethatgetspassedintotheothercallbacks.Optionalbutmaybeneeded.
userdata
Thisistostoreuserdatatobepassedintotheothercallbacks.Optional.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ReturntheappropriateerrorcodesuchasFMOD_ERR_FILE_NOTFOUNDifthefilefailstoopen.IfthecallbackisfromSystem::attachFileSystem,thenthereturnvalueisignored.
SeeAlso
System::setFileSystemSystem::attachFileSystemFMOD_FILE_CLOSECALLBACKFMOD_FILE_READCALLBACKFMOD_FILE_SEEKCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_FILE_READCALLBACKCallbackforreadingfromafile.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_FILE_READCALLBACK(
void*handle,
void*buffer,
unsignedintsizebytes,
unsignedint*bytesread,
void*userdata
);
Parameters
handle
Thisisthehandleyoureturnedfromtheopencallbacktouseforyourownfileroutines.
buffer
Thebuffertoreadyourdatainto.
sizebytes
Thenumberofbytestoread.
bytesread
Thenumberofbytessuccessfullyread.
userdata
UserdatainitializedintheFMOD_FILE_OPENCALLBACK.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
IfthecallbackisfromSystem::attachFileSystem,thenthereturnvalueisignored.
SeeAlso
System::setFileSystemSystem::attachFileSystemFMOD_FILE_OPENCALLBACKFMOD_FILE_CLOSECALLBACKFMOD_FILE_SEEKCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_FILE_SEEKCALLBACKCallbackforseekingwithinafile.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_FILE_SEEKCALLBACK(
void*handle,
unsignedintpos,
void*userdata
);
Parameters
handle
Thisisthehandlereturnedfromtheopencallbacktouseforyourownfileroutines.
pos
Thisisthepositionoroffsettoseektointhefileinbytes.
userdata
DatainitializedintheFMOD_FILE_OPENCALLBACK.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
System::setFileSystemFMOD_FILE_OPENCALLBACKFMOD_FILE_CLOSECALLBACKFMOD_FILE_READCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MEMORY_ALLOCCALLBACKCallbacktoallocateablockofmemory.
C/C++Syntax
void*F_CALLBACKFMOD_MEMORY_ALLOCCALLBACK(
unsignedintsize,
FMOD_MEMORY_TYPEtype,
constchar*sourcestr
);
Parameters
size
Sizeinbytesofthememoryblocktobeallocatedandreturned.
type
Typeofmemoryallocation.
sourcestr
Onlyvalid(notnull)inloggingversionsofFMOD.Givesastringwiththefmodsourcecodefilenameandlinenumberinit,forbetterresourcetracking.
ReturnValues
Onsuccess,apointertothenewlyallocatedblockofmemoryisreturned.Onfailure,NULLisreturned.
Remarks
Returninganalignedpointer,of16bytealignmentisrecommendedforspeed
purposes.
SeeAlso
Memory_InitializeMemory_GetStatsFMOD_MEMORY_REALLOCCALLBACKFMOD_MEMORY_FREECALLBACKFMOD_MEMORY_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MEMORY_FREECALLBACKCallbacktofreeablockofmemory.
C/C++Syntax
voidF_CALLBACKFMOD_MEMORY_FREECALLBACK(
void*ptr,
FMOD_MEMORY_TYPEtype,
constchar*sourcestr
);
Parameters
ptr
Pointertoapre-existingblockofmemorytobefreed.
type
Typeofmemorytobefreed.
sourcestr
Onlyvalid(notnull)inloggingversionsofFMOD.Givesastringwiththefmodsourcecodefilenameandlinenumberinit,forbetterresourcetracking.
ReturnValues
void
SeeAlso
Memory_InitializeMemory_GetStats
FMOD_MEMORY_ALLOCCALLBACKFMOD_MEMORY_REALLOCCALLBACKFMOD_MEMORY_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MEMORY_REALLOCCALLBACKCallbacktore-allocateablockofmemorytoadifferentsize.
C/C++Syntax
void*F_CALLBACKFMOD_MEMORY_REALLOCCALLBACK(
void*ptr,
unsignedintsize,
FMOD_MEMORY_TYPEtype,
constchar*sourcestr
);
Parameters
ptr
Pointertoablockofmemorytoberesized.IfthisisNULLthenanewblockofmemoryissimplyallocated.
size
Sizeofthememorytobereallocated.Theoriginalmemorymustbepreserved.
type
Typeofmemoryallocation.
sourcestr
Onlyvalid(notnull)inloggingversionsofFMOD.Givesastringwiththefmodsourcecodefilenameandlinenumberinit,forbetterresourcetracking.
ReturnValues
Onsuccess,apointertothenewlyre-allocatedblockofmemoryisreturned.Onfailure,NULLisreturned.
Remarks
Returninganalignedpointer,of16bytealignmentisrecommendedforspeedpurposes.
SeeAlso
Memory_InitializeMemory_GetStatsFMOD_MEMORY_ALLOCCALLBACKFMOD_MEMORY_FREECALLBACKFMOD_MEMORY_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_CLOSECALLBACKShutdowncallbackwhichiscalledwhentheusercallsSystem::closeorSystem::release.(System::releasecallsSystem::closeinternally)
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_OUTPUT_CLOSECALLBACK(
FMOD_OUTPUT_STATE*output_state
);
Parameters
output_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
System::releaseSystem::close
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_GETDRIVERCAPSCALLBACKCalledwhentheusercallsSystem::getDriverCaps.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_OUTPUT_GETDRIVERCAPSCALLBACK(
FMOD_OUTPUT_STATE*output_state,
intid,
FMOD_CAPS*caps
);
Parameters
output_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
id
Indexintothetotalnumberofoutputspossible,providedbytheFMOD_OUTPUT_GETNUMDRIVERSCALLBACKcallback.
caps
Addressofavariabletoreceivethecapsavailablebythisoutputdevice.SeeFMOD_CAPS.Fillthisin.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
System::getDriverCapsSystem::getDriverInfoSystem::getNumDriversFMOD_OUTPUT_GETNUMDRIVERSCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_GETDRIVERNAMECALLBACKCalledwhentheusercallsSystem::getDriverInfo.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_OUTPUT_GETDRIVERNAMECALLBACK(
FMOD_OUTPUT_STATE*output_state,
intid,
char*name,
intnamelen
);
Parameters
output_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
id
Indexintothetotalnumberofoutputspossible,providedbytheFMOD_OUTPUT_GETNUMDRIVERSCALLBACKcallback.
name
Addressofavariabletoreceivethedrivernamerelevanttotheindexpassedin.Fillthisin.
namelen
Lengthofnamebufferbeingpassedinbytheuser.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.
IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
System::getDriverInfoSystem::getNumDriversFMOD_OUTPUT_GETNUMDRIVERSCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_GETHANDLECALLBACKCalledwhentheusercallsSystem::getOutputHandle.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_OUTPUT_GETHANDLECALLBACK(
FMOD_OUTPUT_STATE*output_state,
void**handle
);
Parameters
output_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
handle
Addressofavariabletoreceievethecurrentplugin'soutput'handle'.Thisisonlyifthepluginwriterwantstoallowtheuseraccesstothemainhandlebehindtheplugin(forexamplethefilehandleinafilewriterplugin).Thepointertypemustbepublishedtotheusersomehow,asisdoneinfmod.h.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_GETNUMDRIVERSCALLBACKCalledwhentheusercallsSystem::getNumDrivers.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_OUTPUT_GETNUMDRIVERSCALLBACK(
FMOD_OUTPUT_STATE*output_state,
int*numdrivers
);
Parameters
output_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
numdrivers
Addressofavariabletoreceivethenumberofoutputdriversinyourplugin.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.Optional.FMODwillassume0ifthisisnotspecified.
SeeAlso
System::getNumDriversSystem::getDriverInfoFMOD_OUTPUT_GETDRIVERNAMECALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_GETPOSITIONCALLBACKReturnsthecurrentPCMoffsetorplaybackpositionfortheoutputstream.Calledfromthemixerthread,onlywhenthe'polling'memberofFMOD_OUTPUT_DESCRIPTIONissettotrue.TheinternalFMODoutputthreadcallsthisfunctionperiodicallytodetermineifitshouldaskforablockofaudiodataornot.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_OUTPUT_GETPOSITIONCALLBACK(
FMOD_OUTPUT_STATE*output_state,
unsignedint*pcm
);
Parameters
output_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
pcm
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_OUTPUT_DESCRIPTIONFMOD_OUTPUT_LOCKCALLBACKFMOD_OUTPUT_UNLOCKCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_INITCALLBACKInitializationcallbackwhichiscalledwhentheusercallsSystem::init.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_OUTPUT_INITCALLBACK(
FMOD_OUTPUT_STATE*output_state,
intselecteddriver,
FMOD_INITFLAGSflags,
int*outputrate,
intoutputchannels,
FMOD_SOUND_FORMAT*outputformat,
intdspbufferlength,
intdspnumbuffers,
void*extradriverdata
);
Parameters
output_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
selecteddriver
ThisistheselecteddriveridthattheuserchosefromcallingSystem::setDriver.
flags
Initializationflagspassedinbytheuser.
outputrate
Outputrateselectedbytheuser.Ifnotpossible,changetheratetotheclosestmatch.
outputchannels
Outputchannelcountselectedbytheuser.Forexample1=monooutput.2=stereooutput.
outputformat
Outputformatspecifiedbytheuser.Ifnotpossibletosupport,returnFMOD_ERR_FORMAT.
dspbufferlength
Sizeofthebufferfmodwillmixtoinonemixupdate.ThisvalueisinPCMsamples.
dspnumbuffers
Numberofbuffersfmodwillmixtoinacircularfashion.Multiplythisbydspbufferlengthtogetthetotalsizeoftheoutputsoundbuffertoallocate.
extradriverdata
Datapassedinbytheuserspecifictothisdriver.Maybeusedforanypurpose.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
SeeAlso
FMOD_RESULTSystem::initSystem::setDriver
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_LOCKCALLBACKCalledfromthemixerthread,onlywhenthe'polling'memberofFMOD_OUTPUT_DESCRIPTIONissettotrue.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_OUTPUT_LOCKCALLBACK(
FMOD_OUTPUT_STATE*output_state,
unsignedintoffset,
unsignedintlength,
void**ptr1,
void**ptr2,
unsignedint*len1,
unsignedint*len2
);
Parameters
output_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
offset
Offsetinbytestothepositionthecallerwantstolockinthesamplebuffer.
length
Numberofbytesthecallerwanttolockinthesamplebuffer.
ptr1
Addressofapointerthatwillpointtothefirstpartofthelockeddata.
ptr2
Addressofapointerthatwillpointtothesecondpartofthelockeddata.Thiswillbenullifthedatalockedhasn'twrappedattheendofthebuffer.
len1
Lengthofdatainbytesthatwaslockedforptr1
len2
Lengthofdatainbytesthatwaslockedforptr2.Thiswillbe0ifthedatalockedhasn'twrappedattheendofthebuffer.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_OUTPUT_DESCRIPTIONFMOD_OUTPUT_UNLOCKCALLBACKFMOD_OUTPUT_GETPOSITIONCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_READFROMMIXERCalledbytheplugin,whenthe'polling'memberofFMOD_OUTPUT_DESCRIPTIONissettofalse.Usethisfunctionfromyourowndriverirq/timertoreadsomedatafromFMOD'sDSPengine.Alloftheresultingoutputcausedbyplayingsoundsandspecifyingeffectsbytheuserwillbemixedhereandwrittentothememoryprovidedbythepluginwriter.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_OUTPUT_READFROMMIXER(
FMOD_OUTPUT_STATE*output_state,
void*buffer,
unsignedintlength
);
Parameters
output_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
buffer
Plugin-writerprovidedmemoryfortheFMODExmixertowriteto.
length
Lengthofthebufferinsamples.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.Ifthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedinthe
FMOD_RESULTenumeration.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_UNLOCKCALLBACKCalledfromthemixerthread,onlywhenthe'polling'memberofFMOD_OUTPUT_DESCRIPTIONissettotrue.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_OUTPUT_UNLOCKCALLBACK(
FMOD_OUTPUT_STATE*output_state,
void*ptr1,
void*ptr2,
unsignedintlen1,
unsignedintlen2
);
Parameters
output_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
ptr1
Pointertothe1stlockedportionofsampledata,fromSound::lock.
ptr2
Pointertothe2ndlockedportionofsampledata,fromSound::lock.
len1
Lengthofdatainbytesthatwaslockedforptr1
len2
Lengthofdatainbytesthatwaslockedforptr2.Thiswillbe0ifthedatalockedhasn'twrappedattheendofthebuffer.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisnormallycalledafterdatahasbeenread/writtentofromSound::lock.Thisfunctionwilldoanypostprocessingnescessaryandifneeded,sendittosoundram.
SeeAlso
FMOD_OUTPUT_DESCRIPTIONFMOD_OUTPUT_LOCKCALLBACKFMOD_OUTPUT_GETPOSITIONCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_UPDATECALLBACKCalledwhentheusercallsSystem::update.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_OUTPUT_UPDATECALLBACK(
FMOD_OUTPUT_STATE*output_state
);
Parameters
output_state
Pointertothepluginstate.Theusercanusethisvariabletoaccessruntimepluginspecificvariablesandpluginwriteruserdata.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
RemembertoreturnFMOD_OKatthebottomofthefunction,oranappropriateerrorcodefromFMOD_RESULT.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_SOUND_NONBLOCKCALLBACKCallbacktobecalledwhenasoundhasfinishedloading.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_SOUND_NONBLOCKCALLBACK(
FMOD_SOUND*sound,
FMOD_RESULTresult
);
Parameters
sound
Pointertothesound.C++usersseeremarks.
result
Errorcode.FMOD_OKifsoundwascreatedsuccessfully,oranerrorcodeotherwise.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
C++Users.CastFMOD_SOUND*toFMOD::Sound*insidethecallbackanduseasnormal.
Returncodecurrentlyignored.
SeeAlso
System::createSoundFMOD_CREATESOUNDEXINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_SOUND_PCMREADCALLBACKUsedfor2purposes.OneuseisforusercreatedsoundswhenFMOD_OPENUSERisspecifiedwhencreatingthesound.Theotheruseisto'piggyback'onFMOD'sreadfunctionswhenopeninganormalsound,thereforethecalleecanread(rip)orevenwritebacknewPCMdatawhileFMODisopeningthesound.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_SOUND_PCMREADCALLBACK(
FMOD_SOUND*sound,
void*data,
unsignedintdatalen
);
Parameters
sound
Pointertothesound.C++usersseeremarks.
data
PointertorawPCMdatathattheusercaneitherreadorwriteto.
datalen
Lengthofthedatainbytes.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
C++Users.CastFMOD_SOUND*toFMOD::Sound*insidethecallbackanduseasnormal.
TheformatofthesoundcanberetrievedwithSound::getFormatfromthiscallback.Thiswillallowtheusertodeterminewhattypeofpointertouseiftheyarenotsurewhatformatthesoundis.Ifthecallbackisusedforthepurposeof'piggybacking'normalFMODsoundloads,thenyoudonothavetodoanythingatall,anditcanbetreatedaspurelyinformational.Thereturnvalueisalsoignored.
SeeAlso
Sound::getFormatFMOD_SOUND_PCMSETPOSCALLBACKSystem::createSoundSystem::createStreamFMOD_CREATESOUNDEXINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_SOUND_PCMSETPOSCALLBACKCallbackforwhenthecallercallsaseekingfunctionsuchasChannel::setTimeorChannel::setPosition.Ifthesoundisausercreatedsound,thiscanbeusedtoseekwithintheuser'sresource.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_SOUND_PCMSETPOSCALLBACK(
FMOD_SOUND*sound,
intsubsound,
unsignedintposition,
FMOD_TIMEUNITpostype
);
Parameters
sound
Pointertothesound.C++usersseeremarks.
subsound
Inamultisubsoundtypesound(iefsb/dls/cdda),thiswillcontaintheindexintothelistofsounds.
position
Positiontoseektothathasbeenrequested.ThisvaluewillbeofformatFMOD_TIMEUNITandmustbeparsedtodeterminewhatitis.GenerallyFMOD_TIMEUNIT_PCMwillbethemostcommonformat.
postype
Positiontypethattheuserwantedtoseekwith.IfthesoundisausercreatesoundandtheseektypeisunsupportedreturnFMOD_ERR_FORMAT.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
C++Users.CastFMOD_SOUND*toFMOD::Sound*insidethecallbackanduseasnormal.
Ifthecallbackisusedforthepurposeof'piggybacking'normalFMODsoundloads,thenyoudonothavetodoanythingatall,anditcanbetreatedaspurelyinformational.Thereturnvalueisalsoignored.
SeeAlso
FMOD_SOUND_PCMREADCALLBACKSystem::createSoundSystem::createStreamFMOD_CREATESOUNDEXINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_SYSTEM_CALLBACKCallbackforsystemevents.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_SYSTEM_CALLBACK(
FMOD_SYSTEM*system,
FMOD_SYSTEM_CALLBACKTYPEtype
);
Parameters
system
Pointertoasystemhandle.NotethiscouldbenullifFMOD_SYSTEM_CALLBACKTYPE_THREADCREATEDistriggeredfromtheEventSystem.
type
Thetypeofcallback.RefertoFMOD_SYSTEM_CALLBACKTYPE.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
C++Users.CastFMOD_SYSTEM*toFMOD::System*insidethecallbackanduseasnormal.
'commanddata1'and'commanddata2'meanings.
These2valuesaresetbythecallbackdependingonwhatishappeninginthecallbackandthetypeofcallback.
FMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGEDcommanddata1:Always0.commanddata2:Always0.
FMOD_SYSTEM_CALLBACKTYPE_MEMORYALLOCATIONFAILEDcommanddata1:Astring(char*)whichrepresentsthefileandlinenumberoftheallocationinsideFMOD.commanddata2:Thesize(int)oftherequestedallocation.
FMOD_SYSTEM_CALLBACKTYPE_THREADCREATEDcommanddata1:Thehandleofthecreatedthread.Seenotesbelowforthreadhandletypescommanddata2:Astring(char*)whichrepresentsthenameofthethread.
FMOD_SYSTEM_CALLBACKTYPE_BADDSPCONNECTIONcommanddata1:PointertoaFMOD::DSPobjectthatwasthetargetoftheDSPconnection.commanddata2:PointertoaFMOD::DSPobjectthatwasthesourceoftheDSPconnection.
FMOD_SYSTEM_CALLBACKTYPE_BADDSPLEVELcommanddata1:PointertoaFMOD::DSPobjectthatwastryingtoexceedtheDSPtreelevelmaximum.commanddata2:0.
Note!ForFMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGED,theusermustcallSystem::updateforthecallbacktotrigger!SeeFMOD_SYSTEM_CALLBACKTYPEfordetails.
Note!ForFMOD_SYSTEM_CALLBACKTYPE_THREADCREATED,thehandlethatisreturned(viacommanddata1)isdifferentoneachplatform.Thetypestocasttoareasfollows.iPhone,Linux,Mac:pthread_tPS3:sys_ppu_thread_tPSP:PSPThreadWrapper.Thisisacustomstructyoucandefineastypedef
structPSPThreadWrapper{SceUIDid;int(*func)(void*param);void*param;};Wii:OSThreadWin32,Win64,Xbox360:HANDLE
Hereisanexampleofasystemcallback.
FMOD_RESULTF_CALLBACKsystemcallback(FMOD_SYSTEM*system,FMOD_SYSTEM_CALLBACKTYPE
{
FMOD::System*sys=(FMOD::System*)system;
switch(type)
{
caseFMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGED:
{
intnumdrivers;
printf("NOTE:FMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGED
sys->getNumDrivers(&numdrivers;);
printf("Numdevices=%d\n",numdrivers);
break;
}
caseFMOD_SYSTEM_CALLBACKTYPE_MEMORYALLOCATIONFAILED:
{
printf("ERROR:FMOD_SYSTEM_CALLBACKTYPE_MEMORYALLOCATIONFAILED
printf("%s.\n",commanddata1);
printf("%dbytes.\n",commanddata2);
break;
}
caseFMOD_SYSTEM_CALLBACKTYPE_THREADCREATED:
{
printf("NOTE:FMOD_SYSTEM_CALLBACKTYPE_THREADCREATEDoccured.\n");
printf("ThreadID=%d\n",(int)commanddata1);
printf("ThreadName=%s\n",(char*)commanddata2);
break;
}
caseFMOD_SYSTEM_CALLBACKTYPE_BADDSPCONNECTION:
{
FMOD::DSP*source=(FMOD::DSP*)commanddata1;
FMOD::DSP*dest=(FMOD::DSP*)commanddata2;
printf("ERROR:FMOD_SYSTEM_CALLBACKTYPE_BADDSPCONNECTION
if(source)
{
charname[256];
source->getInfo(name,0,0,0,0);
printf("SOURCE=%s\n",name);
}
if(dest)
{
charname[256];
dest->getInfo(name,0,0,0,0);
printf("DEST=%s\n",name);
}
break;
}
caseFMOD_SYSTEM_CALLBACKTYPE_BADDSPLEVEL:
{
FMOD::DSP*source=(FMOD::DSP*)commanddata1;
printf("ERROR:FMOD_SYSTEM_CALLBACKTYPE_BADDSPLEVELoccured.\n");
if(source)
{
charname[256];
source->getInfo(name,0,0,0,0);
printf("SOURCE=%s\n",name);
}
break;
}
}
returnFMOD_OK;
}
SeeAlso
System::setCallbackFMOD_SYSTEM_CALLBACKTYPESystem::update
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
StructuresFMOD_360_EXTRADRIVERDATAFMOD_ADVANCEDSETTINGSFMOD_ASYNCREADINFOFMOD_CDTOCFMOD_CODEC_DESCRIPTIONFMOD_CODEC_STATEFMOD_CODEC_WAVEFORMATFMOD_CREATESOUNDEXINFOFMOD_DSP_DESCRIPTIONFMOD_DSP_PARAMETERDESCFMOD_DSP_STATEFMOD_GUIDFMOD_MEMORY_USAGE_DETAILSFMOD_OUTPUT_DESCRIPTIONFMOD_OUTPUT_STATEFMOD_REVERB_CHANNELPROPERTIESFMOD_REVERB_PROPERTIESFMOD_TAGFMOD_VECTOR
FirelightTechnologiesFMODEx
FMOD_360_EXTRADRIVERDATAUsethisstructurewithSystem::inittosetwhichprocessor(s)FMODwillcreateitsthreadson.Passthisstructureinasthe"extradriverdata"parameterinSystem::init.
Structure
typedefstruct{
FMOD_THREADthread_mixer;
FMOD_THREADthread_stream;
FMOD_THREADthread_nonblocking;
FMOD_THREADthread_file;
FMOD_THREADthread_xaudio;
FMOD_THREADthread_geometry;
FMOD_THREADthread_recording;
void*xaudio2instance;
}FMOD_360_EXTRADRIVERDATA;
Members
thread_mixer
[in]FMODsoftwaremixerthread.Optional,ie0orFMOD_THREAD_DEFAULT=defaultbehaviour
thread_stream
[in]FMODstreamthread.Optional,ie0orFMOD_THREAD_DEFAULT=defaultbehaviour
thread_nonblocking
[in]FMODthreadforFMOD_NONBLOCKING.Optional,ie0orFMOD_THREAD_DEFAULT=defaultbehaviour
thread_file
[in]FMODfilethread.Optional,ie0orFMOD_THREAD_DEFAULT=defaultbehaviour
thread_xaudio
[in]ThreadXAudiorunson.Optional,ie0orFMOD_THREAD_DEFAULT=defaultbehaviour
thread_geometry
[in]FMODgeometryprocessingthread.Optional,ie0orFMOD_THREAD_DEFAULT=defaultbehaviour
thread_recording
[in]FMODrecordingthread.Optional,ie0orFMOD_THREAD_DEFAULT=defaultbehaviour
xaudio2instance
[in]InstanceofalreadyinitializedXaudio2.Optional.0=letFMODinitializeXAudio2.
SeeAlso
FMOD_THREADSystem::init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_ADVANCEDSETTINGSSettingsforadvancedfeatureslikeconfiguringmemoryandcpuusagefortheFMOD_CREATECOMPRESSEDSAMPLEfeature.
Structure
typedefstruct{
intcbsize;
intmaxMPEGcodecs;
intmaxADPCMcodecs;
intmaxXMAcodecs;
intmaxCELTcodecs;
intmaxVORBIScodecs;
intmaxPCMcodecs;
intASIONumChannels;
char**ASIOChannelList;
FMOD_SPEAKER*ASIOSpeakerList;
intmax3DReverbDSPs;
floatHRTFMinAngle;
floatHRTFMaxAngle;
floatHRTFFreq;
floatvol0virtualvol;
inteventqueuesize;
unsignedintdefaultDecodeBufferSize;
char*debugLogFilename;
unsignedshortprofileport;
unsignedintgeometryMaxFadeTime;
unsignedintmaxSpectrumWaveDataBuffers;
unsignedintmusicSystemCacheDelay;
floatdistanceFilterCenterFreq;
unsignedintstackSizeStream;
unsignedintstackSizeNonBlocking;
unsignedintstackSizeMixer;
}FMOD_ADVANCEDSETTINGS;
Members
cbsize
[w]Sizeofthisstructure.Usesizeof(FMOD_ADVANCEDSETTINGS)NOTE:ThismustbesetbeforecallingSystem::getAdvancedSettings!
maxMPEGcodecs
[r/w]Optional.Specify0toignore.ForusewithFMOD_CREATECOMPRESSEDSAMPLEonly.Mpegcodecsconsume21,684bytesperinstanceandthisnumberwilldeterminehowmanympegchannelscanbeplayedsimultaneously.Default=32.
maxADPCMcodecs
[r/w]Optional.Specify0toignore.ForusewithFMOD_CREATECOMPRESSEDSAMPLEonly.ADPCMcodecsconsume2,136bytesperinstanceandthisnumberwilldeterminehowmanyADPCMchannelscanbeplayedsimultaneously.Default=32.
maxXMAcodecs
[r/w]Optional.Specify0toignore.ForusewithFMOD_CREATECOMPRESSEDSAMPLEonly.XMAcodecsconsume14,836bytesperinstanceandthisnumberwilldeterminehowmanyXMAchannelscanbeplayedsimultaneously.Default=32.
maxCELTcodecs
[r/w]Optional.Specify0toignore.ForusewithFMOD_CREATECOMPRESSEDSAMPLEonly.CELTcodecsconsume11,500bytesperinstanceandthisnumberwilldeterminehowmanyCELTchannelscanbeplayedsimultaneously.Default=32.
maxVORBIScodecs
[r/w]Optional.Specify0toignore.ForusewithFMOD_CREATECOMPRESSEDSAMPLEonly.Vorbiscodecsconsume12,000bytesperinstanceandthisnumberwilldeterminehowmanyVorbischannelscanbeplayedsimultaneously.Default=32.
maxPCMcodecs
[r/w]Optional.Specify0toignore.ForusewithPS3only.PCMcodecsconsume12,672bytesperinstanceandthisnumberwilldeterminehowmanystreamsandPCMvoicescanbeplayedsimultaneously.Default=16.
ASIONumChannels
[r/w]Optional.Specify0toignore.NumberofchannelsavailableontheASIOdevice.
ASIOChannelList
[r/w]Optional.Specify0toignore.Pointertoanarrayofstrings(numberofentriesdefinedbyASIONumChannels)withASIOchannelnames.
ASIOSpeakerList
[r/w]Optional.Specify0toignore.PointertoalistofspeakersthattheASIOchannelsmapto.ThiscanbecalledafterSystem::inittoremapASIOoutput.
max3DReverbDSPs
[r/w]Optional.Specify0toignore.Themaxnumberof3dreverbDSP'sinthesystem.(NOTE:CURRENTLYDISABLED/UNUSED)
HRTFMinAngle
[r/w]Optional.ForusewithFMOD_INIT_HRTF_LOWPASS.Theanglerange(0-360)ofa3Dsoundinrelationtothelistener,atwhichtheHRTFfunctionbeginstohaveaneffect.0=infrontofthelistener.180=from90degreestotheleftofthelistenerto90degreestotheright.360=behindthelistener.Default=180.0.
HRTFMaxAngle
[r/w]Optional.ForusewithFMOD_INIT_HRTF_LOWPASS.Theanglerange(0-360)ofa3Dsoundinrelationtothelistener,atwhichtheHRTFfunctionhasmaximumeffect.0=frontofthelistener.180=from90degreestotheleftofthelistenerto90degreestotheright.360=behindthelistener.Default=360.0.
HRTFFreq
[r/w]Optional.Specify0toignore.ForusewithFMOD_INIT_HRTF_LOWPASS.ThecutofffrequencyoftheHRTF'slowpassfilterfunctionwhenatmaximumeffect.(i.e.atHRTFMaxAngle).Default=
4000.0.
vol0virtualvol
[r/w]Optional.Specify0toignore.ForusewithFMOD_INIT_VOL0_BECOMES_VIRTUAL.Ifthisflagisused,andthevolumeis0.0,thenthesoundwillbecomevirtual.Usethisvaluetoraisethethresholdtoadifferentpointwhereasoundgoesvirtual.
eventqueuesize
[r/w]Optional.Specify0toignore.ForusewithFMODEventsystemonly.Specifiesthenumberofslotsavailableforsimultaneousnonblockingloads,acrossallthreads.Default=32.
defaultDecodeBufferSize
[r/w]Optional.Specify0toignore.Forstreams.Thisdeterminesthedefaultsizeofthedoublebuffer(inmilliseconds)thatastreamuses.Default=400ms
debugLogFilename
[r/w]Optional.Specify0toignore.Givesfmod'sloggingsystemapath/filename.Normallythelogisplacedinthesamedirectoryastheexecutableandcalledfmod.log.WhenusingSystem::getAdvancedSettings,provideatleast256bytesofmemorytocopyinto.
profileport
[r/w]Optional.Specify0toignore.ForusewithFMOD_INIT_ENABLE_PROFILE.Specifytheporttolistenonforconnectionsbytheprofilerapplication.
geometryMaxFadeTime
[r/w]Optional.Specify0toignore.Themaximumtimeinmilisecondsittakesforachanneltofadetothenewlevelwhenitsocclusionchanges.
maxSpectrumWaveDataBuffers
[r/w]Optional.Specify0toignore.TellsSystem::inittoallocateapoolofwavedata/spectrumbufferstopreventmemoryfragmentation,anyadditionalbufferswillbeallocatednormally.
musicSystemCacheDelay
[r/w]Optional.Specify0toignore.Thedelaythemusicsystemshouldallowforloadingasamplefromdisk(inmilliseconds).Default=400ms.
distanceFilterCenterFreq
[r/w]Optional.Specify0toignore.ForusewithFMOD_INIT_DISTANCE_FILTERING.ThedefaultcenterfrequencyinHzforthedistancefilteringeffect.Default=1500.0.
stackSizeStream
[r/w]Optional.Specify0toignore.SpecifythestacksizefortheFMODStreamthreadinbytes.Usefulforcustomcodecsthatuseexcessstack.Default49,152(48kb)
stackSizeNonBlocking
[r/w]Optional.Specify0toignore.SpecifythestacksizefortheFMOD_NONBLOCKINGloadingthread.Usefulforcustomcodecsthatuseexcessstack.Default65,536(64kb)
stackSizeMixer
[r/w]Optional.Specify0toignore.SpecifythestacksizefortheFMODmixerthread.Usefulforcustomdspsthatuseexcessstack.Default49,152(48kb)
Remarks
maxMPEGcodecs/maxADPCMcodecs/maxXMAcodecswilldeterminethemaximumcpuusageofplayingrealtimesamples.Usethistolowerpotentialexcesscpuusageandalsocontrolmemoryusage.
maxPCMcodecsisforusewithPS3only.ItwilldeterminethemaximumnumberofPCMvoicesthatcanbeplayedatonce.Thisincludesstreamsofanyformatandallsoundscreated*without*theFMOD_CREATECOMPRESSEDSAMPLEflag.Memorywillbeallocatedforcodecs'upfront'(duringSystem::init)ifthesevaluesarespecifiedasnonzero.Ifanyarezero,itallocatesmemoryforthecodecwheneverafileofthetypeinquestionisloaded.SoifmaxMPEGcodecsis0forexample,itwillallocatememoryforthempegcodecsthefirsttimeanmp3isloadedoranmp3based.FSBfileisloaded.
Duetoinefficientencodingtechniquesoncertain.wavbasedADPCMfiles,FMODcancanneedanextra29720bytespercodec.Thismeansforlowestmemoryconsumption.UseFSBasitusesanoptimal/smallADPCMblocksize.
Membersmarkedwith[r]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.Membersmarkedwith[w]meanthevariablecanbewrittento.Theusercansetthevalue.Membersmarkedwith[r/w]areeitherreadorwritedependingonifyouareusingSystem::setAdvancedSettings(w)orSystem::getAdvancedSettings(r).
SeeAlso
System::setAdvancedSettingsSystem::getAdvancedSettingsSystem::initFMOD_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_ASYNCREADINFOStructurethatispassedintoFMOD_FILE_ASYNCREADCALLBACK.Usetheinformationinthisstructuretoperform
Structure
typedefstruct{
void*handle;
unsignedintoffset;
unsignedintsizebytes;
intpriority;
void*buffer;
unsignedintbytesread;
FMOD_RESULTresult;
void*userdata;
}FMOD_ASYNCREADINFO;
Members
handle
[r]Thefilehandlethatwasfilledoutintheopencallback.
offset
[r]Seekposition,makesureyoureadfromthisfileoffset.
sizebytes
[r]howmanybytesrequestedforread.
priority
[r]0=lowimportance.100=extremelyimportant(ie'mustreadnoworstutteringmayoccur')
buffer
[w]Buffertoreadfiledatainto.
bytesread
[w]FillthisinbeforesettingresultcodetotellFMODhowmanybyteswereread.
result
[r/w]Resultcode,FMOD_OKtellsthesystemitisreadytoconsumethedata.Setthislast!Defaultvalue=FMOD_ERR_NOTREADY.
userdata
[r]Userdatapointer.
Remarks
Membersmarkedwith[r]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.Membersmarkedwith[w]meanthevariablecanbewrittento.Theusercansetthevalue.
Instructions:writeto'buffer',and'bytesread'BEFOREsetting'result'.Assoonasresultisset,FMODwillasynchronouslycontinueinternallyusingthedataprovidedinthisstructure.
Set'result'totheresultexpectedfromanormalfilereadcallback.Ifthereadwassuccessful,setittoFMOD_OK.Ifitreadsomedatabuthittheendofthefile,setittoFMOD_ERR_FILE_EOF.Ifabaderroroccurred,returnFMOD_ERR_FILE_BADIfadiskwasejected,returnFMOD_ERR_FILE_DISKEJECTED.
SeeAlso
FMOD_FILE_ASYNCREADCALLBACKFMOD_FILE_ASYNCCANCELCALLBACK
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CDTOCStructuredescribingaCD/DVDtableofcontents
Structure
typedefstruct{
intnumtracks;
intmin[100];
intsec[100];
intframe[100];
}FMOD_CDTOC;
Members
numtracks
[r]ThenumberoftracksontheCD
min
[r]Thestartoffsetofeachtrackinminutes
sec
[r]Thestartoffsetofeachtrackinseconds
frame
[r]Thestartoffsetofeachtrackinframes
Remarks
Membersmarkedwith[r]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.Membersmarkedwith[w]meanthevariablecanbewrittento.Theusercansetthevalue.
SeeAlso
Sound::getTag
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CODEC_DESCRIPTIONWhencreatingacodec,declareoneoftheseandprovidetherelevantcallbacksandnameforFMODtousewhenitopensandreadsafile.
Structure
typedefstruct{
constchar*name;
unsignedintversion;
intdefaultasstream;
FMOD_TIMEUNITtimeunits;
FMOD_CODEC_OPENCALLBACKopen;
FMOD_CODEC_CLOSECALLBACKclose;
FMOD_CODEC_READCALLBACKread;
FMOD_CODEC_GETLENGTHCALLBACKgetlength;
FMOD_CODEC_SETPOSITIONCALLBACKsetposition;
FMOD_CODEC_GETPOSITIONCALLBACKgetposition;
FMOD_CODEC_SOUNDCREATECALLBACKsoundcreate;
FMOD_CODEC_GETWAVEFORMATgetwaveformat;
}FMOD_CODEC_DESCRIPTION;
Members
name
[in]Nameofthecodec.
version
[in]Pluginwriter'sversionnumber.
defaultasstream
[in]TellsFMODtoopenthefileasastreamwhencallingSystem::createSound,andnotastaticsample.Shouldnormallybe0(FALSE),becausegenerallytheuserwantstodecodethefileintomemorywhenusingSystem::createSound.Mainlyusedforformatsthatdecodeforaverylongtime,orcoulduselargeamountsofmemorywhendecoded.Usuallysequencedformatssuchasmod/s3m/xm/it/midifallintothiscategory.Itismainlytostopusersthatdon't
knowwhatthey'redoingfromgettingFMOD_ERR_MEMORYreturnedfromcreateSoundwhentheyshouldhaveinfactcalledSystem::createStreamorusedFMOD_CREATESTREAMinSystem::createSound.
timeunits
[in]Whensetpositioncodeciscalled,onlythesetimeformatswillbepassedtothecodec.UsebitwiseORtoaccumulatedifferenttypes.
open
[in]OpencallbackforthecodecforwhenFMODtriestoopenasoundusingthiscodec.
close
[in]ClosecallbackforthecodecforwhenFMODtriestocloseasoundusingthiscodec.
read
[in]ReadcallbackforthecodecforwhenFMODtriestoreadsomedatafromthefiletothedestinationformat(specifiedintheopencallback).
getlength
[in]CallbacktoreturnthelengthofthesonginwhateverformatrequiredwhenSound::getLengthiscalled.
setposition
[in]SeekcallbackforthecodecforwhenFMODtriestoseekwithinthefilewithChannel::setPosition.
getposition
[in]TellcallbackforthecodecforwhenFMODtriestogetthecurrentpositionwithinthewithChannel::getPosition.
soundcreate
[in]SoundcreationcallbackforthecodecwhenFMODfinishescreatingthesound.(Sothecodeccansetmoreparametersfortherelatedcreatedsound,ielooppoints/modeor3Dattributesetc).
getwaveformat
[in]CallbacktotellFMODaboutthewaveformatofaparticularsubsound.Thisistosavememory,ratherthansaving1000FMOD_CODEC_WAVEFORMATstructuresinthecodec,thecodecmighthaveamoreoptimalwayofstoringthisinformation.
Remarks
Membersmarkedwith[in]meanthevariablecanbewrittento.Theusercansetthevalue.Membersmarkedwith[out]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.
SeeAlso
FMOD_CODEC_STATE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CODEC_STATECodecpluginstructurethatispassedintoeachcallback.SetthesenumsubsoundsandwaveformatmemberswhencalledinFMOD_CODEC_OPENCALLBACKtotellfmodwhatsortofsoundtocreate.Theformat,channelsandfrequencytellFMODwhatsortofhardwarebuffertocreatewhenyouinitializeyourcode.SoifyouwroteanMP3codecthatdecodedtostereo16bitintegerPCM,youwouldspecifyFMOD_SOUND_FORMAT_PCM16,andchannelswouldbeequalto2.
Structure
typedefstruct{
intnumsubsounds;
FMOD_CODEC_WAVEFORMAT*waveformat;
void*plugindata;
void*filehandle;
unsignedintfilesize;
FMOD_FILE_READCALLBACKfileread;
FMOD_FILE_SEEKCALLBACKfileseek;
FMOD_CODEC_METADATACALLBACKmetadata;
}FMOD_CODEC_STATE;
Members
numsubsounds
[in]Numberof'subsounds'inthissound.Anythingotherthan0makesita'container'format(ieCDDA/DLS/FSBetcwhichcontain1ormoresubsounds).Formostnormal,singlesoundcodecsuchasWAV/AIFF/MP3,thisshouldbe0astheyarenotacontainerforsubsounds,theyarethesoundbyitself.
waveformat
[in]Pointertoanarrayofformatstructurescontaininginformationabouteachsample.Canbe0orNULLifFMOD_CODEC_GETWAVEFORMATcallbackis
preferred.Thenumberofentriesheremustequalthenumberofsubsoundsdefinedinthesubsoundparameter.Ifnumsubsounds=0thenthereshouldbe1instanceofthisstructure.
plugindata
[in]Pluginwritercreateddatathecodecauthorwantstoattachtothisobject.
filehandle
[out]ThiswillreturnaninternalFMODfilehandletousewiththecallbacksprovided.
filesize
[out]Thiswillcontainthesizeofthefileinbytes.
fileread
[out]ThiswillreturnacallableFMODfilefunctiontousefromcodec.
fileseek
[out]ThiswillreturnacallableFMODfilefunctiontousefromcodec.
metadata
[out]ThiswillreturnacallableFMODmetadatafunctiontousefromcodec.
Remarks
Membersmarkedwith[in]meanthevariablecanbewrittento.Theusercansetthevalue.Membersmarkedwith[out]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.
AnFMODfilemightbefromdisk,memoryorinternet,howeverthefilemaybeopenedbytheuser.
'numsubsounds'shouldbe0ifthefileisanormalsinglesoundstreamorsound.Examplesofthiswouldbe.WAV,.WMA,.MP3,.AIFF.'numsubsounds'shouldbe1+ifthefileisacontainerformat,anddoesnotcontainwavdataitself.ExamplesofthesetypeswouldbeCDDA(multipleCDtracks),FSB(containsmultiplesounds),DLS(containinstruments).Thearraysofformat,channel,frequency,lengthandblockalignshouldpointtoarraysofinformationbasedonhowmanysubsoundsareintheformat.Ifthenumberofsubsoundsis0thenitshouldpointto1ofeachattribute,thesameasifthenumberofsubsoundswas1.Ifsubsoundswas100forexample,eachpointershouldpointtoanarrayof100ofeachattribute.Whenasoundhas1ormoresubsounds,youmustplaytheindividualsoundsspecifiedbyfirstobtainingthesubsoundwithSound::getSubSound.
SeeAlso
FMOD_SOUND_FORMATFMOD_FILE_READCALLBACKFMOD_FILE_SEEKCALLBACKFMOD_CODEC_METADATACALLBACKSound::getSubSoundSound::getNumSubSounds
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CODEC_WAVEFORMATSetthesevaluesmarked'in'totellfmodwhatsortofsoundtocreate.Theformat,channelsandfrequencytellFMODwhatsortofhardwarebuffertocreatewhenyouinitializeyourcode.SoifyouwroteanMP3codecthatdecodedtostereo16bitintegerPCM,youwouldspecifyFMOD_SOUND_FORMAT_PCM16,andchannelswouldbeequalto2.Membersmarkedas'out'aresetbyfmod.Donotmodifythese.Simplyspecify0forthesevalueswhendeclaringthestructure,FMODwillfillinthevaluesforyouaftercreationwiththecorrectfunctionpointers.
Structure
typedefstruct{
charname[256];
FMOD_SOUND_FORMATformat;
intchannels;
intfrequency;
unsignedintlengthbytes;
unsignedintlengthpcm;
intblockalign;
intloopstart;
intloopend;
FMOD_MODEmode;
unsignedintchannelmask;
}FMOD_CODEC_WAVEFORMAT;
Members
name
[in]Nameofsound.
format
[in]Formatfor(decompressed)codecoutput,ieFMOD_SOUND_FORMAT_PCM8,FMOD_SOUND_FORMAT_PCM16.
channels
[in]Numberofchannelsusedbycodec,iemono=1,stereo=2.
frequency
[in]Defaultfrequencyinhzofthecodec,ie44100.
lengthbytes
[in]Lengthinbytesofthesourcedata.
lengthpcm
[in]Lengthindecompressed,PCMsamplesofthefile,ielengthinseconds*frequency.UsedforSound::getLengthandformemoryallocationofstaticdecompressedsampledata.
blockalign
[in]Blockalignindecompressed,PCMsamplesoftheoptimaldecodechunksizeforthisformat.Thecodecreadcallbackwillbecalledinmultiplesofthisvalue.
loopstart
[in]Loopstartindecompressed,PCMsamplesoffile.
loopend
[in]Loopendindecompressed,PCMsamplesoffile.
mode
[in]Modetodeterminewhetherthesoundshouldbydefaultloadaslooping,nonlooping,2dor3d.
channelmask
[in]Microsoftspeakerchannelmask,asdefinedforWAVEFORMATEXTENSIBLEandisfoundinksmedia.h.Leaveat0toplayinnaturalspeakerorder.
Remarks
Membersmarkedwith[in]meanthevariablecanbewrittento.Theusercansetthevalue.Membersmarkedwith[out]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.
AnFMODfilemightbefromdisk,memoryornetwork,howeverthefilemaybeopenedbytheuser.
'numsubsounds'shouldbe0ifthefileisanormalsinglesoundstreamorsound.Examplesofthiswouldbe.WAV,.WMA,.MP3,.AIFF.'numsubsounds'shouldbe1+ifthefileisacontainerformat,anddoesnotcontainwavdataitself.ExamplesofthesetypeswouldbeCDDA(multipleCDtracks),FSB(containsmultiplesounds),MIDI/MOD/S3M/XM/IT(containinstruments).Thearraysofformat,channel,frequency,lengthandblockalignshouldpointtoarraysofinformationbasedonhowmanysubsoundsareintheformat.Ifthenumberofsubsoundsis0thenitshouldpointto1ofeachattribute,thesameasifthenumberofsubsoundswas1.Ifsubsoundswas100forexample,eachpointershouldpointtoanarrayof100ofeachattribute.Whenasoundhas1ormoresubsounds,youmustplaytheindividualsoundsspecifiedbyfirstobtainingthesubsoundwithSound::getSubSound.
SeeAlso
FMOD_SOUND_FORMATFMOD_FILE_READCALLBACKFMOD_FILE_SEEKCALLBACKFMOD_CODEC_METADATACALLBACKSound::getSubSoundSound::getNumSubSounds
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CREATESOUNDEXINFOUsethisstructurewithSystem::createSoundwhenmorecontrolisneededoverloading.ThepossiblereasonstousethiswithSystem::createSoundare:
Loadingafilefrommemory.Loadingafilefromwithinanotherlarger(possiblywad/pak)file,bygiving
theloaderanoffsetandlength.Tocreateausercreated/nonfilebasedsound.Tospecifyastartingsubsoundtoseektowithinamulti-samplesounds(ie
FSB/DLS/SF2)whencreatedasastream.Tospecifywhichsubsoundstoloadformulti-samplesounds(ie
FSB/DLS/SF2)sothatmemoryissavedandonlyasubsetisactuallyloaded/readfromdisk.Tospecify'piggyback'readandseekcallbacksforcaptureofsounddataas
fmodreadsanddecodesit.UsefulforrippingdecodedPCMdatafromsoundsastheyareloaded/played.TospecifyaMIDIDLS/SF2samplesetfiletoloadwhenopeningaMIDI
file.Seebelowonwhatmemberstofillforeachoftheabovetypesofsoundyouwanttocreate.
Structure
typedefstruct{
intcbsize;
unsignedintlength;
unsignedintfileoffset;
intnumchannels;
intdefaultfrequency;
FMOD_SOUND_FORMATformat;
unsignedintdecodebuffersize;
intinitialsubsound;
intnumsubsounds;
int*inclusionlist;
intinclusionlistnum;
FMOD_SOUND_PCMREADCALLBACKpcmreadcallback;
FMOD_SOUND_PCMSETPOSCALLBACKpcmsetposcallback;
FMOD_SOUND_NONBLOCKCALLBACKnonblockcallback;
constchar*dlsname;
constchar*encryptionkey;
intmaxpolyphony;
void*userdata;
FMOD_SOUND_TYPEsuggestedsoundtype;
FMOD_FILE_OPENCALLBACKuseropen;
FMOD_FILE_CLOSECALLBACKuserclose;
FMOD_FILE_READCALLBACKuserread;
FMOD_FILE_SEEKCALLBACKuserseek;
FMOD_FILE_ASYNCREADCALLBACKuserasyncread;
FMOD_FILE_ASYNCCANCELCALLBACKuserasynccancel;
FMOD_SPEAKERMAPTYPEspeakermap;
FMOD_SOUNDGROUP*initialsoundgroup;
unsignedintinitialseekposition;
FMOD_TIMEUNITinitialseekpostype;
intignoresetfilesystem;
intcddaforceaspi;
unsignedintaudioqueuepolicy;
unsignedintminmidigranularity;
intnonblockthreadid;
}FMOD_CREATESOUNDEXINFO;
Members
cbsize
[w]Sizeofthisstructure.ThisisusedsothestructurecanbeexpandedinthefutureandstillworkonolderversionsofFMODEx.
length
[w]Optional.Specify0toignore.Sizeinbytesoffiletoload,orsoundtocreate(inthiscaseonlyifFMOD_OPENUSERisused).Requiredifloadingfrommemory.If0isspecified,thenitwillusethesizeofthefile(unlessloadingfrommemorythenanerrorwillbereturned).
fileoffset
[w]Optional.Specify0toignore.Offsetfromstartofthefiletostartloadingfrom.Thisisusefulforloadingfilesfrominsidebigdatafiles.
numchannels
[w]Optional.Specify0toignore.Numberofchannelsinasoundmandatoryif
FMOD_OPENUSERorFMOD_OPENRAWisused.
defaultfrequency
[w]Optional.Specify0toignore.DefaultfrequencyofsoundinasoundmandatoryifFMOD_OPENUSERorFMOD_OPENRAWisused.Otherformatsusethefrequencydeterminedbythefileformat.
format
[w]Optional.Specify0orFMOD_SOUND_FORMAT_NONEtoignore.FormatofthesoundmandatoryifFMOD_OPENUSERorFMOD_OPENRAWisused.Otherformatsusetheformatdeterminedbythefileformat.
decodebuffersize
[w]Optional.Specify0toignore.Forstreams.Thisdeterminesthesizeofthedoublebuffer(inPCMsamples)thatastreamuses.Usethisforusercreatedstreamsifyouwanttodeterminethesizeofthecallbackbufferpassedtoyou.Specify0touseFMOD'sdefaultsizewhichiscurrentlyequivalentto400msofthesoundformatcreated/loaded.
initialsubsound
[w]Optional.Specify0toignore.Inamulti-samplefileformatsuchas.FSB/.DLS/.SF2,specifytheinitialsubsoundtoseekto,onlyifFMOD_CREATESTREAMisused.
numsubsounds
[w]Optional.Specify0toignoreorhavenosubsounds.InasoundcreatedwithFMOD_OPENUSER,specifythenumberofsubsoundsthatareaccessablewithSound::getSubSound.IfnotcreatedwithFMOD_OPENUSER,thiswilllimitthenumberofsubsoundsloadedwithinamulti-subsoundfile.IfusingFSB,thenifFMOD_CREATESOUNDEXINFO::inclusionlistisused,thiswillshufflesubsoundsdownsothattherearenotanygaps.Itwillmeanthattheindicesofthesoundswillbedifferent.
inclusionlist
[w]Optional.Specify0toignore.Inamulti-sampleformatsuchas.FSB/.DLS/.SF2itmaybedesirabletospecifyonlyasubsetofsoundstobeloadedoutofthewholefile.Thisisanarrayofsubsoundindicestoloadintomemorywhencreated.
inclusionlistnum
[w]Optional.Specify0toignore.Thisisthenumberofintegerscontainedwithintheinclusionlistarray.
pcmreadcallback
[w]Optional.Specify0toignore.Callbackto'piggyback'onFMOD'sreadfunctionsandacceptorevenwritePCMdatawhileFMODisopeningthesound.UsedforusersoundscreatedwithFMOD_OPENUSERorforcapturingdecodeddataasFMODreadsit.
pcmsetposcallback
[w]Optional.Specify0toignore.CallbackforwhentheusercallsaseekingfunctionsuchasChannel::setTimeorChannel::setPositionwithinamulti-samplesound,andforwhenitisopened.
nonblockcallback
[w]Optional.Specify0toignore.Callbackforsuccessfulcompletion,orerrorwhileloadingasoundthatusedtheFMOD_NONBLOCKINGflag.
dlsname
[w]Optional.Specify0toignore.FilenameforaDLSorSF2samplesetwhenloadingaMIDIfile.Ifnotspecified,onWindowsitwillattempttoopen/windows/system32/drivers/gm.dlsor/windows/system32/drivers/etc/gm.dls,onMacitwillattempttoload/System/Library/Components/CoreAudio.component/Contents/Resources/gs_instruments.dls,otherwisetheMIDIwillfailtoopen.CurrentDLSsupportisforlevel1ofthespecification.
encryptionkey
[w]Optional.Specify0toignore.KeyforencryptedFSBfile.WithoutthiskeyanencryptedFSBfilewillnotload.
maxpolyphony
[w]Optional.Specify0toignore.Forsequencedformatswithdynamicchannelallocationsuchas.MIDand.IT,thisspecifiesthemaximumvoicecountallowedwhileplaying..ITdefaultsto64..MIDdefaultsto32.
userdata
[w]Optional.Specify0toignore.Thisisuserdatatobeattachedtothesoundduringcreation.AccessviaSound::getUserData.Note:ThisisnotpassedtoFMOD_FILE_OPENCALLBACK,thatisadifferentuserdatathatisfilespecific.
suggestedsoundtype
[w]Optional.Specify0orFMOD_SOUND_TYPE_UNKNOWNtoignore.Insteadofscanningallcodectypes,usethistospeeduploadingbymakingitjumpstraighttothiscodec.
useropen
[w]Optional.Specify0toignore.Callbackforopeningthisfile.
userclose
[w]Optional.Specify0toignore.Callbackforclosingthisfile.
userread
[w]Optional.Specify0toignore.Callbackforreadingfromthisfile.
userseek
[w]Optional.Specify0toignore.Callbackforseekingwithinthisfile.
userasyncread
[w]Optional.Specify0toignore.Callbackforseekingwithinthisfile.
userasynccancel
[w]Optional.Specify0toignore.Callbackforseekingwithinthisfile.
speakermap
[w]Optional.Specify0toignore.Usethistodifferthewayfmodmapsmultichannelsoundstospeakers.SeeFMOD_SPEAKERMAPTYPEformore.
initialsoundgroup
[w]Optional.Specify0toignore.Specifyasoundgroupifrequired,toputsoundinasitiscreated.
initialseekposition
[w]Optional.Specify0toignore.Forstreams.Specifyaninitialpositiontoseekthestreamto.
initialseekpostype
[w]Optional.Specify0toignore.Forstreams.Specifythetimeunitforthepositionsetininitialseekposition.
ignoresetfilesystem
[w]Optional.Specify0toignore.Setto1tousefmod'sbuiltinfilesystem.IgnoressetFileSystemcallbacksandalsoFMOD_CREATESOUNEXINFOfilecallbacks.Usefulforspecificcaseswhereyoudon'twanttouseyourownfilesystembutwanttousefmod'sfilesystem(ienetstreaming).
cddaforceaspi
[w]Optional.Specify0toignore.ForCDDAsoundsonly-ifnon-zerouseASPIinsteadofNTSCSItoaccessthespecifiedCD/DVDdevice.
audioqueuepolicy
[w]Optional.Specify0orFMOD_AUDIOQUEUE_CODECPOLICY_DEFAULTtoignore.Policyusedtodeterminewhetherhardwareorsoftwareisusedfordecoding,see
FMOD_AUDIOQUEUE_CODECPOLICYforoptions(iOS>=3.0required,otherwiseonlyhardwareisavailable)
minmidigranularity
[w]Optional.Specify0toignore.AllowsyoutosetaminimumdesiredMIDImixergranularity.Valuessmallerthan512givegreaterthandefaultaccuracyatthecostofmoreCPUandviceversa.Specify0fordefault(512samples).
nonblockthreadid
[w]Optional.Specify0toignore.Specifiesathreadindextoexecutenonblockingloadon.Allowsforupto5threadstobeusedforloadingatonce.Thisistoavoidoneloadblockinganother.Maximumvalue=4.
Remarks
Thisstructureisoptional!Specify0orNULLinSystem::createSoundifyoudon'tneedit!
Loadingafilefrommemory.
CreatethesoundusingtheFMOD_OPENMEMORYflag.Mandatory.Specify'length'forthesizeofthememoryblockinbytes.Otherflagsareoptional.
Loadingafilefromwithinanotherlarger(possiblywad/pak)file,bygivingtheloaderanoffsetandlength.Mandatory.Specify'fileoffset'and'length'.Otherflagsareoptional.
Tocreateausercreated/nonfilebasedsound.CreatethesoundusingtheFMOD_OPENUSERflag.Mandatory.Specify'defaultfrequency,'numchannels'and'format'.Otherflagsareoptional.
Tospecifyastartingsubsoundtoseektoandflushwith,withinamulti-samplestream(ieFSB/DLS/SF2).
Mandatory.Specify'initialsubsound'.
Tospecifywhichsubsoundstoloadformulti-samplesounds(ieFSB/DLS/SF2)sothatmemoryissavedandonlyasubsetisactuallyloaded/readfromdisk.
Mandatory.Specify'inclusionlist'and'inclusionlistnum'.
Tospecify'piggyback'readandseekcallbacksforcaptureofsounddataasfmodreadsanddecodesit.UsefulforrippingdecodedPCMdatafromsoundsastheyareloaded/played.
Mandatory.Specify'pcmreadcallback'and'pcmseekcallback'.
TospecifyaMIDIDLS/SF2samplesetfiletoloadwhenopeningaMIDIfile.
Mandatory.Specify'dlsname'.
Settingthe'decodebuffersize'isforcpuintensivecodecsthatmaybecausingstuttering,notfileintensivecodecs(iethosefromCDornetstreams)whicharenormallyalteredwithSystem::setStreamBufferSize.Asanexampleofcpuintensivecodecs,anmp3filewilltakemorecputodecodethanaPCMwavfile.Ifyouhaveastutteringeffect,thenitisusingmorecputhanthedecodebufferplaybackratecankeepupwith.Increasingthedecodebuffersizewillmostlikelysolvethisproblem.
FSBcodec.Ifinclusionlistandnumsubsoundsareusedtogether,thiswilltriggeraspecialmodewheresubsoundsareshuffleddowntosavememory.(usefulforlargeFSBfileswhereyouonlywanttoload1sound).Therewillbenogaps,ienonullsubsounds.Asanexample,ifthereare10,000subsoundsandthereisaninclusionlistwithonly1entry,andnumsubsounds=1,thensubsound0willbethatentry,andtherewillonlybethememoryallocatedfor1subsound.Previouslytherewouldstillbe10,000subsoundpointersandotherassociatedcodecentriesallocatedalongwithitmultipliedby10,000.
Membersmarkedwith[r]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.Membersmarkedwith[w]meanthevariablecanbewrittento.Theusercanset
thevalue.
SeeAlso
System::createSoundSystem::setStreamBufferSizeFMOD_MODEFMOD_SOUND_FORMATFMOD_SOUND_TYPEFMOD_SPEAKERMAPTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_DESCRIPTIONWhencreatingaDSPunit,declareoneoftheseandprovidetherelevantcallbacksandnameforFMODtousewhenitcreatesandusesaDSPunitofthistype.
Structure
typedefstruct{
charname[32];
unsignedintversion;
intchannels;
FMOD_DSP_CREATECALLBACKcreate;
FMOD_DSP_RELEASECALLBACKrelease;
FMOD_DSP_RESETCALLBACKreset;
FMOD_DSP_READCALLBACKread;
FMOD_DSP_SETPOSITIONCALLBACKsetposition;
intnumparameters;
FMOD_DSP_PARAMETERDESC*paramdesc;
FMOD_DSP_SETPARAMCALLBACKsetparameter;
FMOD_DSP_GETPARAMCALLBACKgetparameter;
FMOD_DSP_DIALOGCALLBACKconfig;
intconfigwidth;
intconfigheight;
void*userdata;
}FMOD_DSP_DESCRIPTION;
Members
name
[w]Nameoftheunittobedisplayedinthenetwork.
version
[w]Pluginwriter'sversionnumber.
channels
[w]Numberofchannels.Use0toprocesswhatevernumberofchannelsiscurrentlyinthenetwork.>0wouldbemostlyusediftheunitisaunitthatonly
generatessound.
create
[w]Createcallback.ThisiscalledwhenDSPunitiscreated.Canbenull.
release
[w]Releasecallback.Thisiscalledjustbeforetheunitisfreedsotheusercandoanycleanupneededfortheunit.Canbenull.
reset
[w]Resetcallback.Thisiscalledbytheusertoresetanyhistorybuffersthatmayneedresettingforafilter,whenitistobeusedorre-usedforthefirsttimetoitsinitialcleanstate.Usetoavoidclicksorartifacts.
read
[w]Readcallback.Processingisdonehere.Canbenull.
setposition
[w]Setpositioncallback.Thisiscallediftheunitwantstoupdateitspositioninfobutnotprocessdata,orresetacursorpositioninternallyifitisreadingdatafromacertainsource.Canbenull.
numparameters
[w]Numberofparametersusedinthisfilter.TheuserfindsthiswithDSP::getNumParameters
paramdesc
[w]Variablenumberofparameterstructures.
setparameter
[w]ThisiscalledwhentheusercallsDSP::setParameter.Canbenull.
getparameter
[w]ThisiscalledwhentheusercallsDSP::getParameter.Canbenull.
config
[w]ThisiscalledwhentheusercallsDSP::showConfigDialog.Canbeusedtodisplayadialogtoconfigurethefilter.Canbenull.
configwidth
[w]Widthofconfigdialoggraphicifthereisone.0otherwise.
configheight
[w]Heightofconfigdialoggraphicifthereisone.0otherwise.
userdata
[w]Optional.Specify0toignore.ThisisuserdatatobeattachedtotheDSPunitduringcreation.AccessviaDSP::getUserData.
Remarks
Membersmarkedwith[r]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.Membersmarkedwith[w]meanthevariablecanbewrittento.Theusercansetthevalue.
Thereare2differentwaystochangeaparameterinthisarchitecture.OneistouseDSP::setParameter/DSP::getParameter.Thisisplatformindependantandisdynamic,sonewunknownpluginscanhavetheirparametersenumeratedandused.TheotheristouseDSP::showConfigDialog.ThisisplatformspecificandrequiresaGUI,andwilldisplayadialogboxtoconfiguretheplugin.
SeeAlso
System::createDSPFMOD_DSP_STATE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_PARAMETERDESCStructuretodefineaparameterforaDSPunit.
Structure
typedefstruct{
floatmin;
floatmax;
floatdefaultval;
charname[16];
charlabel[16];
constchar*description;
}FMOD_DSP_PARAMETERDESC;
Members
min
[w]Minimumvalueoftheparameter(ie100.0).
max
[w]Maximumvalueoftheparameter(ie22050.0).
defaultval
[w]Defaultvalueofparameter.
name
[w]Nameoftheparametertobedisplayed(ie"Cutofffrequency").
label
[w]Shortstringtobeputnexttovaluetodenotetheunittype(ie"hz").
description
[w]Descriptionoftheparametertobedisplayedasahelpitem/tooltipforthis
parameter.
Remarks
Membersmarkedwith[r]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.Membersmarkedwith[w]meanthevariablecanbewrittento.Theusercansetthevalue.
SeeAlso
System::createDSPDSP::setParameter
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_STATEDSPpluginstructurethatispassedintoeachcallback.
Structure
typedefstruct{
FMOD_DSP*instance;
void*plugindata;
unsignedshortspeakermask;
}FMOD_DSP_STATE;
Members
instance
[r]HandletotheDSPhandtheusercreated.Nottobemodified.C++userscasttoFMOD::DSPtouse.
plugindata
[w]Pluginwritercreateddatatheoutputauthorwantstoattachtothisobject.
speakermask
[w]SpecifieswhichspeakerstheDSPeffectisactiveon
Remarks
Membersmarkedwith[r]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.Membersmarkedwith[w]meanthevariablecanbewrittento.Theusercansetthevalue.
SeeAlso
FMOD_DSP_DESCRIPTION
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_GUIDStructuredescribingagloballyuniqueidentifier.
Structure
typedefstruct{
unsignedintData1;
unsignedshortData2;
unsignedshortData3;
unsignedcharData4[8];
}FMOD_GUID;
Members
Data1
Specifiesthefirst8hexadecimaldigitsoftheGUID
Data2
Specifiesthefirstgroupof4hexadecimaldigits.
Data3
Specifiesthesecondgroupof4hexadecimaldigits.
Data4
Arrayof8bytes.Thefirst2bytescontainthethirdgroupof4hexadecimaldigits.Theremaining6bytescontainthefinal12hexadecimaldigits.
SeeAlso
System::getDriverInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MEMORY_USAGE_DETAILSStructuretobefilledwithdetailedmemoryusageinformationofanFMODobject
Structure
typedefstruct{
unsignedintother;
unsignedintstring;
unsignedintsystem;
unsignedintplugins;
unsignedintoutput;
unsignedintchannel;
unsignedintchannelgroup;
unsignedintcodec;
unsignedintfile;
unsignedintsound;
unsignedintsecondaryram;
unsignedintsoundgroup;
unsignedintstreambuffer;
unsignedintdspconnection;
unsignedintdsp;
unsignedintdspcodec;
unsignedintprofile;
unsignedintrecordbuffer;
unsignedintreverb;
unsignedintreverbchannelprops;
unsignedintgeometry;
unsignedintsyncpoint;
unsignedinteventsystem;
unsignedintmusicsystem;
unsignedintfev;
unsignedintmemoryfsb;
unsignedinteventproject;
unsignedinteventgroupi;
unsignedintsoundbankclass;
unsignedintsoundbanklist;
unsignedintstreaminstance;
unsignedintsounddefclass;
unsignedintsounddefdefclass;
unsignedintsounddefpool;
unsignedintreverbdef;
unsignedinteventreverb;
unsignedintuserproperty;
unsignedinteventinstance;
unsignedinteventinstance_complex;
unsignedinteventinstance_simple;
unsignedinteventinstance_layer;
unsignedinteventinstance_sound;
unsignedinteventenvelope;
unsignedinteventenvelopedef;
unsignedinteventparameter;
unsignedinteventcategory;
unsignedinteventenvelopepoint;
unsignedinteventinstancepool;
}FMOD_MEMORY_USAGE_DETAILS;
Members
other
[out]Memorynotaccountedforbyothertypes
string
[out]Stringdata
system
[out]Systemobjectandvariousinternals
plugins
[out]Pluginobjectsandinternals
output
[out]Outputmoduleobjectandinternals
channel
[out]Channelrelatedmemory
channelgroup
[out]ChannelGroupobjectsandinternals
codec
[out]Codecsallocatedforstreaming
file
[out]Filebuffersandstructures
sound
[out]Soundobjectsandinternals
secondaryram
[out]SounddatastoredinsecondaryRAM
soundgroup
[out]SoundGroupobjectsandinternals
streambuffer
[out]Streambuffermemory
dspconnection
[out]DSPConnectionobjectsandinternals
dsp
[out]DSPimplementationobjects
dspcodec
[out]RealtimefileformatdecodingDSPobjects
profile
[out]Profilermemoryfootprint.
recordbuffer
[out]Bufferusedtostorerecordeddatafrommicrophone
reverb
[out]Reverbimplementationobjects
reverbchannelprops
[out]Reverbchannelpropertiesstructs
geometry
[out]Geometryobjectsandinternals
syncpoint
[out]Syncpointmemory.
eventsystem
[out]EventSystemandvariousinternals
musicsystem
[out]MusicSystemandvariousinternals
fev
[out]Definitionofobjectscontainedinallloadedprojectse.g.events,groups,categories
memoryfsb
[out]DataloadedwithpreloadFSB
eventproject
[out]EventProjectobjectsandinternals
eventgroupi
[out]EventGroupobjectsandinternals
soundbankclass
[out]Objectsusedtomanagewavebanks
soundbanklist
[out]Datausedtomanagelistsofwavebankusage
streaminstance
[out]Streamobjectsandinternals
sounddefclass
[out]Sounddefinitionobjects
sounddefdefclass
[out]Sounddefinitionstaticdataobjects
sounddefpool
[out]Sounddefinitionpooldata
reverbdef
[out]Reverbdefinitionobjects
eventreverb
[out]Reverbobjects
userproperty
[out]Userpropertyobjects
eventinstance
[out]Eventinstancebaseobjects
eventinstance_complex
[out]Complexeventinstanceobjects
eventinstance_simple
[out]Simpleeventinstanceobjects
eventinstance_layer
[out]Eventlayerinstanceobjects
eventinstance_sound
[out]Eventsoundinstanceobjects
eventenvelope
[out]Eventenvelopeobjects
eventenvelopedef
[out]Eventenvelopedefinitionobjects
eventparameter
[out]Eventparameterobjects
eventcategory
[out]Eventcategoryobjects
eventenvelopepoint
[out]Eventenvelopepointobjects
eventinstancepool
[out]Eventinstancepoolmemory
Remarks
EverypublicFMODclasshasagetMemoryInfofunctionwhichcanbeusedtogetdetailedinformationonwhatmemoryresourcesareassociatedwiththeobjectinquestion.OnreturnfromgetMemoryInfo,eachmemberofthisstructurewillholdtheamountofmemoryusedforitstypeinbytes.
Membersmarkedwith[in]meantheusersetsthevaluebeforepassingittothefunction.Membersmarkedwith[out]meanFMODsetsthevaluetobeusedafterthefunctionexits.
SeeAlso
System::getMemoryInfoEventSystem::getMemoryInfoFMOD_MEMBITSFMOD_EVENT_MEMBITS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_DESCRIPTIONWhencreatinganoutput,declareoneoftheseandprovidetherelevantcallbacksandnameforFMODtousewhenitopensandreadsafileofthistype.
Structure
typedefstruct{
constchar*name;
unsignedintversion;
intpolling;
FMOD_OUTPUT_GETNUMDRIVERSCALLBACKgetnumdrivers;
FMOD_OUTPUT_GETDRIVERNAMECALLBACKgetdrivername;
FMOD_OUTPUT_GETDRIVERCAPSCALLBACKgetdrivercaps;
FMOD_OUTPUT_INITCALLBACKinit;
FMOD_OUTPUT_CLOSECALLBACKclose;
FMOD_OUTPUT_UPDATECALLBACKupdate;
FMOD_OUTPUT_GETHANDLECALLBACKgethandle;
FMOD_OUTPUT_GETPOSITIONCALLBACKgetposition;
FMOD_OUTPUT_LOCKCALLBACKlock;
FMOD_OUTPUT_UNLOCKCALLBACKunlock;
}FMOD_OUTPUT_DESCRIPTION;
Members
name
[in]Nameoftheoutput.
version
[in]Pluginwriter'sversionnumber.
polling
[in]IfTRUE(nonzero),thistellsFMODtostartathreadandcallgetposition/lock/unlockforfeedingdata.If0,theoutputisprobablycallbackbased,soallthepluginneedstodoiscallreadfrommixertotheappropriatepointer.
getnumdrivers
[in]Forsounddeviceenumeration.ThiscallbackistogiveSystem::getNumDriverssomthingtoreturn.
getdrivername
[in]Forsounddeviceenumeration.ThiscallbackistogiveSystem::getDriverNamesomthingtoreturn.
getdrivercaps
[in]Forsounddeviceenumeration.ThiscallbackistogiveSystem::getDriverCapssomthingtoreturn.
init
[in]Initializationfunctionfortheoutputdevice.ThisiscalledfromSystem::init.
close
[in]Cleanup/closedownfunctionfortheoutputdevice.ThisiscalledfromSystem::close.
update
[in]Updatefunctionthatiscalledonceaframebytheuser.ThisiscalledfromSystem::update.
gethandle
[in]ThisiscalledfromSystem::getOutputHandle.Thisisjusttoreturnapointertotheinternalsystemdeviceobjectthatthesystemmaybeusing.
getposition
[in]ThisiscalledfromtheFMODsoftwaremixerthreadif'polling'=true.ThisreturnsapositionvalueinsamplessothatFMODknowswhereandwhentofillitsbuffer.
lock
[in]ThisiscalledfromtheFMODsoftwaremixerthreadif'polling'=true.This
functionprovidesapointertodatathatFMODcanwritetowhensoftwaremixing.
unlock
[in]ThisiscalledfromtheFMODsoftwaremixerthreadif'polling'=true.Thisoptionalfunctionacceptsthedatathathasbeenmixedandcopiesitordoeswhateveritneedstobeforesendingittothehardware.
Remarks
Membersmarkedwith[in]meanthevariablecanbewrittento.Theusercansetthevalue.Membersmarkedwith[out]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.
SeeAlso
FMOD_OUTPUT_STATE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUT_STATEOutputpluginstructurethatispassedintoeachcallback.
Structure
typedefstruct{
void*plugindata;
FMOD_OUTPUT_READFROMMIXERreadfrommixer;
}FMOD_OUTPUT_STATE;
Members
plugindata
[in]Pluginwritercreateddatatheoutputauthorwantstoattachtothisobject.
readfrommixer
[out]Functiontoupdatemixerandwritetheresulttotheprovidedpointer.Usedfromcallbackbasedoutputonly.Pollingbasedoutputuseslock/unlock/getposition.
Remarks
Membersmarkedwith[in]meanthevariablecanbewrittento.Theusercansetthevalue.Membersmarkedwith[out]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.
SeeAlso
FMOD_OUTPUT_DESCRIPTION
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_REVERB_CHANNELPROPERTIESStructuredefiningthepropertiesforareverbsource,relatedtoaFMODchannel.NotethedefaultreverbpropertiesarethesameastheFMOD_PRESET_GENERICpreset.Notethatintegervaluesthattypicallyrangefrom-10,000to1000arerepresentedindecibels,andareofalogarithmicscale,notlinear,wherasfloatvaluesaretypicallylinear.PORTABILITY:Eachmemberhastheplatformitsupportsinbracesie(win32/wii).Thenumericalvalueslistedbelowarethemaximum,minimumanddefaultvaluesforeachvariablerespectively.
Structure
typedefstruct{
intDirect;
intRoom;
unsignedintFlags;
FMOD_DSP*ConnectionPoint;
}FMOD_REVERB_CHANNELPROPERTIES;
Members
Direct
[r/w]-1000010000Directpathlevel(SUPPORTED:SFX)
Room
[r/w]-1000010000Roomeffectlevel(SUPPORTED:SFX)
Flags
[r/w]FMOD_REVERB_CHANNELFLAGS-modifiesthebehaviorofproperties(SUPPORTED:SFX)
ConnectionPoint
[r/w]Seeremarks.DSPnetworklocationtoconnectreverbforthischannel.(SUPPORTED:SFX).
Remarks
SUPPORTEDnexttoeachparametermeanstheplatformtheparametercanbeseton.Someplatformssupportallparametersandsomedon't.WIImeansNintendoWiihardwarereverb(mustuseFMOD_HARDWARE).PSPmeansPlaystationPortablehardwarereverb(mustuseFMOD_HARDWARE).SFXmeansFMODSFXsoftwarereverb.ThisworksonanyplatformthatusesFMOD_SOFTWAREforloadingsounds.---meansunsupported/deprecated.WilleitherberemovedorsupportedbySFXinthefuture.
'ConnectionPoint'Parameter.ThisparameterisfortheFMODsoftwarereverbonly(knownasSFXinthelistabove).Bydefaultthedspnetworkconnectionforachannelanditsreverbisbetweenthe'SFXReverb'unit,andthechannel'swavetable/resampler/dspcodec/oscillatorunit(theunitbelowthechannelDSPhead).NULLcanbeusedforthisparametertomakeitusethisdefaultbehaviour.ThisparameterallowstheusertoconnecttheSFXreverbtosomewhereelseinternally,forexamplethechannelDSPhead,orarelatedchannelgroup.Theeventsystemusesthissothatitcanhavetheoutputofaneventgoingtothereverb,insteadofjusttheoutputoftheevent'schannels(therebyignoringeventeffects/submixesetc).DonotuseifyouareunawareofDSPnetworkconnectionissues.LeaveitatthedefaultofNULLinstead.
Membersmarkedwith[r]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.Membersmarkedwith[w]meanthevariablecanbewrittento.Theusercansetthevalue.Membersmarkedwith[r/w]areeitherreadorwritedependingonifyouareusingChannel::setReverbProperties(w)orChannel::getReverbProperties(r).
SeeAlso
Channel::setReverbPropertiesChannel::getReverbPropertiesFMOD_REVERB_CHANNELFLAGS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_REVERB_PROPERTIESStructuredefiningareverbenvironment.
Structure
typedefstruct{
intInstance;
intEnvironment;
floatEnvDiffusion;
intRoom;
intRoomHF;
intRoomLF;
floatDecayTime;
floatDecayHFRatio;
floatDecayLFRatio;
intReflections;
floatReflectionsDelay;
intReverb;
floatReverbDelay;
floatModulationTime;
floatModulationDepth;
floatHFReference;
floatLFReference;
floatDiffusion;
floatDensity;
unsignedintFlags;
}FMOD_REVERB_PROPERTIES;
Members
Instance
[w]030EnvironmentInstance.(SUPPORTED:SFX(4instances)andWii(3instances))
Environment
[r/w]-125-1Setsalllistenerproperties.-1=OFF.(SUPPORTED:SFX(-1only)/PSP)
EnvDiffusion
[r/w]0.01.01.0Environmentdiffusion(SUPPORTED:WII)
Room
[r/w]-100000-1000Roomeffectlevel(atmidfrequencies)(SUPPORTED:SFX/WII/PSP)
RoomHF
[r/w]-100000-100Relativeroomeffectlevelathighfrequencies(SUPPORTED:SFX)
RoomLF
[r/w]-1000000Relativeroomeffectlevelatlowfrequencies(SUPPORTED:SFX)
DecayTime
[r/w]0.120.01.49Reverberationdecaytimeatmidfrequencies(SUPPORTED:SFX/WII)
DecayHFRatio
[r/w]0.12.00.83High-frequencytomid-frequencydecaytimeratio(SUPPORTED:SFX)
DecayLFRatio
[r/w]0.12.01.0Low-frequencytomid-frequencydecaytimeratio(SUPPORTED:---)
Reflections
[r/w]-100001000-2602Earlyreflectionslevelrelativetoroomeffect(SUPPORTED:SFX/WII)
ReflectionsDelay
[r/w]0.00.30.007Initialreflectiondelaytime(SUPPORTED:SFX)
Reverb
[r/w]-100002000200Latereverberationlevelrelativetoroomeffect(SUPPORTED:SFX)
ReverbDelay
[r/w]0.00.10.011Latereverberationdelaytimerelativetoinitialreflection(SUPPORTED:SFX/WII)
ModulationTime
[r/w]0.044.00.25Modulationtime(SUPPORTED:---)
ModulationDepth
[r/w]0.01.00.0Modulationdepth(SUPPORTED:WII)
HFReference
[r/w]20.020000.05000.0Referencehighfrequency(hz)(SUPPORTED:SFX)
LFReference
[r/w]20.01000.0250.0Referencelowfrequency(hz)(SUPPORTED:SFX)
Diffusion
[r/w]0.0100.0100.0Valuethatcontrolstheechodensityinthelatereverberationdecay.(SUPPORTED:SFX)
Density
[r/w]0.0100.0100.0Valuethatcontrolsthemodaldensityinthelatereverberationdecay(SUPPORTED:SFX)
Flags
[r/w]FMOD_REVERB_FLAGS-modifiesthebehaviorofaboveproperties
(SUPPORTED:WII)
Remarks
NotethedefaultreverbpropertiesarethesameastheFMOD_PRESET_GENERICpreset.Notethatintegervaluesthattypicallyrangefrom-10,000to1000arerepresentedindecibels,andareofalogarithmicscale,notlinear,wherasfloatvaluesarealwayslinear.
Thenumericalvalueslistedbelowarethemaximum,minimumanddefaultvaluesforeachvariablerespectively.
SUPPORTEDnexttoeachparametermeanstheplatformtheparametercanbeseton.Someplatformssupportallparametersandsomedon't.WIImeansNintendoWiihardwarereverb(mustuseFMOD_HARDWARE).PSPmeansPlaystationPortablehardwarereverb(mustuseFMOD_HARDWARE).SFXmeansFMODSFXsoftwarereverb.ThisworksonanyplatformthatusesFMOD_SOFTWAREforloadingsounds.---meansunsupported/deprecated.WilleitherberemovedorsupportedbySFXinthefuture.NintendoWiiNotes:Thisstructuresupportsonlylimitedparameters,andmapsthemtotheWiihardwarereverbasfollows.DecayTime='time'ReverbDelay='predelay'ModulationDepth='damping'Reflections='coloration'EnvDiffusion='crosstalk'Room='mix'
Membersmarkedwith[r]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.Membersmarkedwith[w]meanthevariablecanbewrittento.Theusercansetthevalue.Membersmarkedwith[r/w]areeitherreadorwritedependingonifyouare
usingSystem::setReverbProperties(w)orSystem::getReverbProperties(r).
SeeAlso
System::setReverbPropertiesSystem::getReverbPropertiesFMOD_REVERB_PRESETSFMOD_REVERB_FLAGS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_TAGStructuredescribingapieceoftagdata.
Structure
typedefstruct{
FMOD_TAGTYPEtype;
FMOD_TAGDATATYPEdatatype;
char*name;
void*data;
unsignedintdatalen;
FMOD_BOOLupdated;
}FMOD_TAG;
Members
type
[r]Thetypeofthistag.
datatype
[r]Thetypeofdatathatthistagcontains
name
[r]Thenameofthistagi.e."TITLE","ARTIST"etc.
data
[r]Pointertothetagdata-itsformatisdeterminedbythedatatypemember
datalen
[r]Lengthofthedatacontainedinthistag
updated
[r]Trueifthistaghasbeenupdatedsincelastbeingaccessedwith
Sound::getTag
Remarks
Membersmarkedwith[r]meanthevariableismodifiedbyFMODandisforreadingpurposesonly.Donotchangethisvalue.Membersmarkedwith[w]meanthevariablecanbewrittento.Theusercansetthevalue.
SeeAlso
Sound::getTagFMOD_TAGTYPEFMOD_TAGDATATYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_VECTORStructuredescribingapointin3Dspace.
Structure
typedefstruct{
floatx;
floaty;
floatz;
}FMOD_VECTOR;
Members
x
Xco-ordinatein3Dspace.
y
Yco-ordinatein3Dspace.
z
Zco-ordinatein3Dspace.
Remarks
FMODusesalefthandedco-ordinatesystembydefault.Tousearighthandedco-ordinatesystemspecifyFMOD_INIT_3D_RIGHTHANDEDfromFMOD_INITFLAGSinSystem::init.
SeeAlso
System::set3DListenerAttributes
System::get3DListenerAttributesChannel::set3DAttributesChannel::get3DAttributesChannel::set3DCustomRolloffChannel::get3DCustomRolloffSound::set3DCustomRolloffSound::get3DCustomRolloffGeometry::addPolygonGeometry::setPolygonVertexGeometry::getPolygonVertexGeometry::setRotationGeometry::getRotationGeometry::setPositionGeometry::getPositionGeometry::setScaleGeometry::getScaleFMOD_INITFLAGS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DefinesFMOD_CAPSFMOD_DEBUGLEVELFMOD_INITFLAGSFMOD_MEMBITSFMOD_MEMORY_TYPEFMOD_MODEFMOD_REVERB_CHANNELFLAGSFMOD_REVERB_FLAGSFMOD_REVERB_PRESETSFMOD_TIMEUNIT
FirelightTechnologiesFMODEx
FMOD_CAPSBitfieldstousewithSystem::getDriverCapstodeterminethecapabilitiesofacard/outputdevice.ItisimportanttocheckFMOD_CAPS_HARDWARE_EMULATEDonwindowsmachines,tothenadjustSystem::setDSPBufferSizeto(1024,10)tocompensateforthehigherlatency.
Definition
#defineFMOD_CAPS_NONE0x00000000
#defineFMOD_CAPS_HARDWARE0x00000001
#defineFMOD_CAPS_HARDWARE_EMULATED0x00000002
#defineFMOD_CAPS_OUTPUT_MULTICHANNEL0x00000004
#defineFMOD_CAPS_OUTPUT_FORMAT_PCM80x00000008
#defineFMOD_CAPS_OUTPUT_FORMAT_PCM160x00000010
#defineFMOD_CAPS_OUTPUT_FORMAT_PCM240x00000020
#defineFMOD_CAPS_OUTPUT_FORMAT_PCM320x00000040
#defineFMOD_CAPS_OUTPUT_FORMAT_PCMFLOAT0x00000080
#defineFMOD_CAPS_REVERB_LIMITED0x00002000
#defineFMOD_CAPS_LOOPBACK0x00004000
Values
FMOD_CAPS_NONE
Devicehasnospecialcapabilities.
FMOD_CAPS_HARDWARE
Devicesupportshardwaremixing.
FMOD_CAPS_HARDWARE_EMULATED
Userhasdevicesetto'Hardwareacceleration=off'incontrolpanel,andnowextra200mslatencyisincurred.
FMOD_CAPS_OUTPUT_MULTICHANNEL
Devicecandomultichanneloutput,iegreaterthan2channels.
FMOD_CAPS_OUTPUT_FORMAT_PCM8
Devicecanoutputto8bitintegerPCM.
FMOD_CAPS_OUTPUT_FORMAT_PCM16
Devicecanoutputto16bitintegerPCM.
FMOD_CAPS_OUTPUT_FORMAT_PCM24
Devicecanoutputto24bitintegerPCM.
FMOD_CAPS_OUTPUT_FORMAT_PCM32
Devicecanoutputto32bitintegerPCM.
FMOD_CAPS_OUTPUT_FORMAT_PCMFLOAT
Devicecanoutputto32bitfloatingpointPCM.
FMOD_CAPS_REVERB_LIMITED
Devicesupportssomeformoflimitedhardwarereverb,maybeparameterlessandonlyselectablebyenvironment.
FMOD_CAPS_LOOPBACK
Deviceisaloopbackrecordingdevice
SeeAlso
System::getDriverCapsSystem::setDSPBufferSize
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DEBUGLEVELBitfieldstousewithFMOD::Debug_SetLevel/FMOD::Debug_GetLeveltocontrolthelevelofttydebugoutputwithloggingversionsofFMOD(fmodL).
Definition
#defineFMOD_DEBUG_LEVEL_NONE0x00000000
#defineFMOD_DEBUG_LEVEL_LOG0x00000001
#defineFMOD_DEBUG_LEVEL_ERROR0x00000002
#defineFMOD_DEBUG_LEVEL_WARNING0x00000004
#defineFMOD_DEBUG_LEVEL_HINT0x00000008
#defineFMOD_DEBUG_LEVEL_ALL0x000000FF
#defineFMOD_DEBUG_TYPE_MEMORY0x00000100
#defineFMOD_DEBUG_TYPE_THREAD0x00000200
#defineFMOD_DEBUG_TYPE_FILE0x00000400
#defineFMOD_DEBUG_TYPE_NET0x00000800
#defineFMOD_DEBUG_TYPE_EVENT0x00001000
#defineFMOD_DEBUG_TYPE_ALL0x0000FFFF
#defineFMOD_DEBUG_DISPLAY_TIMESTAMPS0x01000000
#defineFMOD_DEBUG_DISPLAY_LINENUMBERS0x02000000
#defineFMOD_DEBUG_DISPLAY_COMPRESS0x04000000
#defineFMOD_DEBUG_DISPLAY_THREAD0x08000000
#defineFMOD_DEBUG_DISPLAY_ALL0x0F000000
#defineFMOD_DEBUG_ALL0xFFFFFFFF
Values
FMOD_DEBUG_LEVEL_NONE
FMOD_DEBUG_LEVEL_LOG
Willdisplaygenericloggingmessages.
FMOD_DEBUG_LEVEL_ERROR
Willdisplayerrors.
FMOD_DEBUG_LEVEL_WARNING
Willdisplaywarningsthatarenotfatal.
FMOD_DEBUG_LEVEL_HINT
Willhinttoyouifthereissomethingpossiblybetteryoucouldbedoing.
FMOD_DEBUG_LEVEL_ALL
FMOD_DEBUG_TYPE_MEMORY
ShowFMODmemoryrelatedloggingmessages.
FMOD_DEBUG_TYPE_THREAD
ShowFMODthreadrelatedloggingmessages.
FMOD_DEBUG_TYPE_FILE
ShowFMODfilesystemrelatedloggingmessages.
FMOD_DEBUG_TYPE_NET
ShowFMODnetworkrelatedloggingmessages.
FMOD_DEBUG_TYPE_EVENT
ShowFMODEventrelatedloggingmessages.
FMOD_DEBUG_TYPE_ALL
FMOD_DEBUG_DISPLAY_TIMESTAMPS
Displaythetimestampofthelogentryinmilliseconds.
FMOD_DEBUG_DISPLAY_LINENUMBERS
DisplaytheFMODExsourcecodelinenumbers,fordebuggingpurposes.
FMOD_DEBUG_DISPLAY_COMPRESS
Ifamessageisrepeatedmorethan5timesitwillstopdisplayingitandinsteaddisplaythenumberoftimesthemessagewaslogged.
FMOD_DEBUG_DISPLAY_THREAD
DisplaythethreadIDofthecallingfunctionthatcausedthislogentrytoappear.
FMOD_DEBUG_DISPLAY_ALL
FMOD_DEBUG_ALL
SeeAlso
Debug_SetLevelDebug_GetLevel
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_INITFLAGSInitializationflags.UsethemwithSystem::initintheflagsparametertochangevariousbehavior.UseSystem::setAdvancedSettingstoadjustsettingsforsomeofthefeaturesthatareenabledbytheseflags.
Definition
#defineFMOD_INIT_NORMAL0x00000000
#defineFMOD_INIT_STREAM_FROM_UPDATE0x00000001
#defineFMOD_INIT_3D_RIGHTHANDED0x00000002
#defineFMOD_INIT_SOFTWARE_DISABLE0x00000004
#defineFMOD_INIT_OCCLUSION_LOWPASS0x00000008
#defineFMOD_INIT_HRTF_LOWPASS0x00000010
#defineFMOD_INIT_DISTANCE_FILTERING0x00000200
#defineFMOD_INIT_SOFTWARE_REVERB_LOWMEM0x00000040
#defineFMOD_INIT_ENABLE_PROFILE0x00000020
#defineFMOD_INIT_VOL0_BECOMES_VIRTUAL0x00000080
#defineFMOD_INIT_WASAPI_EXCLUSIVE0x00000100
#defineFMOD_INIT_PS3_PREFERDTS0x00800000
#defineFMOD_INIT_PS3_FORCE2CHLPCM0x01000000
#defineFMOD_INIT_DISABLEDOLBY0x00100000
#defineFMOD_INIT_SYSTEM_MUSICMUTENOTPAUSE0x00200000
#defineFMOD_INIT_SYNCMIXERWITHUPDATE0x00400000
#defineFMOD_INIT_GEOMETRY_USECLOSEST0x04000000
#defineFMOD_INIT_DISABLE_MYEARS_AUTODETECT0x08000000
#defineFMOD_INIT_PS3_DISABLEDTS0x10000000
#defineFMOD_INIT_PS3_DISABLEDOLBYDIGITAL0x20000000
Values
FMOD_INIT_NORMAL
Allplatforms-Initializenormally
FMOD_INIT_STREAM_FROM_UPDATE
Allplatforms-Nostreamthreadiscreatedinternally.StreamsaredrivenfromSystem::update.Mainlyusedwithnon-realtimeoutputs.
FMOD_INIT_3D_RIGHTHANDED
Allplatforms-FMODwilltreat+Xasright,+Yasupand+Zasbackwards(towardsyou).
FMOD_INIT_SOFTWARE_DISABLE
Allplatforms-Disablesoftwaremixertosavememory.AnythingcreatedwithFMOD_SOFTWAREwillfailandDSPwillnotwork.
FMOD_INIT_OCCLUSION_LOWPASS
Allplatforms-AllFMOD_SOFTWARE(andFMOD_HARDWAREon3DSandNGP)withFMOD_3DbasedvoiceswilladdasoftwarelowpassfiltereffectintotheDSPchainwhichisautomaticallyusedwhenChannel::set3DOcclusionisusedorthegeometryAPI.
FMOD_INIT_HRTF_LOWPASS
Allplatforms-AllFMOD_SOFTWARE(andFMOD_HARDWAREon3DSandNGP)withFMOD_3DbasedvoiceswilladdasoftwarelowpassfiltereffectintotheDSPchainwhichcausessoundstosounddullerwhenthesoundgoesbehindthelistener.UseSystem::setAdvancedSettingstoadjustcutofffrequency.
FMOD_INIT_DISTANCE_FILTERING
Allplatforms-AllFMOD_SOFTWAREwithFMOD_3DbasedvoiceswilladdasoftwarelowpassandhighpassfiltereffectintotheDSPchainwhichwillactasadistance-automatedbandpassfilter.UseSystem::setAdvancedSettingstoadjustthecenterfrequency.
FMOD_INIT_SOFTWARE_REVERB_LOWMEM
Allplatforms-SFXreverbisrunusing22/24khzdelaybuffers,halvingthememoryrequired.
FMOD_INIT_ENABLE_PROFILE
Allplatforms-EnableTCP/IPbasedhostwhichallowsFMODDesignerorFMODProfilertoconnecttoit,andviewmemory,CPUandtheDSPnetworkgraphinreal-time.
FMOD_INIT_VOL0_BECOMES_VIRTUAL
Allplatforms-Anysoundsthatare0volumewillgovirtualandnotbeprocessedexceptforhavingtheirpositionsupdatedvirtually.UseSystem::setAdvancedSettingstoadjustwhatvolumebesideszerotoswitchtovirtualat.
FMOD_INIT_WASAPI_EXCLUSIVE
Win32Vistaonly-forWASAPIoutput-Enableexclusiveaccesstohardware,lowerlatencyattheexpenseofexcludingotherapplicationsfromaccessingtheaudiohardware.
FMOD_INIT_PS3_PREFERDTS
PS3only-PreferDTSoverDolbyDigitalifbotharesupported.Note:8and6channelLPCMisalwayspreferredoverbothDTSandDolbyDigital.
FMOD_INIT_PS3_FORCE2CHLPCM
PS3only-ForcePS3systemoutputmodeto2channelLPCM.
FMOD_INIT_DISABLEDOLBY
Wii/3DS-DisableDolbyProLogicsurround.SpeakermodewillbesettoSTEREOevenifuserhasselectedsurroundinthesystemsettings.
FMOD_INIT_SYSTEM_MUSICMUTENOTPAUSE
Xbox360/PS3-The"music"channelgroupwhichbydefaultpauseswhencustom360dashboard/PS3BGMmusicisplayed,canbechangedtomute(thereforecontinuesplaying)insteadofpausing,byusingthisflag.
FMOD_INIT_SYNCMIXERWITHUPDATE
Win32/Wii/PS3/Xbox/Xbox360-FMODMixerthreadiswokenuptodoamixwhenSystem::updateiscalledratherthanwakingperiodicallyonitsowntimer.
FMOD_INIT_GEOMETRY_USECLOSEST
Allplatforms-Withthegeometryengine,onlyprocesstheclosestpolygon
ratherthanaccumulatingallpolygonsthesoundtolistenerlineintersects.
FMOD_INIT_DISABLE_MYEARS_AUTODETECT
Win32-DisablesautomaticsettingofFMOD_SPEAKERMODE_STEREOtoFMOD_SPEAKERMODE_MYEARSiftheMyEarsprofileexistsonthePC.MyEarsisHRTF7.1downmixingthroughheadphones.
FMOD_INIT_PS3_DISABLEDTS
PS3only-DisableDTSoutputmodeselection
FMOD_INIT_PS3_DISABLEDOLBYDIGITAL
PS3only-DisableDolbyDigitaloutputmodeselection
SeeAlso
System::initSystem::updateSystem::setAdvancedSettingsChannel::set3DOcclusion
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MEMBITSBitfieldusedtorequestspecificmemoryusageinformationfromthegetMemoryInfofunctionofeverypublicFMODExclass.Usewiththe"memorybits"parameterofgetMemoryInfotogetinformationonFMODExmemoryusage.EverypublicFMODclasshasagetMemoryInfofunctionwhichcanbeusedtogetdetailedinformationonwhatmemoryresourcesareassociatedwiththeobjectinquestion.TheFMOD_MEMBITSdefinescanbeOR'dtogethertospecifypreciselywhatmemoryusageyou'dliketogetinformationon.SeeSystem::getMemoryInfoforanexample.
Definition
#defineFMOD_MEMBITS_OTHER0x00000001
#defineFMOD_MEMBITS_STRING0x00000002
#defineFMOD_MEMBITS_SYSTEM0x00000004
#defineFMOD_MEMBITS_PLUGINS0x00000008
#defineFMOD_MEMBITS_OUTPUT0x00000010
#defineFMOD_MEMBITS_CHANNEL0x00000020
#defineFMOD_MEMBITS_CHANNELGROUP0x00000040
#defineFMOD_MEMBITS_CODEC0x00000080
#defineFMOD_MEMBITS_FILE0x00000100
#defineFMOD_MEMBITS_SOUND0x00000200
#defineFMOD_MEMBITS_SOUND_SECONDARYRAM0x00000400
#defineFMOD_MEMBITS_SOUNDGROUP0x00000800
#defineFMOD_MEMBITS_STREAMBUFFER0x00001000
#defineFMOD_MEMBITS_DSPCONNECTION0x00002000
#defineFMOD_MEMBITS_DSP0x00004000
#defineFMOD_MEMBITS_DSPCODEC0x00008000
#defineFMOD_MEMBITS_PROFILE0x00010000
#defineFMOD_MEMBITS_RECORDBUFFER0x00020000
#defineFMOD_MEMBITS_REVERB0x00040000
#defineFMOD_MEMBITS_REVERBCHANNELPROPS0x00080000
#defineFMOD_MEMBITS_GEOMETRY0x00100000
#defineFMOD_MEMBITS_SYNCPOINT0x00200000
#defineFMOD_MEMBITS_ALL0xffffffff
Values
FMOD_MEMBITS_OTHER
Memorynotaccountedforbyothertypes
FMOD_MEMBITS_STRING
Stringdata
FMOD_MEMBITS_SYSTEM
Systemobjectandvariousinternals
FMOD_MEMBITS_PLUGINS
Pluginobjectsandinternals
FMOD_MEMBITS_OUTPUT
Outputmoduleobjectandinternals
FMOD_MEMBITS_CHANNEL
Channelrelatedmemory
FMOD_MEMBITS_CHANNELGROUP
ChannelGroupobjectsandinternals
FMOD_MEMBITS_CODEC
Codecsallocatedforstreaming
FMOD_MEMBITS_FILE
Codecsallocatedforstreaming
FMOD_MEMBITS_SOUND
Soundobjectsandinternals
FMOD_MEMBITS_SOUND_SECONDARYRAM
SounddatastoredinsecondaryRAM
FMOD_MEMBITS_SOUNDGROUP
SoundGroupobjectsandinternals
FMOD_MEMBITS_STREAMBUFFER
Streambuffermemory
FMOD_MEMBITS_DSPCONNECTION
DSPConnectionobjectsandinternals
FMOD_MEMBITS_DSP
DSPimplementationobjects
FMOD_MEMBITS_DSPCODEC
RealtimefileformatdecodingDSPobjects
FMOD_MEMBITS_PROFILE
Profilermemoryfootprint.
FMOD_MEMBITS_RECORDBUFFER
Bufferusedtostorerecordeddatafrommicrophone
FMOD_MEMBITS_REVERB
Reverbimplementationobjects
FMOD_MEMBITS_REVERBCHANNELPROPS
Reverbchannelpropertiesstructs
FMOD_MEMBITS_GEOMETRY
Geometryobjectsandinternals
FMOD_MEMBITS_SYNCPOINT
Syncpointmemory.
FMOD_MEMBITS_ALL
AllmemoryusedbyFMODEx
SeeAlso
FMOD_EVENT_MEMBITSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MEMORY_TYPEBitfieldsformemoryallocationtypebeingpassedintoFMODmemorycallbacks.Rememberthisisabitfield.Youmaygetmorethan1bitset(iephysical+persistent)sodonotsimplyswitchonthetypes!Youmustcheckeachbitindividuallyorclearoutthebitsthatyoudonotwantwithinthecallback.BitscanbeexcludedifyouwantduringMemory_Initializesothatyounevergetthem.
Definition
#defineFMOD_MEMORY_NORMAL0x00000000
#defineFMOD_MEMORY_STREAM_FILE0x00000001
#defineFMOD_MEMORY_STREAM_DECODE0x00000002
#defineFMOD_MEMORY_SAMPLEDATA0x00000004
#defineFMOD_MEMORY_DSP_OUTPUTBUFFER0x00000008
#defineFMOD_MEMORY_XBOX360_PHYSICAL0x00100000
#defineFMOD_MEMORY_PERSISTENT0x00200000
#defineFMOD_MEMORY_SECONDARY0x00400000
#defineFMOD_MEMORY_ALL0xFFFFFFFF
Values
FMOD_MEMORY_NORMAL
Standardmemory.
FMOD_MEMORY_STREAM_FILE
Streamfilebuffer,sizecontrollablewithSystem::setStreamBufferSize.
FMOD_MEMORY_STREAM_DECODE
Streamdecodebuffer,sizecontrollablewithFMOD_CREATESOUNDEXINFO::decodebuffersize.
FMOD_MEMORY_SAMPLEDATA
Sampledatabuffer.Rawaudiodata,usuallyPCM/MPEG/ADPCM/XMAdata.
FMOD_MEMORY_DSP_OUTPUTBUFFER
DSPmemoryblockallocatedwhenmorethan1outputexistsonaDSPnode.
FMOD_MEMORY_XBOX360_PHYSICAL
RequiresXPhysicalAlloc/XPhysicalFree.
FMOD_MEMORY_PERSISTENT
Persistentmemory.MemorywillbefreedwhenSystem::releaseiscalled.
FMOD_MEMORY_SECONDARY
Secondarymemory.Allocationshouldbeinsecondarymemory.ForexampleRSXonthePS3.
FMOD_MEMORY_ALL
SeeAlso
FMOD_MEMORY_ALLOCCALLBACKFMOD_MEMORY_REALLOCCALLBACKFMOD_MEMORY_FREECALLBACKMemory_Initialize
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MODESounddescriptionbitfields,bitwiseORthemtogetherforloadinganddescribingsounds.BydefaultasoundwillopenasastaticsoundthatisdecompressedfullyintomemorytoPCM.(ieequivalentofFMOD_CREATESAMPLE)Tohaveasoundstreaminstead,useFMOD_CREATESTREAM,orusethewrapperfunctionSystem::createStream.Someopeningmodes(ieFMOD_OPENUSER,FMOD_OPENMEMORY,FMOD_OPENMEMORY_POINT,FMOD_OPENRAW)willneedextrainformation.ThiscanbeprovidedusingtheFMOD_CREATESOUNDEXINFOstructure.SpecifyingFMOD_OPENMEMORY_POINTwillPOINTtoyourmemoryratherallocatingitsownsoundbuffersandduplicatingitinternally.ThismeansyoucannotfreethememorywhileFMODisusingit,untilafterSound::releaseiscalled.WithFMOD_OPENMEMORY_POINT,forPCMformats,onlyWAV,FSB,andRAWaresupported.Forcompressedformats,onlythoseformatssupportedbyFMOD_CREATECOMPRESSEDSAMPLEaresupported.WithFMOD_OPENMEMORY_POINTandFMOD_OPENRAWorPCM,ifusingthemtogether,notethatyoumustpadthedataoneachsideby16bytes.Thisissofmodcanmodifytheendsofthedataforlooping/interpolation/mixingpurposes.Ifawavfile,youwillneedtoinsertsilence,andthenresetlooppointstostoptheplaybackfromplayingthatsilence.WithFMOD_OPENMEMORY_POINT,ForWii/PSPFMOD_HARDWAREsupportsthisflagfortheGCADPCM/VAGformats.OnotherplatformsFMOD_SOFTWAREmustbeused.Xbox360memoryOnXbox360SpecifyingFMOD_OPENMEMORY_POINTtoavirtualmemoryaddresswillcauseFMOD_ERR_INVALID_ADDRESStobereturned.Usephysicalmemoryonlyforthisfunctionality.FMOD_LOWMEMisusedonasoundifyouwanttominimizethememoryoverhead,byhavingFMODnotallocatememoryforcertainfeaturesthatarenotlikelytobeusedinagameenvironment.Theseare:1.Sound::getNamefunctionalityisremoved.256bytespersoundissaved.
Definition
#defineFMOD_DEFAULT0x00000000
#defineFMOD_LOOP_OFF0x00000001
#defineFMOD_LOOP_NORMAL0x00000002
#defineFMOD_LOOP_BIDI0x00000004
#defineFMOD_2D0x00000008
#defineFMOD_3D0x00000010
#defineFMOD_HARDWARE0x00000020
#defineFMOD_SOFTWARE0x00000040
#defineFMOD_CREATESTREAM0x00000080
#defineFMOD_CREATESAMPLE0x00000100
#defineFMOD_CREATECOMPRESSEDSAMPLE0x00000200
#defineFMOD_OPENUSER0x00000400
#defineFMOD_OPENMEMORY0x00000800
#defineFMOD_OPENMEMORY_POINT0x10000000
#defineFMOD_OPENRAW0x00001000
#defineFMOD_OPENONLY0x00002000
#defineFMOD_ACCURATETIME0x00004000
#defineFMOD_MPEGSEARCH0x00008000
#defineFMOD_NONBLOCKING0x00010000
#defineFMOD_UNIQUE0x00020000
#defineFMOD_3D_HEADRELATIVE0x00040000
#defineFMOD_3D_WORLDRELATIVE0x00080000
#defineFMOD_3D_INVERSEROLLOFF0x00100000
#defineFMOD_3D_LINEARROLLOFF0x00200000
#defineFMOD_3D_LINEARSQUAREROLLOFF0x00400000
#defineFMOD_3D_CUSTOMROLLOFF0x04000000
#defineFMOD_3D_IGNOREGEOMETRY0x40000000
#defineFMOD_UNICODE0x01000000
#defineFMOD_IGNORETAGS0x02000000
#defineFMOD_LOWMEM0x08000000
#defineFMOD_LOADSECONDARYRAM0x20000000
#defineFMOD_VIRTUAL_PLAYFROMSTART0x80000000
Values
FMOD_DEFAULT
Defaultforallmodeslistedbelow.FMOD_LOOP_OFF,FMOD_2D,FMOD_HARDWARE
FMOD_LOOP_OFF
Fornonloopingsounds.(DEFAULT).OverridesFMOD_LOOP_NORMAL/
FMOD_LOOP_BIDI.
FMOD_LOOP_NORMAL
Forforwardloopingsounds.
FMOD_LOOP_BIDI
Forbidirectionalloopingsounds.(onlyworksonsoftwaremixedstaticsounds).
FMOD_2D
Ignoresany3dprocessing.(DEFAULT).
FMOD_3D
Makesthesoundpositionablein3D.OverridesFMOD_2D.
FMOD_HARDWARE
Attemptstomakesoundsusehardwareacceleration.(DEFAULT).Noteonplatformsthatdon'tsupportFMOD_HARDWARE(only3DS,PSVita,PSP,WiiandWiiUsupportFMOD_HARDWARE),thiswillbeinternallytreatedasFMOD_SOFTWARE.
FMOD_SOFTWARE
MakesthesoundbemixedbytheFMODCPUbasedsoftwaremixer.OverridesFMOD_HARDWARE.UsethisforFFT,DSP,compressedsamplesupport,2Dmulti-speakersupportandothersoftwarerelatedfeatures.
FMOD_CREATESTREAM
Decompressatruntime,streamingfromthesourceprovided(iefromdisk).OverridesFMOD_CREATESAMPLEandFMOD_CREATECOMPRESSEDSAMPLE.Noteastreamcanonlybeplayedonceatatimeduetoastreamonlyhaving1streambufferandfilehandle.Openmultiplestreamstohavethemplayconcurrently.
FMOD_CREATESAMPLE
Decompressatloadtime,decompressingordecodingwholefileintomemoryasthetargetsampleformat(iePCM).FastestforFMOD_SOFTWAREbasedplaybackandmostflexible.
FMOD_CREATECOMPRESSEDSAMPLE
LoadMP2,MP3,IMAADPCMorXMAintomemoryandleaveitcompressed.DuringplaybacktheFMODsoftwaremixerwilldecodeitinrealtimeasa'compressedsample'.CanonlybeusedincombinationwithFMOD_SOFTWARE.OverridesFMOD_CREATESAMPLE.IfthesounddataisnotADPCM,MPEGorXMAitwillbehaveasifitwascreatedwithFMOD_CREATESAMPLEanddecodethesoundintoPCM.
FMOD_OPENUSER
Opensausercreatedstaticsampleorstream.UseFMOD_CREATESOUNDEXINFOtospecifyformatand/orreadcallbacks.Ifausercreated'sample'iscreatedwithnoreadcallback,thesamplewillbeempty.UseSound::lockandSound::unlocktoplacesounddataintothesoundifthisisthecase.
FMOD_OPENMEMORY
"name_or_data"willbeinterpretedasapointertomemoryinsteadoffilenameforcreatingsounds.UseFMOD_CREATESOUNDEXINFOtospecifylength.IfusedwithFMOD_CREATESAMPLEorFMOD_CREATECOMPRESSEDSAMPLE,FMODduplicatesthememoryintoitsownbuffers.Yourownbuffercanbefreedafteropen.IfusedwithFMOD_CREATESTREAM,FMODwillstreamoutofthebufferwhosepointeryoupassedin.Inthiscase,yourownbuffershouldnotbefreeduntilyouhavefinishedwithandreleasedthestream.
FMOD_OPENMEMORY_POINT
"name_or_data"willbeinterpretedasapointertomemoryinsteadoffilenameforcreatingsounds.UseFMOD_CREATESOUNDEXINFOtospecifylength.ThisdifferstoFMOD_OPENMEMORYinthatitusesthememoryasis,withoutduplicatingthememoryintoitsownbuffers.ForWii/PSPFMOD_HARDWAREsupportsthisflagfortheGCADPCM/VAGformats.OnotherplatformsFMOD_SOFTWAREmustbeused,assoundhardwareontheotherplatforms(ie
PC)cannotaccessmainram.Cannotbefreedafteropen,onlyafterSound::release.WillnotworkifthedataiscompressedandFMOD_CREATECOMPRESSEDSAMPLEisnotused.
FMOD_OPENRAW
Willignorefileformatandtreatasrawpcm.UseFMOD_CREATESOUNDEXINFOtospecifyformat.Requiresatleastdefaultfrequency,numchannelsandformattobespecifiedbeforeitwillopen.Mustbelittleendiandata.
FMOD_OPENONLY
Justopenthefile,dontprebufferorread.Goodforfastopensforinfo,orwhensound::readDataistobeused.
FMOD_ACCURATETIME
ForSystem::createSound-foraccurateSound::getLength/Channel::setPositiononVBRMP3,andMOD/S3M/XM/IT/MIDIfiles.Scansfilefirst,sotakeslongertoopen.FMOD_OPENONLYdoesnotaffectthis.
FMOD_MPEGSEARCH
Forcorrupted/badMP3files.ThiswillsearchallthewaythroughthefileuntilithitsavalidMPEGheader.Normallyonlysearchesfor4k.
FMOD_NONBLOCKING
Foropeningsoundsandgettingstreamedsubsounds(seeking)asyncronously.UseSound::getOpenStatetopollthestateofthesoundasitopensorretrievesthesubsoundinthebackground.
FMOD_UNIQUE
Uniquesound,canonlybeplayedoneatatime
FMOD_3D_HEADRELATIVE
Makethesound'sposition,velocityandorientationrelativetothelistener.
FMOD_3D_WORLDRELATIVE
Makethesound'sposition,velocityandorientationabsolute(relativetotheworld).(DEFAULT)
FMOD_3D_INVERSEROLLOFF
Thissoundwillfollowtheinverserolloffmodelwheremindistance=fullvolume,maxdistance=wheresoundstopsattenuating,androlloffisfixedaccordingtotheglobalrollofffactor.(DEFAULT)
FMOD_3D_LINEARROLLOFF
Thissoundwillfollowalinearrolloffmodelwheremindistance=fullvolume,maxdistance=silence.Rolloffscaleisignored.
FMOD_3D_LINEARSQUAREROLLOFF
Thissoundwillfollowalinear-squarerolloffmodelwheremindistance=fullvolume,maxdistance=silence.Rolloffscaleisignored.
FMOD_3D_CUSTOMROLLOFF
ThissoundwillfollowarolloffmodeldefinedbySound::set3DCustomRolloff/Channel::set3DCustomRolloff.
FMOD_3D_IGNOREGEOMETRY
Isnotaffectbygeometryocclusion.IfnotspecifiedinSound::setMode,orChannel::setMode,theflagisclearedanditisaffectedbygeometryagain.
FMOD_UNICODE
Filenameisdouble-byteunicode.
FMOD_IGNORETAGS
Skipsid3v2/asf/etctagcheckswhenopeningasound,toreduceseek/readoverheadwhenopeningfiles(helpswithCDperformance).
FMOD_LOWMEM
Removessomefeaturesfromsamplestogivealowermemoryoverhead,likeSound::getName.Seeremarks.
FMOD_LOADSECONDARYRAM
LoadsoundintothesecondaryRAMofsupportedplatform.OnPS3,soundswillbeloadedintoRSX/VRAM.
FMOD_VIRTUAL_PLAYFROMSTART
Forsoundsthatstartvirtual(duetobeingquietorlowimportance),insteadofswappingbacktoaudible,andplayingatthecorrectoffsetaccordingtotime,thisflagmakesthesoundplayfromthestart.
SeeAlso
System::createSoundSystem::createStreamSound::setModeSound::getModeChannel::setModeChannel::getModeSound::set3DCustomRolloffChannel::set3DCustomRolloffSound::getOpenState
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_REVERB_CHANNELFLAGSValuesfortheFlagsmemberoftheFMOD_REVERB_CHANNELPROPERTIESstructure.ForSFXReverb,thereissupportformultiplereverbenvironments.UseFMOD_REVERB_CHANNELFLAGS_ENVIRONMENT0toFMOD_REVERB_CHANNELFLAGS_ENVIRONMENT3intheflagsmemberofFMOD_REVERB_CHANNELPROPERTIEStospecifywhichenvironmentinstance(s)totarget.-Ifyoudonotspecifyanyinstancethefirstreverbinstancewillbeused.-IfyouspecifymorethanoneinstancewithgetReverbProperties,thefirstinstancewillbeused.-IfyouspecifymorethanoneinstancewithsetReverbProperties,itwillsetmorethan1instanceatonce.
Definition
#defineFMOD_REVERB_CHANNELFLAGS_INSTANCE00x00000010
#defineFMOD_REVERB_CHANNELFLAGS_INSTANCE10x00000020
#defineFMOD_REVERB_CHANNELFLAGS_INSTANCE20x00000040
#defineFMOD_REVERB_CHANNELFLAGS_INSTANCE30x00000080
#defineFMOD_REVERB_CHANNELFLAGS_DEFAULTFMOD_REVERB_CHANNELFLAGS_INSTANCE0
Values
FMOD_REVERB_CHANNELFLAGS_INSTANCE0
SFX/Wii.Specifychanneltotargetreverbinstance0.Defaulttarget.
FMOD_REVERB_CHANNELFLAGS_INSTANCE1
SFX/Wii.Specifychanneltotargetreverbinstance1.
FMOD_REVERB_CHANNELFLAGS_INSTANCE2
SFX/Wii.Specifychanneltotargetreverbinstance2.
FMOD_REVERB_CHANNELFLAGS_INSTANCE3
SFX.Specifychanneltotargetreverbinstance3.
FMOD_REVERB_CHANNELFLAGS_DEFAULT
SeeAlso
FMOD_REVERB_CHANNELPROPERTIES
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_REVERB_FLAGSValuesfortheFlagsmemberoftheFMOD_REVERB_PROPERTIESstructure.
Definition
#defineFMOD_REVERB_FLAGS_HIGHQUALITYREVERB0x00000400
#defineFMOD_REVERB_FLAGS_HIGHQUALITYDPL2REVERB0x00000800
#defineFMOD_REVERB_FLAGS_HARDWAREONLY0x00001000
#defineFMOD_REVERB_FLAGS_DEFAULT0x00000000
Values
FMOD_REVERB_FLAGS_HIGHQUALITYREVERB
Wii.Usehighqualityreverb
FMOD_REVERB_FLAGS_HIGHQUALITYDPL2REVERB
Wii.UsehighqualityDPL2reverb
FMOD_REVERB_FLAGS_HARDWAREONLY
Don'tcreateanSFXreverbforFMOD_SOFTWAREchannels,hardwarereverbonly
FMOD_REVERB_FLAGS_DEFAULT
SeeAlso
FMOD_REVERB_PROPERTIES
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_REVERB_PRESETSAsetofpredefinedenvironmentPARAMETERS.TheseareusedtoinitializeanFMOD_REVERB_PROPERTIESstructurestatically.i.e.FMOD_REVERB_PROPERTIESprop=FMOD_PRESET_GENERIC;
Definition
#defineFMOD_PRESET_OFF{0,-1,1.00f,-10000,-10000,0,1.00f,1.00f,1.0f,-2602,0.007f,200,0.011f,0.25f,0.000f,5000.0f,250.0f,0.0f,0.0f,0x33f}
#defineFMOD_PRESET_GENERIC{0,0,1.00f,-1000,-100,0,1.49f,0.83f,1.0f,-2602,0.007f,200,0.011f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_PADDEDCELL{0,1,1.00f,-1000,-6000,0,0.17f,0.10f,1.0f,-1204,0.001f,207,0.002f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_ROOM{0,2,1.00f,-1000,-454,0,0.40f,0.83f,1.0f,-1646,0.002f,53,0.003f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_BATHROOM{0,3,1.00f,-1000,-1200,0,1.49f,0.54f,1.0f,-370,0.007f,1030,0.011f,0.25f,0.000f,5000.0f,250.0f,100.0f,60.0f,0x3f}
#defineFMOD_PRESET_LIVINGROOM{0,4,1.00f,-1000,-6000,0,0.50f,0.10f,1.0f,-1376,0.003f,-1104,0.004f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_STONEROOM{0,5,1.00f,-1000,-300,0,2.31f,0.64f,1.0f,-711,0.012f,83,0.017f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_AUDITORIUM{0,6,1.00f,-1000,-476,0,4.32f,0.59f,1.0f,-789,0.020f,-289,0.030f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_CONCERTHALL{0,7,1.00f,-1000,-500,0,3.92f,0.70f,1.0f,-1230,0.020f,-2,0.029f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_CAVE{0,8,1.00f,-1000,0,0,2.91f,1.30f,1.0f,-602,0.015f,-302,0.022f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x1f}
#defineFMOD_PRESET_ARENA{0,9,1.00f,-1000,-698,0,7.24f,0.33f,1.0f,-1166,0.020f,16,0.030f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_HANGAR{0,10,1.00f,-1000,-1000,0,10.05f,0.23f,1.0f,-602,0.020f,198,0.030f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_CARPETTEDHALLWAY{0,11,1.00f,-1000,-4000,0,0.30f,0.10f,1.0f,-1831,0.002f,-1630,0.030f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_HALLWAY{0,12,1.00f,-1000,-300,0,1.49f,0.59f,1.0f,-1219,0.007f,441,0.011f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_STONECORRIDOR{0,13,1.00f,-1000,-237,0,2.70f,0.79f,1.0f,-1214,0.013f,395,0.020f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_ALLEY{0,14,0.30f,-1000,-270,0,1.49f,0.86f,1.0f,-1204,0.007f,-4,0.011f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_FOREST{0,15,0.30f,-1000,-3300,0,1.49f,0.54f,1.0f,-2560,0.162f,-229,0.088f,0.25f,0.000f,5000.0f,250.0f,79.0f,100.0f,0x3f}
#defineFMOD_PRESET_CITY{0,16,0.50f,-1000,-800,0,1.49f,0.67f,1.0f,-2273,0.007f,-1691,0.011f,0.25f,0.000f,5000.0f,250.0f,50.0f,100.0f,0x3f}
#defineFMOD_PRESET_MOUNTAINS{0,17,0.27f,-1000,-2500,0,1.49f,0.21f,1.0f,-2780,0.300f,-1434,0.100f,0.25f,0.000f,5000.0f,250.0f,27.0f,100.0f,0x1f}
#defineFMOD_PRESET_QUARRY{0,18,1.00f,-1000,-1000,0,1.49f,0.83f,1.0f,-10000,0.061f,500,0.025f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_PLAIN{0,19,0.21f,-1000,-2000,0,1.49f,0.50f,1.0f,-2466,0.179f,-1926,0.100f,0.25f,0.000f,5000.0f,250.0f,21.0f,100.0f,0x3f}
#defineFMOD_PRESET_PARKINGLOT{0,20,1.00f,-1000,0,0,1.65f,1.50f,1.0f,-1363,0.008f,-1153,0.012f,0.25f,0.000f,5000.0f,250.0f,100.0f,100.0f,0x1f}
#defineFMOD_PRESET_SEWERPIPE{0,21,0.80f,-1000,-1000,0,2.81f,0.14f,1.0f,429,0.014f,1023,0.021f,0.25f,0.000f,5000.0f,250.0f,80.0f,60.0f,0x3f}
#defineFMOD_PRESET_UNDERWATER{0,22,1.00f,-1000,-4000,0,1.49f,0.10f,1.0f,-449,0.007f,1700,0.011f,1.18f,0.348f,5000.0f,250.0f,100.0f,100.0f,0x3f}
#defineFMOD_PRESET_PSP_ROOM{0,1,0,0,0,0,0.0f,0.0f,0.0f,0,0.000f,0,0.000f,0.00f,0.000f,0000.0f,0.0f,0.0f,0.0f,0x31f}
#defineFMOD_PRESET_PSP_STUDIO_A{0,2,0,0,0,0,0.0f,0.0f,0.0f,0,0.000f,0,0.000f,0.00f,0.000f,0000.0f,0.0f,0.0f,0.0f,0x31f}
#defineFMOD_PRESET_PSP_STUDIO_B{0,3,0,0,0,0,0.0f,0.0f,0.0f,0,0.000f,0,0.000f,0.00f,0.000f,0000.0f,0.0f,0.0f,0.0f,0x31f}
#defineFMOD_PRESET_PSP_STUDIO_C{0,4,0,0,0,0,0.0f,0.0f,0.0f,0,0.000f,0,0.000f,0.00f,0.000f,0000.0f,0.0f,0.0f,0.0f,0x31f}
#defineFMOD_PRESET_PSP_HALL{0,5,0,0,0,0,0.0f,0.0f,0.0f,0,0.000f,0,0.000f,0.00f,0.000f,0000.0f,0.0f,0.0f,0.0f,0x31f}
#defineFMOD_PRESET_PSP_SPACE{0,6,0,0,0,0,0.0f,0.0f,0.0f,0,0.000f,0,0.000f,0.00f,0.000f,0000.0f,0.0f,0.0f,0.0f,0x31f}
#defineFMOD_PRESET_PSP_ECHO{0,7,0,0,0,0,0.0f,0.0f,0.0f,0,0.000f,0,0.000f,0.00f,0.000f,0000.0f,0.0f,0.0f,0.0f,0x31f}
#defineFMOD_PRESET_PSP_DELAY{0,8,0,0,0,0,0.0f,0.0f,0.0f,0,0.000f,0,0.000f,0.00f,0.000f,0000.0f,0.0f,0.0f,0.0f,0x31f}
#defineFMOD_PRESET_PSP_PIPE{0,9,0,0,0,0,0.0f,0.0f,0.0f,0,0.000f,0,0.000f,0.00f,0.000f,0000.0f,0.0f,0.0f,0.0f,0x31f}
Values
FMOD_PRESET_OFF
FMOD_PRESET_GENERIC
FMOD_PRESET_PADDEDCELL
FMOD_PRESET_ROOM
FMOD_PRESET_BATHROOM
FMOD_PRESET_LIVINGROOM
FMOD_PRESET_STONEROOM
FMOD_PRESET_AUDITORIUM
FMOD_PRESET_CONCERTHALL
FMOD_PRESET_CAVE
FMOD_PRESET_ARENA
FMOD_PRESET_HANGAR
FMOD_PRESET_CARPETTEDHALLWAY
FMOD_PRESET_HALLWAY
FMOD_PRESET_STONECORRIDOR
FMOD_PRESET_ALLEY
FMOD_PRESET_FOREST
FMOD_PRESET_CITY
FMOD_PRESET_MOUNTAINS
FMOD_PRESET_QUARRY
FMOD_PRESET_PLAIN
FMOD_PRESET_PARKINGLOT
FMOD_PRESET_SEWERPIPE
FMOD_PRESET_UNDERWATER
FMOD_PRESET_PSP_ROOM
FMOD_PRESET_PSP_STUDIO_A
FMOD_PRESET_PSP_STUDIO_B
FMOD_PRESET_PSP_STUDIO_C
FMOD_PRESET_PSP_HALL
FMOD_PRESET_PSP_SPACE
FMOD_PRESET_PSP_ECHO
FMOD_PRESET_PSP_DELAY
FMOD_PRESET_PSP_PIPE
SeeAlso
System::setReverbProperties
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_TIMEUNITListoftimetypesthatcanbereturnedbySound::getLengthandusedwithChannel::setPositionorChannel::getPosition.FMOD_TIMEUNIT_SENTENCE_MS,FMOD_TIMEUNIT_SENTENCE_PCM,FMOD_TIMEUNIT_SENTENCE_PCMBYTES,FMOD_TIMEUNIT_SENTENCEandFMOD_TIMEUNIT_SENTENCE_SUBSOUNDareonlysupportedbyChannelfunctions.DonotcombineflagsexceptFMOD_TIMEUNIT_BUFFERED.
Definition
#defineFMOD_TIMEUNIT_MS0x00000001
#defineFMOD_TIMEUNIT_PCM0x00000002
#defineFMOD_TIMEUNIT_PCMBYTES0x00000004
#defineFMOD_TIMEUNIT_RAWBYTES0x00000008
#defineFMOD_TIMEUNIT_PCMFRACTION0x00000010
#defineFMOD_TIMEUNIT_MODORDER0x00000100
#defineFMOD_TIMEUNIT_MODROW0x00000200
#defineFMOD_TIMEUNIT_MODPATTERN0x00000400
#defineFMOD_TIMEUNIT_SENTENCE_MS0x00010000
#defineFMOD_TIMEUNIT_SENTENCE_PCM0x00020000
#defineFMOD_TIMEUNIT_SENTENCE_PCMBYTES0x00040000
#defineFMOD_TIMEUNIT_SENTENCE0x00080000
#defineFMOD_TIMEUNIT_SENTENCE_SUBSOUND0x00100000
#defineFMOD_TIMEUNIT_BUFFERED0x10000000
Values
FMOD_TIMEUNIT_MS
Milliseconds.
FMOD_TIMEUNIT_PCM
PCMsamples,relatedtomilliseconds*samplerate/1000.
FMOD_TIMEUNIT_PCMBYTES
Bytes,relatedtoPCMsamples*channels*datawidth(ie16bit=2bytes).
FMOD_TIMEUNIT_RAWBYTES
Rawfilebytesof(compressed)sounddata(doesnotincludeheaders).OnlyusedbySound::getLengthandChannel::getPosition.
FMOD_TIMEUNIT_PCMFRACTION
Fractionsof1PCMsample.Unsignedintrange0to0xFFFFFFFF.Usedforsub-samplegranularityforDSPpurposes.
FMOD_TIMEUNIT_MODORDER
MOD/S3M/XM/IT.Orderinasequencedmoduleformat.UseSound::getFormattodeterminethePCMformatbeingdecodedto.
FMOD_TIMEUNIT_MODROW
MOD/S3M/XM/IT.Currentrowinasequencedmoduleformat.Sound::getLengthwillreturnthenumberofrowsinthecurrentlyplayingorseekedtopattern.
FMOD_TIMEUNIT_MODPATTERN
MOD/S3M/XM/IT.Currentpatterninasequencedmoduleformat.Sound::getLengthwillreturnthenumberofpatternsinthesongandChannel::getPositionwillreturnthecurrentlyplayingpattern.
FMOD_TIMEUNIT_SENTENCE_MS
Currentlyplayingsubsoundinasentencetimeinmilliseconds.
FMOD_TIMEUNIT_SENTENCE_PCM
CurrentlyplayingsubsoundinasentencetimeinPCMSamples,relatedtomilliseconds*samplerate/1000.
FMOD_TIMEUNIT_SENTENCE_PCMBYTES
Currentlyplayingsubsoundinasentencetimeinbytes,relatedtoPCMsamples
*channels*datawidth(ie16bit=2bytes).
FMOD_TIMEUNIT_SENTENCE
Currentlyplayingsentenceindexaccordingtothechannel.
FMOD_TIMEUNIT_SENTENCE_SUBSOUND
Currentlyplayingsubsoundindexinasentence.
FMOD_TIMEUNIT_BUFFERED
Timevalueasseenbybufferedstream.Thisisalwaysaheadofaudibletime,andisonlyusedforprocessing.
SeeAlso
Sound::getLengthChannel::setPositionChannel::getPosition
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EnumerationsFMOD_CHANNELINDEXFMOD_CHANNEL_CALLBACKTYPEFMOD_DELAYTYPEFMOD_DSP_CHORUSFMOD_DSP_COMPRESSORFMOD_DSP_DELAYFMOD_DSP_DISTORTIONFMOD_DSP_ECHOFMOD_DSP_FFT_WINDOWFMOD_DSP_FLANGEFMOD_DSP_HIGHPASSFMOD_DSP_HIGHPASS_SIMPLEFMOD_DSP_ITECHOFMOD_DSP_ITLOWPASSFMOD_DSP_LOWPASSFMOD_DSP_LOWPASS_SIMPLEFMOD_DSP_NORMALIZEFMOD_DSP_OSCILLATORFMOD_DSP_PARAMEQFMOD_DSP_PITCHSHIFTFMOD_DSP_RESAMPLERFMOD_DSP_SFXREVERBFMOD_DSP_TREMOLOFMOD_DSP_TYPEFMOD_EVENTPROPERTY_TYPEFMOD_OPENSTATEFMOD_OUTPUTTYPEFMOD_PLUGINTYPEFMOD_PSP_OUTPUTMODEFMOD_RESULTFMOD_SOUNDGROUP_BEHAVIORFMOD_SOUND_FORMATFMOD_SOUND_TYPEFMOD_SPEAKERFMOD_SPEAKERMAPTYPE
FMOD_SPEAKERMODEFMOD_SYSTEM_CALLBACKTYPEFMOD_TAGDATATYPEFMOD_TAGTYPEFMOD_THREAD
FirelightTechnologiesFMODEx
FMOD_CHANNELINDEXSpecialchannelindexvaluesforFMODfunctions.
Enumeration
typedefenum{
FMOD_CHANNEL_FREE,
FMOD_CHANNEL_REUSE
}FMOD_CHANNELINDEX;
Values
FMOD_CHANNEL_FREE
Forachannelindex,FMODchoosesafreevoiceusingtheprioritysystem.
FMOD_CHANNEL_REUSE
Forachannelindex,re-usethechannelhandlethatwaspassedin.
Remarks
Toget'all'ofthechannels,useSystem::getMasterChannelGroup.
SeeAlso
System::playSoundSystem::playDSPSystem::getChannelSystem::getMasterChannelGroup
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_CHANNEL_CALLBACKTYPEThesecallbacktypesareusedwithChannel::setCallback.
Enumeration
typedefenum{
FMOD_CHANNEL_CALLBACKTYPE_END,
FMOD_CHANNEL_CALLBACKTYPE_VIRTUALVOICE,
FMOD_CHANNEL_CALLBACKTYPE_SYNCPOINT,
FMOD_CHANNEL_CALLBACKTYPE_OCCLUSION,
FMOD_CHANNEL_CALLBACKTYPE_MAX
}FMOD_CHANNEL_CALLBACKTYPE;
Values
FMOD_CHANNEL_CALLBACKTYPE_END
Calledwhenasoundends.
FMOD_CHANNEL_CALLBACKTYPE_VIRTUALVOICE
Calledwhenavoiceisswappedoutorswappedin.
FMOD_CHANNEL_CALLBACKTYPE_SYNCPOINT
Calledwhenasyncpointisencountered.Canbefromwavfilemarkers.
FMOD_CHANNEL_CALLBACKTYPE_OCCLUSION
Calledwhenthechannelhasitsgeometryocclusionvaluecalculated.Canbeusedtoclamporchangethevalue.
FMOD_CHANNEL_CALLBACKTYPE_MAX
Maximumnumberofcallbacktypessupported.
Remarks
Eachcallbackhascommanddataparameterspassedasintuniquetothetypeofcallback.SeereferencetoFMOD_CHANNEL_CALLBACKtodeterminewhattheymightmeanforeachtypeofcallback.
Note!CurrentlytheusermustcallSystem::updateforthesecallbackstotrigger!
SeeAlso
Channel::setCallbackFMOD_CHANNEL_CALLBACKSystem::update
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DELAYTYPETypesofdelaythatcanbeusedwithChannel::setDelay/Channel::getDelay.
Enumeration
typedefenum{
FMOD_DELAYTYPE_END_MS,
FMOD_DELAYTYPE_DSPCLOCK_START,
FMOD_DELAYTYPE_DSPCLOCK_END,
FMOD_DELAYTYPE_DSPCLOCK_PAUSE,
FMOD_DELAYTYPE_MAX
}FMOD_DELAYTYPE;
Values
FMOD_DELAYTYPE_END_MS
Delayattheendofthesoundinmilliseconds.Usedelayhionly.Channel::isPlayingwillremaintrueuntilthisdelayhaspassedeventhoughthesounditselfhasstoppedplaying.
FMOD_DELAYTYPE_DSPCLOCK_START
TimethesoundstartedifChannel::getDelayisused,orifChannel::setDelayisused,thesoundwilldelayplayinguntilthisexacttick.
FMOD_DELAYTYPE_DSPCLOCK_END
Timethesoundshouldend.Ifthisisnon-zero,thechannelwillgosilentatthisexacttick.
FMOD_DELAYTYPE_DSPCLOCK_PAUSE
Timethesoundshouldpause.Ifthisisnon-zero,thechannelwillpauseatthisexacttick.
FMOD_DELAYTYPE_MAX
Maximumnumberoftagdatatypessupported.
Remarks
Ifyouhaven'tcalledChannel::setDelayyet,ifyoucallChannel::getDelaywithFMOD_DELAYTYPE_DSPCLOCK_STARTitwillreturntheequivalentglobalDSPclockvaluetodeterminewhenachannelstarted,sothatyoucanuseitforotherchannelstosyncagainst.
UseSystem::getDSPClocktoalsogetthecurrentdspclocktime,abaseforfuturecallstoChannel::setDelay.
UseFMOD_64BIT_ADDorFMOD_64BIT_SUBtoaddahi/locombinationtogetherandcopewithwraparound.IfFMOD_DELAYTYPE_END_MSisspecified,thevalueisnottreatedasa64bitnumber,justthedelayhivalueisusedanditistreatedasmilliseconds.
SeeAlso
Channel::setDelayChannel::getDelaySystem::getDSPClock
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_CHORUSParametertypesfortheFMOD_DSP_TYPE_CHORUSfilter.
Enumeration
typedefenum{
FMOD_DSP_CHORUS_DRYMIX,
FMOD_DSP_CHORUS_WETMIX1,
FMOD_DSP_CHORUS_WETMIX2,
FMOD_DSP_CHORUS_WETMIX3,
FMOD_DSP_CHORUS_DELAY,
FMOD_DSP_CHORUS_RATE,
FMOD_DSP_CHORUS_DEPTH
}FMOD_DSP_CHORUS;
Values
FMOD_DSP_CHORUS_DRYMIX
Volumeoforiginalsignaltopasstooutput.0.0to1.0.Default=0.5.
FMOD_DSP_CHORUS_WETMIX1
Volumeof1stchorustap.0.0to1.0.Default=0.5.
FMOD_DSP_CHORUS_WETMIX2
Volumeof2ndchorustap.Thistapis90degreesoutofphaseofthefirsttap.0.0to1.0.Default=0.5.
FMOD_DSP_CHORUS_WETMIX3
Volumeof3rdchorustap.Thistapis90degreesoutofphaseofthesecondtap.0.0to1.0.Default=0.5.
FMOD_DSP_CHORUS_DELAY
Chorusdelayinms.0.1to100.0.Default=40.0ms.
FMOD_DSP_CHORUS_RATE
Chorusmodulationrateinhz.0.0to20.0.Default=0.8hz.
FMOD_DSP_CHORUS_DEPTH
Chorusmodulationdepth.0.0to1.0.Default=0.03.
Remarks
Chrousisaneffectwherethesoundismore'spacious'dueto1to3versionsofthesoundbeingplayedalongsidetheoriginalsignalbutwiththepitchofeachcopymodulatingonasinewave.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_COMPRESSORParametertypesfortheFMOD_DSP_TYPE_COMPRESSORunit.Thisisasimplelinkedmultichannelsoftwarelimiterthatisuniformacrossthewholespectrum.
Enumeration
typedefenum{
FMOD_DSP_COMPRESSOR_THRESHOLD,
FMOD_DSP_COMPRESSOR_ATTACK,
FMOD_DSP_COMPRESSOR_RELEASE,
FMOD_DSP_COMPRESSOR_GAINMAKEUP
}FMOD_DSP_COMPRESSOR;
Values
FMOD_DSP_COMPRESSOR_THRESHOLD
Thresholdlevel(dB)intherangefrom-60through0.Thedefaultvalueis0.
FMOD_DSP_COMPRESSOR_ATTACK
Gainreductionattacktime(milliseconds),intherangefrom10through200.Thedefaultvalueis50.
FMOD_DSP_COMPRESSOR_RELEASE
Gainreductionreleasetime(milliseconds),intherangefrom20through1000.Thedefaultvalueis50.
FMOD_DSP_COMPRESSOR_GAINMAKEUP
Make-upgain(dB)appliedafterlimiting,intherangefrom0through30.Thedefaultvalueis0.
Remarks
Thelimiterisnotguaranteedtocatcheverypeakabovethethresholdlevel,becauseitcannotapplygainreductioninstantaneously-thetimedelayisdeterminedbytheattacktime.Howeversettingtheattacktimetooshortwilldistortthesound,soitisacompromise.Highlevelpeakscanbeavoidedbyusingashortattacktime-butnottooshort,andsettingthethresholdafewdecibelsbelowthecriticallevel.
SeeAlso
DSP::SetParameterDSP::GetParameterFMOD_DSP_TYPESystem::addDSP
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_DELAYParametertypesfortheFMOD_DSP_TYPE_DELAYfilter.
Enumeration
typedefenum{
FMOD_DSP_DELAY_CH0,
FMOD_DSP_DELAY_CH1,
FMOD_DSP_DELAY_CH2,
FMOD_DSP_DELAY_CH3,
FMOD_DSP_DELAY_CH4,
FMOD_DSP_DELAY_CH5,
FMOD_DSP_DELAY_CH6,
FMOD_DSP_DELAY_CH7,
FMOD_DSP_DELAY_CH8,
FMOD_DSP_DELAY_CH9,
FMOD_DSP_DELAY_CH10,
FMOD_DSP_DELAY_CH11,
FMOD_DSP_DELAY_CH12,
FMOD_DSP_DELAY_CH13,
FMOD_DSP_DELAY_CH14,
FMOD_DSP_DELAY_CH15,
FMOD_DSP_DELAY_MAXDELAY
}FMOD_DSP_DELAY;
Values
FMOD_DSP_DELAY_CH0
Channel#0Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH1
Channel#1Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH2
Channel#2Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH3
Channel#3Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH4
Channel#4Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH5
Channel#5Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH6
Channel#6Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH7
Channel#7Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH8
Channel#8Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH9
Channel#9Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH10
Channel#10Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH11
Channel#11Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH12
Channel#12Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH13
Channel#13Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH14
Channel#14Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_CH15
Channel#15Delayinms.0to10000.Default=0.
FMOD_DSP_DELAY_MAXDELAY
Maximumdelayinms.0to10000.Default=10.
Remarks
Note.EverytimeMaxDelayischanged,thepluginre-allocatesthedelaybuffer.Thismeansthedelaywilldissapearatthattimewhileitrefillsitsnewbuffer.AlargerMaxDelayresultsinlargeramountsofmemoryallocated.ChanneldelaysaboveMaxDelaywillbeclippedtoMaxDelayandthedelaybufferwillnotberesized.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_DISTORTIONParametertypesfortheFMOD_DSP_TYPE_DISTORTIONfilter.
Enumeration
typedefenum{
FMOD_DSP_DISTORTION_LEVEL
}FMOD_DSP_DISTORTION;
Values
FMOD_DSP_DISTORTION_LEVEL
Distortionvalue.0.0to1.0.Default=0.5.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_ECHOParametertypesfortheFMOD_DSP_TYPE_ECHOfilter.
Enumeration
typedefenum{
FMOD_DSP_ECHO_DELAY,
FMOD_DSP_ECHO_DECAYRATIO,
FMOD_DSP_ECHO_MAXCHANNELS,
FMOD_DSP_ECHO_DRYMIX,
FMOD_DSP_ECHO_WETMIX
}FMOD_DSP_ECHO;
Values
FMOD_DSP_ECHO_DELAY
Echodelayinms.10to5000.Default=500.
FMOD_DSP_ECHO_DECAYRATIO
Echodecayperdelay.0to1.1.0=Nodecay,0.0=totaldecay(iesimple1linedelay).Default=0.5.
FMOD_DSP_ECHO_MAXCHANNELS
Maximumchannelssupported.0to16.0=sameasfmod'sdefaultoutputpolyphony,1=mono,2=stereoetc.Seeremarksformore.Default=0.Itissuggestedtoleaveat0!
FMOD_DSP_ECHO_DRYMIX
Volumeoforiginalsignaltopasstooutput.0.0to1.0.Default=1.0.
FMOD_DSP_ECHO_WETMIX
Volumeofechosignaltopasstooutput.0.0to1.0.Default=1.0.
Remarks
Note.Everytimethedelayischanged,thepluginre-allocatestheechobuffer.Thismeanstheechowilldissapearatthattimewhileitrefillsitsnewbuffer.Largerechodelaysresultinlargeramountsofmemoryallocated.
'maxchannels'alsodictatestheamountofmemoryallocated.Bydefault,themaxchannelsvalueis0.IfFMODissettostereo,theechounitwillallocateenoughmemoryfor2channels.Ifitis5.1,itwillallocateenoughmemoryfora6channelecho,etc.Iftheechoeffectisonlyeverappliedtotheglobalmix(ieitwasaddedwithSystem::addDSP),then0isthevaluetosetasitwillbeenoughtohandleallspeakermodes.Whentheechoisaddedtoachannel(ieChannel::addDSP)thenthechannelcountthatcomesincouldbeanythingfrom1to8possibly.Itisonlyinthiscasewhereyoumightwanttoincreasethechannelcountabovetheoutput'schannelcount.Ifachannelechoissettoalowernumberthanthesound'schannelcountthatiscomingin,itwillnotechothesound.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_FFT_WINDOWListofwindowingmethodsusedinspectrumanalysistoreduceleakage/transientsignalsinteferingwiththeanalysis.Thisisaproblemwithanalysisofcontinuoussignalsthatonlyhaveasmallportionofthesignalsample(thefftwindowsize).Windowingthesignalwithacurveortriangletapersthesidesofthefftwindowtohelpalleviatethisproblem.
Enumeration
typedefenum{
FMOD_DSP_FFT_WINDOW_RECT,
FMOD_DSP_FFT_WINDOW_TRIANGLE,
FMOD_DSP_FFT_WINDOW_HAMMING,
FMOD_DSP_FFT_WINDOW_HANNING,
FMOD_DSP_FFT_WINDOW_BLACKMAN,
FMOD_DSP_FFT_WINDOW_BLACKMANHARRIS,
FMOD_DSP_FFT_WINDOW_MAX
}FMOD_DSP_FFT_WINDOW;
Values
FMOD_DSP_FFT_WINDOW_RECT
w[n]=1.0
FMOD_DSP_FFT_WINDOW_TRIANGLE
w[n]=TRI(2n/N)
FMOD_DSP_FFT_WINDOW_HAMMING
w[n]=0.54-(0.46*COS(n/N))
FMOD_DSP_FFT_WINDOW_HANNING
w[n]=0.5*(1.0-COS(n/N))
FMOD_DSP_FFT_WINDOW_BLACKMAN
w[n]=0.42-(0.5*COS(n/N))+(0.08*COS(2.0*n/N))
FMOD_DSP_FFT_WINDOW_BLACKMANHARRIS
w[n]=0.35875-(0.48829*COS(1.0*n/N))+(0.14128*COS(2.0*n/N))-(0.01168*COS(3.0*n/N))
FMOD_DSP_FFT_WINDOW_MAX
MaximumnumberofFFTwindowtypessupported.
Remarks
Cyclicsignalssuchasasinewavethatrepeattheircycleinamultipleofthewindowsizedonotneedwindowing.I.e.Ifthesinewaverepeatsevery1024,512,256etcsamplesandtheFMODfftwindowis1024,thenthesignalwouldnotneedwindowing.NotwindowingisthesameasFMOD_DSP_FFT_WINDOW_RECT,whichisthedefault.Ifthecycleofthesignal(iethesinewave)isnotamultipleofthewindowsize,itwillcausefrequencyabnormalities,soadifferentwindowingmethodisneeded.
FMOD_DSP_FFT_WINDOW_RECT.
FMOD_DSP_FFT_WINDOW_TRIANGLE.
FMOD_DSP_FFT_WINDOW_HAMMING.
FMOD_DSP_FFT_WINDOW_HANNING.
FMOD_DSP_FFT_WINDOW_BLACKMAN.
FMOD_DSP_FFT_WINDOW_BLACKMANHARRIS.
SeeAlso
System::getSpectrumChannel::getSpectrum
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_FLANGEParametertypesfortheFMOD_DSP_TYPE_FLANGEfilter.
Enumeration
typedefenum{
FMOD_DSP_FLANGE_DRYMIX,
FMOD_DSP_FLANGE_WETMIX,
FMOD_DSP_FLANGE_DEPTH,
FMOD_DSP_FLANGE_RATE
}FMOD_DSP_FLANGE;
Values
FMOD_DSP_FLANGE_DRYMIX
Volumeoforiginalsignaltopasstooutput.0.0to1.0.Default=0.45.
FMOD_DSP_FLANGE_WETMIX
Volumeofflangesignaltopasstooutput.0.0to1.0.Default=0.55.
FMOD_DSP_FLANGE_DEPTH
Flangedepth(percentageof40msdelay).0.01to1.0.Default=1.0.
FMOD_DSP_FLANGE_RATE
Flangespeedinhz.0.0to20.0.Default=0.1.
Remarks
Flangeisaneffectwherethesignalisplayedtwiceatthesametime,andonecopyslidesbackandforthcreatingawhooshingorflangingeffect.Asthereare2copiesofthesamesignal,bydefaulteachsignalisgiven50%mix,sothatthetotalisnotlouderthantheoriginalunaffectedsignal.
Flangedepthisapercentageofa10msshiftfromtheoriginalsignal.Anythingabove10msisnotconsideredflangebecausetotheearitbeginsto'echo'so10msisthehighestvaluepossible.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_HIGHPASSParametertypesfortheFMOD_DSP_TYPE_HIGHPASSfilter.
Enumeration
typedefenum{
FMOD_DSP_HIGHPASS_CUTOFF,
FMOD_DSP_HIGHPASS_RESONANCE
}FMOD_DSP_HIGHPASS;
Values
FMOD_DSP_HIGHPASS_CUTOFF
Highpasscutofffrequencyinhz.1.0tooutput22000.0.Default=5000.0.
FMOD_DSP_HIGHPASS_RESONANCE
HighpassresonanceQvalue.1.0to10.0.Default=1.0.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_HIGHPASS_SIMPLEParametertypesfortheFMOD_DSP_TYPE_HIGHPASS_SIMPLEfilter.Thisisaverysimplesingle-orderhighpassfilter.Theemphasisisonspeedratherthanaccuracy,sothisshouldnotbeusedfortaskrequiringcriticalfiltering.
Enumeration
typedefenum{
FMOD_DSP_HIGHPASS_SIMPLE_CUTOFF
}FMOD_DSP_HIGHPASS_SIMPLE;
Values
FMOD_DSP_HIGHPASS_SIMPLE_CUTOFF
Highpasscutofffrequencyinhz.10.0to22000.0.Default=1000.0
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_ITECHOParametertypesfortheFMOD_DSP_TYPE_ITECHOfilter.ThisiseffectivelyasoftwarebasedechofilterthatemulatestheDirectXDMOechoeffect.Impulsetrackerfilescansupportthis,andFMODwillproducetheeffectonANYplatform,notjustthosethatsupportDirectXeffects!
Enumeration
typedefenum{
FMOD_DSP_ITECHO_WETDRYMIX,
FMOD_DSP_ITECHO_FEEDBACK,
FMOD_DSP_ITECHO_LEFTDELAY,
FMOD_DSP_ITECHO_RIGHTDELAY,
FMOD_DSP_ITECHO_PANDELAY
}FMOD_DSP_ITECHO;
Values
FMOD_DSP_ITECHO_WETDRYMIX
Ratioofwet(processed)signaltodry(unprocessed)signal.Mustbeintherangefrom0.0through100.0(allwet).Thedefaultvalueis50.
FMOD_DSP_ITECHO_FEEDBACK
Percentageofoutputfedbackintoinput,intherangefrom0.0through100.0.Thedefaultvalueis50.
FMOD_DSP_ITECHO_LEFTDELAY
Delayforleftchannel,inmilliseconds,intherangefrom1.0through2000.0.Thedefaultvalueis500ms.
FMOD_DSP_ITECHO_RIGHTDELAY
Delayforrightchannel,inmilliseconds,intherangefrom1.0through2000.0.Thedefaultvalueis500ms.
FMOD_DSP_ITECHO_PANDELAY
Valuethatspecifieswhethertoswapleftandrightdelayswitheachsuccessiveecho.Thedefaultvalueiszero,meaningnoswap.Possiblevaluesaredefinedas0.0(equivalenttoFALSE)and1.0(equivalenttoTRUE).CURRENTLYNOTSUPPORTED.
Remarks
Note.Everytimethedelayischanged,thepluginre-allocatestheechobuffer.Thismeanstheechowilldissapearatthattimewhileitrefillsitsnewbuffer.Largerechodelaysresultinlargeramountsofmemoryallocated.
AsthisisastereofiltermademainlyforITplayback,itistargetedforstereosignals.WithmonosignalsonlytheFMOD_DSP_ITECHO_LEFTDELAYisused.Formultichannelsignals(>2)therewillbenoechoonthosechannels.
SeeAlso
DSP::SetParameterDSP::GetParameterFMOD_DSP_TYPESystem::addDSP
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_ITLOWPASSParametertypesfortheFMOD_DSP_TYPE_ITLOWPASSfilter.ThisisdifferenttothedefaultFMOD_DSP_TYPE_ITLOWPASSfilterinthatitusesadifferentqualityalgorithmandisthefilterusedtoproducethecorrectsoundingplaybackin.ITfiles.FMODEx's.ITplaybackusesthisfilter.
Enumeration
typedefenum{
FMOD_DSP_ITLOWPASS_CUTOFF,
FMOD_DSP_ITLOWPASS_RESONANCE
}FMOD_DSP_ITLOWPASS;
Values
FMOD_DSP_ITLOWPASS_CUTOFF
Lowpasscutofffrequencyinhz.1.0to22000.0.Default=5000.0/
FMOD_DSP_ITLOWPASS_RESONANCE
LowpassresonanceQvalue.0.0to127.0.Default=1.0.
Remarks
Note!Thisfilteractuallyhasalimitedcutofffrequencybelowthespecifiedmaximum,duetoitslimiteddesign,soforamoreopenrangefilteruseFMOD_DSP_LOWPASSorifyoudon'tmindnothavingresonance,FMOD_DSP_LOWPASS_SIMPLE.Theeffectivemaximumcutoffisabout8060hz.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_LOWPASSParametertypesfortheFMOD_DSP_TYPE_LOWPASSfilter.
Enumeration
typedefenum{
FMOD_DSP_LOWPASS_CUTOFF,
FMOD_DSP_LOWPASS_RESONANCE
}FMOD_DSP_LOWPASS;
Values
FMOD_DSP_LOWPASS_CUTOFF
Lowpasscutofffrequencyinhz.10.0to22000.0.Default=5000.0.
FMOD_DSP_LOWPASS_RESONANCE
LowpassresonanceQvalue.1.0to10.0.Default=1.0.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_LOWPASS_SIMPLEParametertypesfortheFMOD_DSP_TYPE_LOWPASS_SIMPLEfilter.Thisisaverysimplelowpassfilter,basedontwosingle-poleRCtime-constantmodules.Theemphasisisonspeedratherthanaccuracy,sothisshouldnotbeusedfortaskrequiringcriticalfiltering.
Enumeration
typedefenum{
FMOD_DSP_LOWPASS_SIMPLE_CUTOFF
}FMOD_DSP_LOWPASS_SIMPLE;
Values
FMOD_DSP_LOWPASS_SIMPLE_CUTOFF
Lowpasscutofffrequencyinhz.10.0to22000.0.Default=5000.0
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_NORMALIZEParametertypesfortheFMOD_DSP_TYPE_NORMALIZEfilter.
Enumeration
typedefenum{
FMOD_DSP_NORMALIZE_FADETIME,
FMOD_DSP_NORMALIZE_THRESHHOLD,
FMOD_DSP_NORMALIZE_MAXAMP
}FMOD_DSP_NORMALIZE;
Values
FMOD_DSP_NORMALIZE_FADETIME
Timetorampthesilencetofullinms.0.0to20000.0.Default=5000.0.
FMOD_DSP_NORMALIZE_THRESHHOLD
Lowervolumerangethresholdtoignore.0.0to1.0.Default=0.1.Raisehighertostopamplificationofveryquietsignals.
FMOD_DSP_NORMALIZE_MAXAMP
Maximumamplificationallowed.1.0to100000.0.Default=20.0.1.0=noamplifaction,highervaluesallowmoreboost.
Remarks
Normalizeamplifiesthesoundbasedonthemaximumpeakswithinthesignal.Forexampleifthemaximumpeaksinthesignalwere50%ofthebandwidth,itwouldscalethewholesoundby2.Thelowerthresholdvaluemakesthenormalizerignorespeaksbelowacertainpoint,toavoidover-amplificationifaloudsignalsuddenlycamein,andalsotoavoidamplifyingtomaximumthingslikebackgroundhiss.
BecauseFMODisarealtimeaudioprocessor,itdoesn'thavetheluxuryofknowingthepeakforthewholesound(ieitcan'tseeintothefuture),soithastoprocessdataasitcomesin.Toavoidverysuddenchangesinvolumelevelbasedonsmallsamplesofnewdata,fmodfadestowardsthedesiredamplificationwhichmakesforsmoothgaincontrol.Thefadetimeparametercancontrolthis.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_OSCILLATORParametertypesfortheFMOD_DSP_TYPE_OSCILLATORfilter.
Enumeration
typedefenum{
FMOD_DSP_OSCILLATOR_TYPE,
FMOD_DSP_OSCILLATOR_RATE
}FMOD_DSP_OSCILLATOR;
Values
FMOD_DSP_OSCILLATOR_TYPE
Waveformtype.0=sine.1=square.2=sawup.3=sawdown.4=triangle.5=noise.
FMOD_DSP_OSCILLATOR_RATE
Frequencyofthesinewaveinhz.1.0to22000.0.Default=220.0.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_PARAMEQParametertypesfortheFMOD_DSP_TYPE_PARAMEQfilter.
Enumeration
typedefenum{
FMOD_DSP_PARAMEQ_CENTER,
FMOD_DSP_PARAMEQ_BANDWIDTH,
FMOD_DSP_PARAMEQ_GAIN
}FMOD_DSP_PARAMEQ;
Values
FMOD_DSP_PARAMEQ_CENTER
Frequencycenter.20.0to22000.0.Default=8000.0.
FMOD_DSP_PARAMEQ_BANDWIDTH
Octaverangearoundthecenterfrequencytofilter.0.2to5.0.Default=1.0.
FMOD_DSP_PARAMEQ_GAIN
FrequencyGain.0.05to3.0.Default=1.0.
Remarks
ParametricEQisabandpassfilterthatattenuatesoramplifiesaselectedfrequencyanditsneighbouringfrequencies.
Tocreateamulti-bandEQcreatemultipleFMOD_DSP_TYPE_PARAMEQunitsandseteachunittodifferentfrequencies,forexample1000hz,2000hz,4000hz,8000hz,16000hzwitharangeof1octaveeach.
Whenafrequencyhasitsgainsetto1.0,thesoundwillbeunaffectedandrepresentstheoriginalsignalexactly.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_PITCHSHIFTParametertypesfortheFMOD_DSP_TYPE_PITCHSHIFTfilter.
Enumeration
typedefenum{
FMOD_DSP_PITCHSHIFT_PITCH,
FMOD_DSP_PITCHSHIFT_FFTSIZE,
FMOD_DSP_PITCHSHIFT_OVERLAP,
FMOD_DSP_PITCHSHIFT_MAXCHANNELS
}FMOD_DSP_PITCHSHIFT;
Values
FMOD_DSP_PITCHSHIFT_PITCH
Pitchvalue.0.5to2.0.Default=1.0.0.5=oneoctavedown,2.0=oneoctaveup.1.0doesnotchangethepitch.
FMOD_DSP_PITCHSHIFT_FFTSIZE
FFTwindowsize.256,512,1024,2048,4096.Default=1024.Increasethistoreduce'smearing'.Thiseffectisawarblingsoundsimilartowhenanmp3isencodedatverylowbitrates.
FMOD_DSP_PITCHSHIFT_OVERLAP
Removed.Donotuse.FMODnowuses4overlapsandcannotbechanged.
FMOD_DSP_PITCHSHIFT_MAXCHANNELS
Maximumchannelssupported.0to16.0=sameasfmod'sdefaultoutputpolyphony,1=mono,2=stereoetc.Seeremarksformore.Default=0.Itissuggestedtoleaveat0!
Remarks
Thispitchshiftingunitcanbeusedtochangethepitchofasoundwithoutspeedingituporslowingitdown.Itcanalsobeusedfortimestretchingorscaling,forexampleifthepitchwasdoubled,andthefrequencyofthesoundwashalved,thepitchofthesoundwouldsoundcorrectbutitwouldbetwiceasslow.
Warning!Thisfilterisverycomputationallyexpensive!Similartoavocoder,itrequiresseveraloverlappingFFTandIFFT'stoproducesmoothoutput,andcanrequirearound440mhzfor1stereo48khzsignalusingthedefaultsettings.Reducingthesignaltomonowillhalfthecpuusage.Reducingthiswillloweraudioquality,butwhatsettingstousearelargelydependantonthesoundbeingplayed.Anoisypolyphonicsignalwillneedhigherfftsizecomparedtoaspeakingvoiceforexample.
Thispitchshifterisbasedonthepitchshiftercodeathttp://www.dspdimension.com,writtenbyStephanM.Bernsee.TheoriginalcodeisCOPYRIGHT1999-2003StephanM.Bernsee.
'maxchannels'dictatestheamountofmemoryallocated.Bydefault,themaxchannelsvalueis0.IfFMODissettostereo,thepitchshiftunitwillallocateenoughmemoryfor2channels.Ifitis5.1,itwillallocateenoughmemoryfora6channelpitchshift,etc.Ifthepitchshifteffectisonlyeverappliedtotheglobalmix(ieitwasaddedwithSystem::addDSP),then0isthevaluetosetasitwillbeenoughtohandleallspeakermodes.Whenthepitchshiftisaddedtoachannel(ieChannel::addDSP)thenthechannelcountthatcomesincouldbeanythingfrom1to8possibly.Itisonlyinthiscasewhereyoumightwanttoincreasethechannelcountabovetheoutput'schannelcount.Ifachannelpitchshiftissettoalowernumberthanthesound'schannelcountthatiscomingin,itwillnotpitchshiftthesound.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_RESAMPLERListofinterpolationtypesthattheFMODExsoftwaremixersupports.
Enumeration
typedefenum{
FMOD_DSP_RESAMPLER_NOINTERP,
FMOD_DSP_RESAMPLER_LINEAR,
FMOD_DSP_RESAMPLER_CUBIC,
FMOD_DSP_RESAMPLER_SPLINE,
FMOD_DSP_RESAMPLER_MAX
}FMOD_DSP_RESAMPLER;
Values
FMOD_DSP_RESAMPLER_NOINTERP
Nointerpolation.Highfrequencyaliasinghisswillbeaudibledependingonthesamplerateofthesound.
FMOD_DSP_RESAMPLER_LINEAR
Linearinterpolation(defaultmethod).Fastandgoodquality,causesveryslightlowpasseffectonlowfrequencysounds.
FMOD_DSP_RESAMPLER_CUBIC
Cubicinterpolation.Slowerthanlinearinterpolationbutbetterquality.
FMOD_DSP_RESAMPLER_SPLINE
5pointsplineinterpolation.Slowestresamplingmethodbutbestquality.
FMOD_DSP_RESAMPLER_MAX
Maximumnumberofresamplemethodssupported.
Remarks
ThedefaultresamplertypeisFMOD_DSP_RESAMPLER_LINEAR.UseSystem::setSoftwareFormattotellFMODtheresamplingqualityyourequireforFMOD_SOFTWAREbasedsounds.
SeeAlso
System::setSoftwareFormatSystem::getSoftwareFormat
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_SFXREVERBParametertypesfortheFMOD_DSP_TYPE_SFXREVERBunit.
Enumeration
typedefenum{
FMOD_DSP_SFXREVERB_DRYLEVEL,
FMOD_DSP_SFXREVERB_ROOM,
FMOD_DSP_SFXREVERB_ROOMHF,
FMOD_DSP_SFXREVERB_DECAYTIME,
FMOD_DSP_SFXREVERB_DECAYHFRATIO,
FMOD_DSP_SFXREVERB_REFLECTIONSLEVEL,
FMOD_DSP_SFXREVERB_REFLECTIONSDELAY,
FMOD_DSP_SFXREVERB_REVERBLEVEL,
FMOD_DSP_SFXREVERB_REVERBDELAY,
FMOD_DSP_SFXREVERB_DIFFUSION,
FMOD_DSP_SFXREVERB_DENSITY,
FMOD_DSP_SFXREVERB_HFREFERENCE,
FMOD_DSP_SFXREVERB_ROOMLF,
FMOD_DSP_SFXREVERB_LFREFERENCE
}FMOD_DSP_SFXREVERB;
Values
FMOD_DSP_SFXREVERB_DRYLEVEL
DryLevel:MixlevelofdrysignalinoutputinmB.Rangesfrom-10000.0to0.0.Defaultis0.
FMOD_DSP_SFXREVERB_ROOM
Room:RoomeffectlevelatlowfrequenciesinmB.Rangesfrom-10000.0to0.0.Defaultis-10000.0.
FMOD_DSP_SFXREVERB_ROOMHF
RoomHF:Roomeffecthigh-frequencylevelre.lowfrequencylevelinmB.Rangesfrom-10000.0to0.0.Defaultis0.0.
FMOD_DSP_SFXREVERB_DECAYTIME
DecayTime:Reverberationdecaytimeatlow-frequenciesinseconds.Rangesfrom0.1to20.0.Defaultis1.0.
FMOD_DSP_SFXREVERB_DECAYHFRATIO
DecayHFRatio:High-frequencytolow-frequencydecaytimeratio.Rangesfrom0.1to2.0.Defaultis0.5.
FMOD_DSP_SFXREVERB_REFLECTIONSLEVEL
Reflections:EarlyreflectionslevelrelativetoroomeffectinmB.Rangesfrom-10000.0to1000.0.Defaultis-10000.0.
FMOD_DSP_SFXREVERB_REFLECTIONSDELAY
ReflectDelay:Delaytimeoffirstreflectioninseconds.Rangesfrom0.0to0.3.Defaultis0.02.
FMOD_DSP_SFXREVERB_REVERBLEVEL
Reverb:LatereverberationlevelrelativetoroomeffectinmB.Rangesfrom-10000.0to2000.0.Defaultis0.0.
FMOD_DSP_SFXREVERB_REVERBDELAY
ReverbDelay:Latereverberationdelaytimerelativetofirstreflectioninseconds.Rangesfrom0.0to0.1.Defaultis0.04.
FMOD_DSP_SFXREVERB_DIFFUSION
Diffusion:Reverberationdiffusion(echodensity)inpercent.Rangesfrom0.0to100.0.Defaultis100.0.
FMOD_DSP_SFXREVERB_DENSITY
Density:Reverberationdensity(modaldensity)inpercent.Rangesfrom0.0to100.0.Defaultis100.0.
FMOD_DSP_SFXREVERB_HFREFERENCE
HFReference:ReferencehighfrequencyinHz.Rangesfrom20.0to20000.0.Defaultis5000.0.
FMOD_DSP_SFXREVERB_ROOMLF
RoomLF:Roomeffectlow-frequencylevelinmB.Rangesfrom-10000.0to0.0.Defaultis0.0.
FMOD_DSP_SFXREVERB_LFREFERENCE
LFReference:Referencelow-frequencyinHz.Rangesfrom20.0to1000.0.Defaultis250.0.
Remarks
ThisisahighqualityI3DL2basedreverb.OntopoftheI3DL2propertyset,"DryLevel"isalsoincludedtoallowthedrymixtobechanged.
ThesepropertiescanbesetwithpresetsinFMOD_REVERB_PRESETS.
SeeAlso
DSP::SetParameterDSP::GetParameterFMOD_DSP_TYPESystem::addDSPFMOD_REVERB_PRESETS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_TREMOLOParametertypesfortheFMOD_DSP_TYPE_TREMOLOfilter.
Enumeration
typedefenum{
FMOD_DSP_TREMOLO_FREQUENCY,
FMOD_DSP_TREMOLO_DEPTH,
FMOD_DSP_TREMOLO_SHAPE,
FMOD_DSP_TREMOLO_SKEW,
FMOD_DSP_TREMOLO_DUTY,
FMOD_DSP_TREMOLO_SQUARE,
FMOD_DSP_TREMOLO_PHASE,
FMOD_DSP_TREMOLO_SPREAD
}FMOD_DSP_TREMOLO;
Values
FMOD_DSP_TREMOLO_FREQUENCY
LFOfrequencyinHz.0.1to20.Default=4.
FMOD_DSP_TREMOLO_DEPTH
Tremolodepth.0to1.Default=0.
FMOD_DSP_TREMOLO_SHAPE
LFOshapemorphbetweentriangleandsine.0to1.Default=0.
FMOD_DSP_TREMOLO_SKEW
Time-skewingofLFOcycle.-1to1.Default=0.
FMOD_DSP_TREMOLO_DUTY
LFOon-time.0to1.Default=0.5.
FMOD_DSP_TREMOLO_SQUARE
FlatnessoftheLFOshape.0to1.Default=0.
FMOD_DSP_TREMOLO_PHASE
InstantaneousLFOphase.0to1.Default=0.
FMOD_DSP_TREMOLO_SPREAD
Rotation/auto-paneffect.-1to1.Default=0.
Remarks
Thetremoloeffectvariestheamplitudeofasound.Dependingonthesettings,thisunitcanproduceatremolo,chopperorauto-paneffect.
TheshapeoftheLFO(lowfreq.oscillator)canmorphedbetweensine,triangleandsawtoothwavesusingtheFMOD_DSP_TREMOLO_SHAPEandFMOD_DSP_TREMOLO_SKEWparameters.FMOD_DSP_TREMOLO_DUTYandFMOD_DSP_TREMOLO_SQUAREareusefulforachopper-typeeffectwherethefirstcontrolstheon-timedurationandsecondcontrolstheflatnessoftheenvelope.FMOD_DSP_TREMOLO_SPREADvariestheLFOphasebetweenchannelstogetanauto-paneffect.ThisworksbestwithasineshapeLFO.TheLFOcanbesynchronizedusingtheFMOD_DSP_TREMOLO_PHASEparameterwhichsetsitsinstantaneousphase.
SeeAlso
DSP::setParameterDSP::getParameterFMOD_DSP_TYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_DSP_TYPEThesedefinitionscanbeusedforcreatingFMODdefinedspecialeffectsorDSPunits.
Enumeration
typedefenum{
FMOD_DSP_TYPE_UNKNOWN,
FMOD_DSP_TYPE_MIXER,
FMOD_DSP_TYPE_OSCILLATOR,
FMOD_DSP_TYPE_LOWPASS,
FMOD_DSP_TYPE_ITLOWPASS,
FMOD_DSP_TYPE_HIGHPASS,
FMOD_DSP_TYPE_ECHO,
FMOD_DSP_TYPE_FLANGE,
FMOD_DSP_TYPE_DISTORTION,
FMOD_DSP_TYPE_NORMALIZE,
FMOD_DSP_TYPE_PARAMEQ,
FMOD_DSP_TYPE_PITCHSHIFT,
FMOD_DSP_TYPE_CHORUS,
FMOD_DSP_TYPE_VSTPLUGIN,
FMOD_DSP_TYPE_WINAMPPLUGIN,
FMOD_DSP_TYPE_ITECHO,
FMOD_DSP_TYPE_COMPRESSOR,
FMOD_DSP_TYPE_SFXREVERB,
FMOD_DSP_TYPE_LOWPASS_SIMPLE,
FMOD_DSP_TYPE_DELAY,
FMOD_DSP_TYPE_TREMOLO,
FMOD_DSP_TYPE_LADSPAPLUGIN,
FMOD_DSP_TYPE_HIGHPASS_SIMPLE,
FMOD_DSP_TYPE_HARDWARE
}FMOD_DSP_TYPE;
Values
FMOD_DSP_TYPE_UNKNOWN
ThisunitwascreatedviaanonFMODpluginsohasanunknownpurpose.
FMOD_DSP_TYPE_MIXER
Thisunitdoesnothingbuttakeinputsandmixthemtogetherthenfeedtheresult
tothesoundcardunit.
FMOD_DSP_TYPE_OSCILLATOR
Thisunitgeneratessine/square/saw/triangleornoisetones.
FMOD_DSP_TYPE_LOWPASS
Thisunitfilterssoundusingahighquality,resonantlowpassfilteralgorithmbutconsumesmoreCPUtime.
FMOD_DSP_TYPE_ITLOWPASS
ThisunitfilterssoundusingaresonantlowpassfilteralgorithmthatisusedinImpulseTracker,butwithlimitedcutoffrange(0to8060hz).
FMOD_DSP_TYPE_HIGHPASS
Thisunitfilterssoundusingaresonanthighpassfilteralgorithm.
FMOD_DSP_TYPE_ECHO
Thisunitproducesanechoonthesoundandfadesoutatthedesiredrate.
FMOD_DSP_TYPE_FLANGE
Thisunitproducesaflangeeffectonthesound.
FMOD_DSP_TYPE_DISTORTION
Thisunitdistortsthesound.
FMOD_DSP_TYPE_NORMALIZE
Thisunitnormalizesoramplifiesthesoundtoacertainlevel.
FMOD_DSP_TYPE_PARAMEQ
Thisunitattenuatesoramplifiesaselectedfrequencyrange.
FMOD_DSP_TYPE_PITCHSHIFT
Thisunitbendsthepitchofasoundwithoutchangingthespeedofplayback.
FMOD_DSP_TYPE_CHORUS
Thisunitproducesachoruseffectonthesound.
FMOD_DSP_TYPE_VSTPLUGIN
ThisunitallowstheuseofSteinbergVSTplugins
FMOD_DSP_TYPE_WINAMPPLUGIN
ThisunitallowstheuseofNullsoftWinampplugins
FMOD_DSP_TYPE_ITECHO
ThisunitproducesanechoonthesoundandfadesoutatthedesiredrateasisusedinImpulseTracker.
FMOD_DSP_TYPE_COMPRESSOR
Thisunitimplementsdynamiccompression(linkedmultichannel,wideband)
FMOD_DSP_TYPE_SFXREVERB
ThisunitimplementsSFXreverb
FMOD_DSP_TYPE_LOWPASS_SIMPLE
Thisunitfilterssoundusingasimplelowpasswithnoresonance,buthasflexiblecutoffandisfast.
FMOD_DSP_TYPE_DELAY
Thisunitproducesdifferentdelaysonindividualchannelsofthesound.
FMOD_DSP_TYPE_TREMOLO
Thisunitproducesatremolo/choppereffectonthesound.
FMOD_DSP_TYPE_LADSPAPLUGIN
ThisunitallowstheuseofLADSPAstandardplugins.
FMOD_DSP_TYPE_HIGHPASS_SIMPLE
Thisunitfilterssoundusingasimplehighpasswithnoresonance,buthasflexiblecutoffandisfast.
FMOD_DSP_TYPE_HARDWARE
OffsetthatplatformspecificFMOD_HARDWAREDSPswillstartat.
Remarks
Togetthemtobeactive,firstcreatetheunit,thenadditsomewhereintotheDSPnetwork,eitheratthefrontofthenetworknearthesoundcardunittoaffecttheglobaloutput(byusingSystem::getDSPHead),oronasinglechannel(usingChannel::getDSPHead).
SeeAlso
System::createDSPByType
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OPENSTATEThesevaluesdescribewhatstateasoundisinafterFMOD_NONBLOCKINGhasbeenusedtoopenit.
Enumeration
typedefenum{
FMOD_OPENSTATE_READY,
FMOD_OPENSTATE_LOADING,
FMOD_OPENSTATE_ERROR,
FMOD_OPENSTATE_CONNECTING,
FMOD_OPENSTATE_BUFFERING,
FMOD_OPENSTATE_SEEKING,
FMOD_OPENSTATE_PLAYING,
FMOD_OPENSTATE_SETPOSITION,
FMOD_OPENSTATE_MAX
}FMOD_OPENSTATE;
Values
FMOD_OPENSTATE_READY
Openedandreadytoplay.
FMOD_OPENSTATE_LOADING
Initialloadinprogress.
FMOD_OPENSTATE_ERROR
Failedtoopen-filenotfound,outofmemoryetc.SeereturnvalueofSound::getOpenStateforwhathappened.
FMOD_OPENSTATE_CONNECTING
Connectingtoremotehost(internetsoundsonly).
FMOD_OPENSTATE_BUFFERING
Bufferingdata.
FMOD_OPENSTATE_SEEKING
Seekingtosubsoundandre-flushingstreambuffer.
FMOD_OPENSTATE_PLAYING
Readyandplaying,butnotpossibletoreleaseatthistimewithoutstallingthemainthread.
FMOD_OPENSTATE_SETPOSITION
Seekingwithinastreamtoadifferentposition.
FMOD_OPENSTATE_MAX
Maximumnumberofopenstatetypes.
Remarks
Withstreams,ifyouareusingFMOD_NONBLOCKING,notethatiftheusercallsSound::getSubSound,astreamwillgointoFMOD_OPENSTATE_SEEKINGstateandsoundrelatedcommandswillreturnFMOD_ERR_NOTREADY.Withstreams,ifyouareusingFMOD_NONBLOCKING,notethatiftheusercallsChannel::getPosition,astreamwillgointoFMOD_OPENSTATE_SETPOSITIONstateandsoundrelatedcommandswillreturnFMOD_ERR_NOTREADY.
SeeAlso
Sound::getOpenStateFMOD_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_OUTPUTTYPETheseoutputtypesareusedwithSystem::setOutput/System::getOutput,tochoosewhichoutputmethodtouse.
Enumeration
typedefenum{
FMOD_OUTPUTTYPE_AUTODETECT,
FMOD_OUTPUTTYPE_UNKNOWN,
FMOD_OUTPUTTYPE_NOSOUND,
FMOD_OUTPUTTYPE_WAVWRITER,
FMOD_OUTPUTTYPE_NOSOUND_NRT,
FMOD_OUTPUTTYPE_WAVWRITER_NRT,
FMOD_OUTPUTTYPE_DSOUND,
FMOD_OUTPUTTYPE_WINMM,
FMOD_OUTPUTTYPE_WASAPI,
FMOD_OUTPUTTYPE_ASIO,
FMOD_OUTPUTTYPE_OSS,
FMOD_OUTPUTTYPE_ALSA,
FMOD_OUTPUTTYPE_ESD,
FMOD_OUTPUTTYPE_PULSEAUDIO,
FMOD_OUTPUTTYPE_COREAUDIO,
FMOD_OUTPUTTYPE_XBOX360,
FMOD_OUTPUTTYPE_PSP,
FMOD_OUTPUTTYPE_PS3,
FMOD_OUTPUTTYPE_NGP,
FMOD_OUTPUTTYPE_WII,
FMOD_OUTPUTTYPE_3DS,
FMOD_OUTPUTTYPE_AUDIOTRACK,
FMOD_OUTPUTTYPE_OPENSL,
FMOD_OUTPUTTYPE_NACL,
FMOD_OUTPUTTYPE_WIIU,
FMOD_OUTPUTTYPE_ASOUND,
FMOD_OUTPUTTYPE_MAX
}FMOD_OUTPUTTYPE;
Values
FMOD_OUTPUTTYPE_AUTODETECT
Picksthebestoutputmodefortheplatform.Thisisthedefault.
FMOD_OUTPUTTYPE_UNKNOWN
All-3rdpartyplugin,unknown.ThisisforusewithSystem::getOutputonly.
FMOD_OUTPUTTYPE_NOSOUND
All-Allcallsinthismodesucceedbutmakenosound.
FMOD_OUTPUTTYPE_WAVWRITER
All-Writesoutputtofmodoutput.wavbydefault.Usethe'extradriverdata'parameterinSystem::init,bysimplypassingthefilenameasastring,tosetthewavfilename.
FMOD_OUTPUTTYPE_NOSOUND_NRT
All-Non-realtimeversionofFMOD_OUTPUTTYPE_NOSOUND.UsercandrivemixerwithSystem::updateatwhateverratetheywant.
FMOD_OUTPUTTYPE_WAVWRITER_NRT
All-Non-realtimeversionofFMOD_OUTPUTTYPE_WAVWRITER.UsercandrivemixerwithSystem::updateatwhateverratetheywant.
FMOD_OUTPUTTYPE_DSOUND
Win32/Win64-DirectSoundoutput.(DefaultonWindowsXPandbelow)
FMOD_OUTPUTTYPE_WINMM
Win32/Win64-WindowsMultimediaoutput.
FMOD_OUTPUTTYPE_WASAPI
Win32-WindowsAudioSessionAPI.(DefaultonWindowsVistaandabove)
FMOD_OUTPUTTYPE_ASIO
Win32-LowlatencyASIO2.0driver.
FMOD_OUTPUTTYPE_OSS
Linux/Linux64-OpenSoundSystemoutput.(DefaultonLinux,thirdpreference)
FMOD_OUTPUTTYPE_ALSA
Linux/Linux64-AdvancedLinuxSoundArchitectureoutput.(DefaultonLinux,secondpreferenceifavailable)
FMOD_OUTPUTTYPE_ESD
Linux/Linux64-EnlightmentSoundDaemonoutput.
FMOD_OUTPUTTYPE_PULSEAUDIO
Linux/Linux64-PulseAudiooutput.(DefaultonLinux,firstpreferenceifavailable)
FMOD_OUTPUTTYPE_COREAUDIO
Mac-MacintoshCoreAudiooutput.(DefaultonMac)
FMOD_OUTPUTTYPE_XBOX360
Xbox360-NativeXbox360output.(DefaultonXbox360)
FMOD_OUTPUTTYPE_PSP
PSP-NativePSPoutput.(DefaultonPSP)
FMOD_OUTPUTTYPE_PS3
PS3-NativePS3output.(DefaultonPS3)
FMOD_OUTPUTTYPE_NGP
NGP-NativeNGPoutput.(DefaultonNGP)
FMOD_OUTPUTTYPE_WII
Wii-NativeWiioutput.(DefaultonWii)
FMOD_OUTPUTTYPE_3DS
3DS-Native3DSoutput(Defaulton3DS)
FMOD_OUTPUTTYPE_AUDIOTRACK
Android-JavaAudioTrackoutput.(DefaultonAndroid2.2andbelow)
FMOD_OUTPUTTYPE_OPENSL
Android-OpenSLESoutput.(DefaultonAndroid2.3andabove)
FMOD_OUTPUTTYPE_NACL
NativeClient-NativeClientoutput.(DefaultonNativeClient)
FMOD_OUTPUTTYPE_WIIU
WiiU-NativeWiiUoutput.(DefaultonWiiU)
FMOD_OUTPUTTYPE_ASOUND
BlackBerry-NativeBlackBerryasoundoutput.(DefaultonBlackBerry)
FMOD_OUTPUTTYPE_MAX
Maximumnumberofoutputtypessupported.
Remarks
TopassinformationtothedriverwheninitializingfmodusetheextradriverdataparameterinSystem::initforthefollowingreasons.
FMOD_OUTPUTTYPE_WAVWRITER-extradriverdataisapointertoachar*filenamethatthewavwriterwilloutputto.FMOD_OUTPUTTYPE_WAVWRITER_NRT-extradriverdataisapointerto
achar*filenamethatthewavwriterwilloutputto.FMOD_OUTPUTTYPE_DSOUND-extradriverdataisapointertoaHWND
sothatFMODcansetthefocusontheaudioforaparticularwindow.
FMOD_OUTPUTTYPE_PS3-extradriverdataisapointertoaFMOD_PS3_EXTRADRIVERDATAstruct.Thiscanbefoundinfmodps3.h.FMOD_OUTPUTTYPE_GC-extradriverdataisapointertoa
FMOD_GC_INFOstruct.Thiscanbefoundinfmodgc.h.FMOD_OUTPUTTYPE_WII-extradriverdataisapointertoa
FMOD_WII_INFOstruct.Thiscanbefoundinfmodwii.h.FMOD_OUTPUTTYPE_ALSA-extradriverdataisapointertoa
FMOD_LINUX_EXTRADRIVERDATAstruct.Thiscanbefoundinfmodlinux.h.
CurrentlythesearetheonlyFMODdriversthattakeextrainformation.Otherunknownpluginsmayhavedifferentrequirements.
Note!IfFMOD_OUTPUTTYPE_WAVWRITER_NRTorFMOD_OUTPUTTYPE_NOSOUND_NRTareused,andiftheSystem::updatefunctionisbeingcalledveryquickly(ieforanonrealtimedecode)itmaybebeingcalledtooquicklyfortheFMODstreamerthreadtorespondto.Theresultwillbeaskipping/stutteringoutputinthecapturedaudio.
Toremedythis,disabletheFMODExstreamerthread,anduseFMOD_INIT_STREAM_FROM_UPDATEtoavoidskippingintheoutputstream,asitwilllockthemixerandthestreamertogetherinthesamethread.
SeeAlso
System::setOutputSystem::getOutputSystem::setSoftwareFormatSystem::getSoftwareFormatSystem::initSystem::updateFMOD_INITFLAGS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_PLUGINTYPETheseareplugintypesdefinedforusewiththeSystem::getNumPlugins,System::getPluginInfoandSystem::unloadPluginfunctions.
Enumeration
typedefenum{
FMOD_PLUGINTYPE_OUTPUT,
FMOD_PLUGINTYPE_CODEC,
FMOD_PLUGINTYPE_DSP,
FMOD_PLUGINTYPE_MAX
}FMOD_PLUGINTYPE;
Values
FMOD_PLUGINTYPE_OUTPUT
Theplugintypeisanoutputmodule.FMODmixedaudiowillplaythroughoneofthesedevices
FMOD_PLUGINTYPE_CODEC
Theplugintypeisafileformatcodec.FMODwillusethesecodecstoloadfileformatsforplayback.
FMOD_PLUGINTYPE_DSP
TheplugintypeisaDSPunit.FMODwillusethesepluginsaspartofitsDSPnetworktoapplyeffectstooutputorgeneratesoundinrealtime.
FMOD_PLUGINTYPE_MAX
Maximumnumberofplugintypessupported.
SeeAlso
System::getNumPluginsSystem::getPluginInfoSystem::unloadPlugin
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_PSP_OUTPUTMODEEnumeration
typedefenum{
FMOD_PSP_OUTPUTMODE_SIMPLEAUDIO,
FMOD_PSP_OUTPUTMODE_LIBWAVE
}FMOD_PSP_OUTPUTMODE;
Values
FMOD_PSP_OUTPUTMODE_SIMPLEAUDIO
SimpleAudioOutput(Default)
FMOD_PSP_OUTPUTMODE_LIBWAVE
libWave
SeeAlso
FMOD_PSP_ChangeOutputMode
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_RESULTerrorcodes.Returnedfromeveryfunction.
Enumeration
typedefenum{
FMOD_OK,
FMOD_ERR_ALREADYLOCKED,
FMOD_ERR_BADCOMMAND,
FMOD_ERR_CDDA_DRIVERS,
FMOD_ERR_CDDA_INIT,
FMOD_ERR_CDDA_INVALID_DEVICE,
FMOD_ERR_CDDA_NOAUDIO,
FMOD_ERR_CDDA_NODEVICES,
FMOD_ERR_CDDA_NODISC,
FMOD_ERR_CDDA_READ,
FMOD_ERR_CHANNEL_ALLOC,
FMOD_ERR_CHANNEL_STOLEN,
FMOD_ERR_COM,
FMOD_ERR_DMA,
FMOD_ERR_DSP_CONNECTION,
FMOD_ERR_DSP_FORMAT,
FMOD_ERR_DSP_NOTFOUND,
FMOD_ERR_DSP_RUNNING,
FMOD_ERR_DSP_TOOMANYCONNECTIONS,
FMOD_ERR_FILE_BAD,
FMOD_ERR_FILE_COULDNOTSEEK,
FMOD_ERR_FILE_DISKEJECTED,
FMOD_ERR_FILE_EOF,
FMOD_ERR_FILE_NOTFOUND,
FMOD_ERR_FILE_UNWANTED,
FMOD_ERR_FORMAT,
FMOD_ERR_HTTP,
FMOD_ERR_HTTP_ACCESS,
FMOD_ERR_HTTP_PROXY_AUTH,
FMOD_ERR_HTTP_SERVER_ERROR,
FMOD_ERR_HTTP_TIMEOUT,
FMOD_ERR_INITIALIZATION,
FMOD_ERR_INITIALIZED,
FMOD_ERR_INTERNAL,
FMOD_ERR_INVALID_ADDRESS,
FMOD_ERR_INVALID_FLOAT,
FMOD_ERR_INVALID_HANDLE,
FMOD_ERR_INVALID_PARAM,
FMOD_ERR_INVALID_POSITION,
FMOD_ERR_INVALID_SPEAKER,
FMOD_ERR_INVALID_SYNCPOINT,
FMOD_ERR_INVALID_VECTOR,
FMOD_ERR_MAXAUDIBLE,
FMOD_ERR_MEMORY,
FMOD_ERR_MEMORY_CANTPOINT,
FMOD_ERR_MEMORY_SRAM,
FMOD_ERR_NEEDS2D,
FMOD_ERR_NEEDS3D,
FMOD_ERR_NEEDSHARDWARE,
FMOD_ERR_NEEDSSOFTWARE,
FMOD_ERR_NET_CONNECT,
FMOD_ERR_NET_SOCKET_ERROR,
FMOD_ERR_NET_URL,
FMOD_ERR_NET_WOULD_BLOCK,
FMOD_ERR_NOTREADY,
FMOD_ERR_OUTPUT_ALLOCATED,
FMOD_ERR_OUTPUT_CREATEBUFFER,
FMOD_ERR_OUTPUT_DRIVERCALL,
FMOD_ERR_OUTPUT_ENUMERATION,
FMOD_ERR_OUTPUT_FORMAT,
FMOD_ERR_OUTPUT_INIT,
FMOD_ERR_OUTPUT_NOHARDWARE,
FMOD_ERR_OUTPUT_NOSOFTWARE,
FMOD_ERR_PAN,
FMOD_ERR_PLUGIN,
FMOD_ERR_PLUGIN_INSTANCES,
FMOD_ERR_PLUGIN_MISSING,
FMOD_ERR_PLUGIN_RESOURCE,
FMOD_ERR_PRELOADED,
FMOD_ERR_PROGRAMMERSOUND,
FMOD_ERR_RECORD,
FMOD_ERR_REVERB_INSTANCE,
FMOD_ERR_SUBSOUND_ALLOCATED,
FMOD_ERR_SUBSOUND_CANTMOVE,
FMOD_ERR_SUBSOUND_MODE,
FMOD_ERR_SUBSOUNDS,
FMOD_ERR_TAGNOTFOUND,
FMOD_ERR_TOOMANYCHANNELS,
FMOD_ERR_UNIMPLEMENTED,
FMOD_ERR_UNINITIALIZED,
FMOD_ERR_UNSUPPORTED,
FMOD_ERR_UPDATE,
FMOD_ERR_VERSION,
FMOD_ERR_EVENT_FAILED,
FMOD_ERR_EVENT_INFOONLY,
FMOD_ERR_EVENT_INTERNAL,
FMOD_ERR_EVENT_MAXSTREAMS,
FMOD_ERR_EVENT_MISMATCH,
FMOD_ERR_EVENT_NAMECONFLICT,
FMOD_ERR_EVENT_NOTFOUND,
FMOD_ERR_EVENT_NEEDSSIMPLE,
FMOD_ERR_EVENT_GUIDCONFLICT,
FMOD_ERR_EVENT_ALREADY_LOADED,
FMOD_ERR_MUSIC_UNINITIALIZED,
FMOD_ERR_MUSIC_NOTFOUND,
FMOD_ERR_MUSIC_NOCALLBACK
}FMOD_RESULT;
Values
FMOD_OK
Noerrors.
FMOD_ERR_ALREADYLOCKED
Triedtocalllockasecondtimebeforeunlockwascalled.
FMOD_ERR_BADCOMMAND
Triedtocallafunctiononadatatypethatdoesnotallowthistypeoffunctionality(iecallingSound::lockonastreamingsound).
FMOD_ERR_CDDA_DRIVERS
NeitherNTSCSInorASPIcouldbeinitialised.
FMOD_ERR_CDDA_INIT
AnerroroccurredwhileinitialisingtheCDDAsubsystem.
FMOD_ERR_CDDA_INVALID_DEVICE
Couldn'tfindthespecifieddevice.
FMOD_ERR_CDDA_NOAUDIO
Noaudiotracksonthespecifieddisc.
FMOD_ERR_CDDA_NODEVICES
NoCD/DVDdeviceswerefound.
FMOD_ERR_CDDA_NODISC
Nodiscpresentinthespecifieddrive.
FMOD_ERR_CDDA_READ
ACDDAreaderroroccurred.
FMOD_ERR_CHANNEL_ALLOC
Errortryingtoallocateachannel.
FMOD_ERR_CHANNEL_STOLEN
Thespecifiedchannelhasbeenreusedtoplayanothersound.
FMOD_ERR_COM
AWin32COMrelatederroroccured.COMfailedtoinitializeoraQueryInterfacefailedmeaningaWindowscodecordriverwasnotinstalledproperly.
FMOD_ERR_DMA
DMAFailure.Seedebugoutputformoreinformation.
FMOD_ERR_DSP_CONNECTION
DSPconnectionerror.Connectionpossiblycausedacyclicdependancy.Ortriedtoconnectatreetoomanyunitsdeep(morethan128).
FMOD_ERR_DSP_FORMAT
DSPFormaterror.ADSPunitmayhaveattemptedtoconnecttothisnetworkwiththewrongformat.
FMOD_ERR_DSP_NOTFOUND
DSPconnectionerror.Couldn'tfindtheDSPunitspecified.
FMOD_ERR_DSP_RUNNING
DSPerror.Cannotperformthisoperationwhilethenetworkisinthemiddleofrunning.ThiswillmostlikelyhappenifaconnectionordisconnectionisattemptedinaDSPcallback.
FMOD_ERR_DSP_TOOMANYCONNECTIONS
DSPconnectionerror.Theunitbeingconnectedtoordisconnectedshouldonlyhave1inputoroutput.
FMOD_ERR_FILE_BAD
Errorloadingfile.
FMOD_ERR_FILE_COULDNOTSEEK
Couldn'tperformseekoperation.Thisisalimitationofthemedium(ienetstreams)orthefileformat.
FMOD_ERR_FILE_DISKEJECTED
Mediawasejectedwhilereading.
FMOD_ERR_FILE_EOF
Endoffileunexpectedlyreachedwhiletryingtoreadessentialdata(truncateddata?).
FMOD_ERR_FILE_NOTFOUND
Filenotfound.
FMOD_ERR_FILE_UNWANTED
Unwantedfileaccessoccured.
FMOD_ERR_FORMAT
Unsupportedfileoraudioformat.
FMOD_ERR_HTTP
AHTTPerroroccurred.Thisisacatch-allforHTTPerrorsnotlistedelsewhere.
FMOD_ERR_HTTP_ACCESS
Thespecifiedresourcerequiresauthenticationorisforbidden.
FMOD_ERR_HTTP_PROXY_AUTH
Proxyauthenticationisrequiredtoaccessthespecifiedresource.
FMOD_ERR_HTTP_SERVER_ERROR
AHTTPservererroroccurred.
FMOD_ERR_HTTP_TIMEOUT
TheHTTPrequesttimedout.
FMOD_ERR_INITIALIZATION
FMODwasnotinitializedcorrectlytosupportthisfunction.
FMOD_ERR_INITIALIZED
CannotcallthiscommandafterSystem::init.
FMOD_ERR_INTERNAL
Anerroroccuredthatwasn'tsupposedto.Contactsupport.
FMOD_ERR_INVALID_ADDRESS
OnXbox360,thismemoryaddresspassedtoFMODmustbephysical,(ieallocatedwithXPhysicalAlloc.)
FMOD_ERR_INVALID_FLOAT
ValuepassedinwasaNaN,Infordenormalizedfloat.
FMOD_ERR_INVALID_HANDLE
Aninvalidobjecthandlewasused.
FMOD_ERR_INVALID_PARAM
Aninvalidparameterwaspassedtothisfunction.
FMOD_ERR_INVALID_POSITION
Aninvalidseekpositionwaspassedtothisfunction.
FMOD_ERR_INVALID_SPEAKER
Aninvalidspeakerwaspassedtothisfunctionbasedonthecurrentspeakermode.
FMOD_ERR_INVALID_SYNCPOINT
Thesyncpointdidnotcomefromthissoundhandle.
FMOD_ERR_INVALID_VECTOR
Thevectorspassedinarenotunitlength,orperpendicular.
FMOD_ERR_MAXAUDIBLE
Reachedmaximumaudibleplaybackcountforthissound'ssoundgroup.
FMOD_ERR_MEMORY
Notenoughmemoryorresources.
FMOD_ERR_MEMORY_CANTPOINT
Can'tuseFMOD_OPENMEMORY_POINTonnonPCMsourcedata,ornonmp3/xma/adpcmdataifFMOD_CREATECOMPRESSEDSAMPLEwasused.
FMOD_ERR_MEMORY_SRAM
Notenoughmemoryorresourcesonconsolesoundram.
FMOD_ERR_NEEDS2D
Triedtocallacommandona3dsoundwhenthecommandwasmeantfor2dsound.
FMOD_ERR_NEEDS3D
Triedtocallacommandona2dsoundwhenthecommandwasmeantfor3dsound.
FMOD_ERR_NEEDSHARDWARE
Triedtouseafeaturethatrequireshardwaresupport.(ietryingtoplayaGCADPCMcompressedsoundinsoftwareonWii).
FMOD_ERR_NEEDSSOFTWARE
Triedtouseafeaturethatrequiresthesoftwareengine.Softwareenginehaseitherbeenturnedoff,orcommandwasexecutedonahardwarechannelwhichdoesnotsupportthisfeature.
FMOD_ERR_NET_CONNECT
Couldn'tconnecttothespecifiedhost.
FMOD_ERR_NET_SOCKET_ERROR
Asocketerroroccurred.Thisisacatch-allforsocket-relatederrorsnotlistedelsewhere.
FMOD_ERR_NET_URL
ThespecifiedURLcouldn'tberesolved.
FMOD_ERR_NET_WOULD_BLOCK
Operationonanon-blockingsocketcouldnotcompleteimmediately.
FMOD_ERR_NOTREADY
Operationcouldnotbeperformedbecausespecifiedsound/DSPconnectionis
notready.
FMOD_ERR_OUTPUT_ALLOCATED
Errorinitializingoutputdevice,butmorespecifically,theoutputdeviceisalreadyinuseandcannotbereused.
FMOD_ERR_OUTPUT_CREATEBUFFER
Errorcreatinghardwaresoundbuffer.
FMOD_ERR_OUTPUT_DRIVERCALL
Acalltoastandardsoundcarddriverfailed,whichcouldpossiblymeanabuginthedriverorresourcesweremissingorexhausted.
FMOD_ERR_OUTPUT_ENUMERATION
Errorenumeratingtheavailabledriverlist.Listmaybeinconsistentduetoarecentdeviceadditionorremoval.
FMOD_ERR_OUTPUT_FORMAT
Soundcarddoesnotsupporttheminimumfeaturesneededforthissoundsystem(16bitstereooutput).
FMOD_ERR_OUTPUT_INIT
Errorinitializingoutputdevice.
FMOD_ERR_OUTPUT_NOHARDWARE
FMOD_HARDWAREwasspecifiedbutthesoundcarddoesnothavetheresourcesnecessarytoplayit.
FMOD_ERR_OUTPUT_NOSOFTWARE
AttemptedtocreateasoftwaresoundbutnosoftwarechannelswerespecifiedinSystem::init.
FMOD_ERR_PAN
Panningonlyworkswithmonoorstereosoundsources.
FMOD_ERR_PLUGIN
Anunspecifiederrorhasbeenreturnedfroma3rdpartyplugin.
FMOD_ERR_PLUGIN_INSTANCES
Thenumberofallowedinstancesofapluginhasbeenexceeded.
FMOD_ERR_PLUGIN_MISSING
Arequestedoutput,dspunittypeorcodecwasnotavailable.
FMOD_ERR_PLUGIN_RESOURCE
Aresourcethatthepluginrequirescannotbefound.(ietheDLSfileforMIDIplayback)
FMOD_ERR_PRELOADED
Thespecifiedsoundisstillinusebytheeventsystem,callEventSystem::unloadFSBbeforetryingtoreleaseit.
FMOD_ERR_PROGRAMMERSOUND
Thespecifiedsoundisstillinusebytheeventsystem,waitfortheeventwhichisusingitfinishwithit.
FMOD_ERR_RECORD
Anerroroccuredtryingtoinitializetherecordingdevice.
FMOD_ERR_REVERB_INSTANCE
SpecifiedinstanceinFMOD_REVERB_PROPERTIEScouldn'tbeset.Mostlikelybecauseitisaninvalidinstancenumberorthereverbdoesntexist.
FMOD_ERR_SUBSOUND_ALLOCATED
Thissubsoundisalreadybeingusedbyanothersound,youcannothavemore
thanoneparenttoasound.Nullouttheotherparent'sentryfirst.
FMOD_ERR_SUBSOUND_CANTMOVE
Sharedsubsoundscannotbereplacedormovedfromtheirparentstream,suchaswhentheparentstreamisanFSBfile.
FMOD_ERR_SUBSOUND_MODE
Thesubsound'smodebitsdonotmatchwiththeparentsound'smodebits.Seedocumentationforfunctionthatitwascalledwith.
FMOD_ERR_SUBSOUNDS
Theerroroccuredbecausethesoundreferencedcontainssubsoundswhenitshouldn'thave,oritdoesn'tcontainsubsoundswhenitshouldhave.Theoperationmayalsonotbeabletobeperformedonaparentsound,oraparentsoundwasplayedwithoutsettingupasentencefirst.
FMOD_ERR_TAGNOTFOUND
Thespecifiedtagcouldnotbefoundortherearenotags.
FMOD_ERR_TOOMANYCHANNELS
Thesoundcreatedexceedstheallowableinputchannelcount.ThiscanbeincreasedusingthemaxinputchannelsparameterinSystem::setSoftwareFormat.
FMOD_ERR_UNIMPLEMENTED
SomethinginFMODhasn'tbeenimplementedwhenitshouldbe!contactsupport!
FMOD_ERR_UNINITIALIZED
ThiscommandfailedbecauseSystem::initorSystem::setDriverwasnotcalled.
FMOD_ERR_UNSUPPORTED
Acommandissuedwasnotsupportedbythisobject.Possiblyapluginwithoutcertaincallbacksspecified.
FMOD_ERR_UPDATE
AnerrorcausedbySystem::updateoccured.
FMOD_ERR_VERSION
Theversionnumberofthisfileformatisnotsupported.
FMOD_ERR_EVENT_FAILED
AnEventfailedtoberetrieved,mostlikelydueto'justfail'beingspecifiedasthemaxplaybacksbehavior.
FMOD_ERR_EVENT_INFOONLY
Can'texecutethiscommandonanEVENT_INFOONLYevent.
FMOD_ERR_EVENT_INTERNAL
Anerroroccuredthatwasn'tsupposedto.Seedebuglogforreason.
FMOD_ERR_EVENT_MAXSTREAMS
Eventfailedbecause'Maxstreams'washitwhenFMOD_EVENT_INIT_FAIL_ON_MAXSTREAMSwasspecified.
FMOD_ERR_EVENT_MISMATCH
FSBmismatchestheFEVitwascompiledwith,thestream/samplemodeitwasmeanttobecreatedwithwasdifferent,ortheFEVwasbuiltforadifferentplatform.
FMOD_ERR_EVENT_NAMECONFLICT
Acategorywiththesamenamealreadyexists.
FMOD_ERR_EVENT_NOTFOUND
Therequestedevent,eventgroup,eventcategoryoreventpropertycouldnotbefound.
FMOD_ERR_EVENT_NEEDSSIMPLE
Triedtocallafunctiononacomplexeventthat'sonlysupportedbysimpleevents.
FMOD_ERR_EVENT_GUIDCONFLICT
AneventwiththesameGUIDalreadyexists.
FMOD_ERR_EVENT_ALREADY_LOADED
Thespecifiedprojectorbankhasalreadybeenloaded.Havingmultiplecopiesofthesameprojectloadedsimultaneouslyisforbidden.
FMOD_ERR_MUSIC_UNINITIALIZED
Musicsystemisnotinitializedprobablybecausenomusicdataisloaded.
FMOD_ERR_MUSIC_NOTFOUND
Therequestedmusicentitycouldnotbefound.
FMOD_ERR_MUSIC_NOCALLBACK
Themusiccallbackisrequired,butithasnotbeenset.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_SOUNDGROUP_BEHAVIORTheseflagsareusedwithSoundGroup::setMaxAudibleBehaviortodeterminewhathappenswhenmoresoundsareplayedthanarespecifiedwithSoundGroup::setMaxAudible.
Enumeration
typedefenum{
FMOD_SOUNDGROUP_BEHAVIOR_FAIL,
FMOD_SOUNDGROUP_BEHAVIOR_MUTE,
FMOD_SOUNDGROUP_BEHAVIOR_STEALLOWEST,
FMOD_SOUNDGROUP_BEHAVIOR_MAX
}FMOD_SOUNDGROUP_BEHAVIOR;
Values
FMOD_SOUNDGROUP_BEHAVIOR_FAIL
AnysoundplayedthatputsthesoundcountovertheSoundGroup::setMaxAudiblesetting,willsimplyfailduringSystem::playSound.
FMOD_SOUNDGROUP_BEHAVIOR_MUTE
AnysoundplayedthatputsthesoundcountovertheSoundGroup::setMaxAudiblesetting,willbesilent,thenifanothersoundinthegroupstopsthesoundthatwassilentbeforebecomesaudibleagain.
FMOD_SOUNDGROUP_BEHAVIOR_STEALLOWEST
AnysoundplayedthatputsthesoundcountovertheSoundGroup::setMaxAudiblesetting,willstealthequietest/leastimportantsoundplayinginthegroup.
FMOD_SOUNDGROUP_BEHAVIOR_MAX
Maximumnumberofopenstatetypes.
Remarks
WhenusingFMOD_SOUNDGROUP_BEHAVIOR_MUTE,SoundGroup::setMuteFadeSpeedcanbeusedtostopasuddentransition.Instead,thetimespecifiedwillbeusedtocrossfadebetweenthesoundsthatgosilentandtheonesthatbecomeaudible.
SeeAlso
SoundGroup::setMaxAudibleBehaviorSoundGroup::getMaxAudibleBehaviorSoundGroup::setMaxAudibleSoundGroup::getMaxAudibleSoundGroup::setMuteFadeSpeedSoundGroup::getMuteFadeSpeed
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_SOUND_FORMATThesedefinitionsdescribethenativeformatofthehardwareorsoftwarebufferthatwillbeused.
Enumeration
typedefenum{
FMOD_SOUND_FORMAT_NONE,
FMOD_SOUND_FORMAT_PCM8,
FMOD_SOUND_FORMAT_PCM16,
FMOD_SOUND_FORMAT_PCM24,
FMOD_SOUND_FORMAT_PCM32,
FMOD_SOUND_FORMAT_PCMFLOAT,
FMOD_SOUND_FORMAT_GCADPCM,
FMOD_SOUND_FORMAT_IMAADPCM,
FMOD_SOUND_FORMAT_VAG,
FMOD_SOUND_FORMAT_HEVAG,
FMOD_SOUND_FORMAT_XMA,
FMOD_SOUND_FORMAT_MPEG,
FMOD_SOUND_FORMAT_CELT,
FMOD_SOUND_FORMAT_AT9,
FMOD_SOUND_FORMAT_XWMA,
FMOD_SOUND_FORMAT_VORBIS,
FMOD_SOUND_FORMAT_MAX
}FMOD_SOUND_FORMAT;
Values
FMOD_SOUND_FORMAT_NONE
Unitialized/unknown.
FMOD_SOUND_FORMAT_PCM8
8bitintegerPCMdata.
FMOD_SOUND_FORMAT_PCM16
16bitintegerPCMdata.
FMOD_SOUND_FORMAT_PCM24
24bitintegerPCMdata.
FMOD_SOUND_FORMAT_PCM32
32bitintegerPCMdata.
FMOD_SOUND_FORMAT_PCMFLOAT
32bitfloatingpointPCMdata.
FMOD_SOUND_FORMAT_GCADPCM
CompressedNintendo3DS/WiiDSPdata.
FMOD_SOUND_FORMAT_IMAADPCM
CompressedIMAADPCMdata.
FMOD_SOUND_FORMAT_VAG
CompressedPlayStationPortableADPCMdata.
FMOD_SOUND_FORMAT_HEVAG
CompressedPSVitaADPCMdata.
FMOD_SOUND_FORMAT_XMA
CompressedXbox360XMAdata.
FMOD_SOUND_FORMAT_MPEG
CompressedMPEGlayer2or3data.
FMOD_SOUND_FORMAT_CELT
CompressedCELTdata.
FMOD_SOUND_FORMAT_AT9
CompressedPSVitaATRAC9data.
FMOD_SOUND_FORMAT_XWMA
CompressedXbox360xWMAdata.
FMOD_SOUND_FORMAT_VORBIS
CompressedVorbisdata.
FMOD_SOUND_FORMAT_MAX
Maximumnumberofsoundformatssupported.
Remarks
Thisistheformatthenativehardwareorsoftwarebufferwillbeoriscreatedin.
SeeAlso
System::createSoundSound::getFormat
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_SOUND_TYPEThesedefinitionsdescribethetypeofsongbeingplayed.
Enumeration
typedefenum{
FMOD_SOUND_TYPE_UNKNOWN,
FMOD_SOUND_TYPE_AIFF,
FMOD_SOUND_TYPE_ASF,
FMOD_SOUND_TYPE_AT3,
FMOD_SOUND_TYPE_CDDA,
FMOD_SOUND_TYPE_DLS,
FMOD_SOUND_TYPE_FLAC,
FMOD_SOUND_TYPE_FSB,
FMOD_SOUND_TYPE_GCADPCM,
FMOD_SOUND_TYPE_IT,
FMOD_SOUND_TYPE_MIDI,
FMOD_SOUND_TYPE_MOD,
FMOD_SOUND_TYPE_MPEG,
FMOD_SOUND_TYPE_OGGVORBIS,
FMOD_SOUND_TYPE_PLAYLIST,
FMOD_SOUND_TYPE_RAW,
FMOD_SOUND_TYPE_S3M,
FMOD_SOUND_TYPE_SF2,
FMOD_SOUND_TYPE_USER,
FMOD_SOUND_TYPE_WAV,
FMOD_SOUND_TYPE_XM,
FMOD_SOUND_TYPE_XMA,
FMOD_SOUND_TYPE_VAG,
FMOD_SOUND_TYPE_AUDIOQUEUE,
FMOD_SOUND_TYPE_XWMA,
FMOD_SOUND_TYPE_BCWAV,
FMOD_SOUND_TYPE_AT9,
FMOD_SOUND_TYPE_VORBIS,
FMOD_SOUND_TYPE_MEDIA_FOUNDATION,
FMOD_SOUND_TYPE_MAX
}FMOD_SOUND_TYPE;
Values
FMOD_SOUND_TYPE_UNKNOWN
3rdparty/unknownpluginformat.
FMOD_SOUND_TYPE_AIFF
AIFF.
FMOD_SOUND_TYPE_ASF
MicrosoftAdvancedSystemsFormat(ieWMA/ASF/WMV).
FMOD_SOUND_TYPE_AT3
SonyATRAC3format
FMOD_SOUND_TYPE_CDDA
DigitalCDaudio.
FMOD_SOUND_TYPE_DLS
Soundfont/downloadablesoundbank.
FMOD_SOUND_TYPE_FLAC
FLAClosslesscodec.
FMOD_SOUND_TYPE_FSB
FMODSampleBank.
FMOD_SOUND_TYPE_GCADPCM
NintendoGameCube/WiiADPCM
FMOD_SOUND_TYPE_IT
ImpulseTracker.
FMOD_SOUND_TYPE_MIDI
MIDI.extracodecdataisapointertoanFMOD_MIDI_EXTRACODECDATAstructure.
FMOD_SOUND_TYPE_MOD
Protracker/FasttrackerMOD.
FMOD_SOUND_TYPE_MPEG
MP2/MP3MPEG.
FMOD_SOUND_TYPE_OGGVORBIS
Oggvorbis.
FMOD_SOUND_TYPE_PLAYLIST
InformationonlyfromASX/PLS/M3U/WAXplaylists
FMOD_SOUND_TYPE_RAW
RawPCMdata.
FMOD_SOUND_TYPE_S3M
ScreamTracker3.
FMOD_SOUND_TYPE_SF2
Soundfont2format.
FMOD_SOUND_TYPE_USER
Usercreatedsound.
FMOD_SOUND_TYPE_WAV
MicrosoftWAV.
FMOD_SOUND_TYPE_XM
FastTracker2XM.
FMOD_SOUND_TYPE_XMA
Xbox360XMA
FMOD_SOUND_TYPE_VAG
PlayStationPortableADPCMVAGformat.
FMOD_SOUND_TYPE_AUDIOQUEUE
iPhonehardwaredecoder,supportsAAC,ALACandMP3.extracodecdataisapointertoanFMOD_AUDIOQUEUE_EXTRACODECDATAstructure.
FMOD_SOUND_TYPE_XWMA
Xbox360XWMA
FMOD_SOUND_TYPE_BCWAV
3DSBCWAVcontainerformatforDSPADPCMandPCM
FMOD_SOUND_TYPE_AT9
NGPATRAC9format
FMOD_SOUND_TYPE_VORBIS
Rawvorbis
FMOD_SOUND_TYPE_MEDIA_FOUNDATION
MicrosoftMediaFoundationwrappers,supportsASF/WMA
FMOD_SOUND_TYPE_MAX
Maximumnumberofsoundtypessupported.
SeeAlso
Sound::getFormat
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_SPEAKERThesearespeakertypesdefinedforusewiththeChannel::setSpeakerLevelscommand.ItcanalsobeusedforspeakerplacementintheSystem::set3DSpeakerPositioncommand.
Enumeration
typedefenum{
FMOD_SPEAKER_FRONT_LEFT,
FMOD_SPEAKER_FRONT_RIGHT,
FMOD_SPEAKER_FRONT_CENTER,
FMOD_SPEAKER_LOW_FREQUENCY,
FMOD_SPEAKER_BACK_LEFT,
FMOD_SPEAKER_BACK_RIGHT,
FMOD_SPEAKER_SIDE_LEFT,
FMOD_SPEAKER_SIDE_RIGHT,
FMOD_SPEAKER_MAX,
FMOD_SPEAKER_MONO,
FMOD_SPEAKER_NULL,
FMOD_SPEAKER_SBL,
FMOD_SPEAKER_SBR
}FMOD_SPEAKER;
Values
FMOD_SPEAKER_FRONT_LEFT
FMOD_SPEAKER_FRONT_RIGHT
FMOD_SPEAKER_FRONT_CENTER
FMOD_SPEAKER_LOW_FREQUENCY
FMOD_SPEAKER_BACK_LEFT
FMOD_SPEAKER_BACK_RIGHT
FMOD_SPEAKER_SIDE_LEFT
FMOD_SPEAKER_SIDE_RIGHT
FMOD_SPEAKER_MAX
Maximumnumberofspeakertypessupported.
FMOD_SPEAKER_MONO
ForusewithFMOD_SPEAKERMODE_MONOandChannel::SetSpeakerLevels.MappedtosamevalueasFMOD_SPEAKER_FRONT_LEFT.
FMOD_SPEAKER_NULL
Anonspeaker.UsethiswithASIOmappingtoignoreaspeaker.
FMOD_SPEAKER_SBL
ForusewithFMOD_SPEAKERMODE_7POINT1onPS3wheretheextraspeakersaresurroundbackinsideofsidespeakers.
FMOD_SPEAKER_SBR
ForusewithFMOD_SPEAKERMODE_7POINT1onPS3wheretheextraspeakersaresurroundbackinsideofsidespeakers.
Remarks
IfyouareusingFMOD_SPEAKERMODE_RAWandspeakerassignmentsaremeaningless,justcastarawintegervaluetothistype.Forexample(FMOD_SPEAKER)7wouldusethe7thspeaker(alsothesameasFMOD_SPEAKER_SIDE_RIGHT).Valueshigherthanthiscanbeusedifanoutputsystemhasmorethan8speakertypes/outputchannels.15isthecurrentmaximum.
NOTE:OnPlaystation3in7.1,theextra2speakersarenotsideleft/sideright,theyare'surroundbackleft'/'surroundbackright'whichlocatethespeakersbehindthelistenerinsteadoftothesideslikeonPC.FMOD_SPEAKER_SBL/FMOD_SPEAKER_SBRareprovidedtomakeitclearerwhatspeakerisbeingaddressedonthatplatform.
SeeAlso
FMOD_SPEAKERMODEChannel::setSpeakerLevelsChannel::getSpeakerLevelsSystem::set3DSpeakerPositionSystem::get3DSpeakerPosition
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_SPEAKERMAPTYPEWhencreatingamultichannelsound,FMODwillpanthemtotheirdefaultspeakerlocations,forexamplea6channelsoundwilldefaulttoonechannelper5.1outputspeaker.Anotherexampleisastereosound.Itwilldefaulttoleft=frontleft,right=frontright.Thisisforsoundsthatarenot'default'.Forexampleyoumighthaveasoundthatis6channelsbutactuallymadeupof3stereopairs,thatshouldallbelocatedinfrontleft,frontrightonly.
Enumeration
typedefenum{
FMOD_SPEAKERMAPTYPE_DEFAULT,
FMOD_SPEAKERMAPTYPE_ALLMONO,
FMOD_SPEAKERMAPTYPE_ALLSTEREO,
FMOD_SPEAKERMAPTYPE_51_PROTOOLS
}FMOD_SPEAKERMAPTYPE;
Values
FMOD_SPEAKERMAPTYPE_DEFAULT
Thisisthedefault,andjustmeansFMODdecideswhichspeakersitputsthesourcechannels.
FMOD_SPEAKERMAPTYPE_ALLMONO
Thismeansthesoundismadeupofallmonosounds.Allvoiceswillbepannedtothefrontcenterbydefaultinthiscase.
FMOD_SPEAKERMAPTYPE_ALLSTEREO
Thismeansthesoundismadeupofallstereosounds.Allvoiceswillbepannedtofrontleftandfrontrightalternatingeverysecondchannel.
FMOD_SPEAKERMAPTYPE_51_PROTOOLS
Mapa5.1soundtouseprotoolsLCRLsRsLFEmapping.Willreturnanerrorifnota6channelsound.
Remarks
Forfullflexibilityofspeakerassignments,useChannel::setSpeakerLevels.
SeeAlso
FMOD_CREATESOUNDEXINFOChannel::setSpeakerLevels
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_SPEAKERMODEThesearespeakertypesdefinedforusewiththeSystem::setSpeakerModeorSystem::getSpeakerModecommand.
Enumeration
typedefenum{
FMOD_SPEAKERMODE_RAW,
FMOD_SPEAKERMODE_MONO,
FMOD_SPEAKERMODE_STEREO,
FMOD_SPEAKERMODE_QUAD,
FMOD_SPEAKERMODE_SURROUND,
FMOD_SPEAKERMODE_5POINT1,
FMOD_SPEAKERMODE_7POINT1,
FMOD_SPEAKERMODE_SRS5_1_MATRIX,
FMOD_SPEAKERMODE_MYEARS,
FMOD_SPEAKERMODE_MAX
}FMOD_SPEAKERMODE;
Values
FMOD_SPEAKERMODE_RAW
Thereisnospecificspeakermode.Soundchannelsaremappedinorderofinputtooutput.UseSystem::setSoftwareFormattospecifyspeakercount.Seeremarksformoreinformation.
FMOD_SPEAKERMODE_MONO
Thespeakersaremonaural.
FMOD_SPEAKERMODE_STEREO
Thespeakersarestereo(DEFAULT).
FMOD_SPEAKERMODE_QUAD
4speakersetup.Thisincludesfrontleft,frontright,rearleft,rearright.
FMOD_SPEAKERMODE_SURROUND
5speakersetup.Thisincludesfrontleft,frontright,center,rearleft,rearright.
FMOD_SPEAKERMODE_5POINT1
5.1speakersetup.Thisincludesfrontleft,frontright,center,rearleft,rearrightandasubwoofer.
FMOD_SPEAKERMODE_7POINT1
7.1speakersetup.Thisincludesfrontleft,frontright,center,rearleft,rearright,sideleft,siderightandasubwoofer.
FMOD_SPEAKERMODE_SRS5_1_MATRIX
Stereocompatibleoutput,embeddedwithsurroundinformation.SRS5.1/Prologic/Prologic2decoderswillsplitthesignalintoa5.1speakerset-uporSRSvirtualsurroundwilldecodeintoa2-speaker/headphonesetup.Seeremarksaboutlimitations.
FMOD_SPEAKERMODE_MYEARS
Stereooutput,butdataisencodedusingpersonalizedHRTFalgorithms.Seemyears.net.au
FMOD_SPEAKERMODE_MAX
Maximumnumberofspeakermodessupported.
Remarks
TheseareimportantnotesonspeakermodesinregardstosoundscreatedwithFMOD_SOFTWARE.Notebelowthephrase'soundchannels'isused.Thesearethesubchannelsinsideasound,theyarenotrelatedandhavenothingtodowiththeFMODclass"Channel".Forexampleamonosoundhas1soundchannel,astereosoundhas2sound
channels,andanAC3or6channelwavfilehave6"soundchannels".
FMOD_SPEAKERMODE_RAW---------------------Thismodeisforoutputdevicesthatarenotspecificallymono/stereo/quad/surround/5.1or7.1,butaremultichannel.UseSystem::setSoftwareFormattospecifythenumberofspeakersyouwanttoaddress,otherwiseitwilldefaultto2(stereo).Soundchannelsmaptospeakerssequentially,soamonosoundmapstooutputspeaker0,stereosoundmapstooutputspeaker0&1.Theuserassumesknowledgeofthespeakerorder.FMOD_SPEAKERenumerationsmaynotapply,sorawchannelindicesshouldbeused.Multichannelsoundsmapinputchannelstooutputchannels1:1.Channel::setPanandChannel::setSpeakerMixdonotwork.SpeakerlevelsmustbemanuallysetwithChannel::setSpeakerLevels.
FMOD_SPEAKERMODE_MONO---------------------Thismodeisfora1speakerarrangement.Panningdoesnotworkinthisspeakermode.Mono,stereoandmultichannelsoundshaveeachsoundchannelplayedontheonespeakerunity.MixbehaviorformultichannelsoundscanbesetwithChannel::setSpeakerLevels.Channel::setSpeakerMixdoesnotwork.
FMOD_SPEAKERMODE_STEREO-----------------------Thismodeisfor2speakerarrangementsthathavealeftandrightspeaker.
Monosoundsdefaulttoanevendistributionbetweenleftandright.TheycanbepannedwithChannel::setPan.Stereosoundsdefaulttothemiddle,orfullleftintheleftspeakerandfullright
intherightspeaker.TheycanbecrossfadedwithChannel::setPan.Multichannelsoundshaveeachsoundchannelplayedoneachspeakeratunity.Mixbehaviorformultichannelsoundscanbesetwith
Channel::setSpeakerLevels.Channel::setSpeakerMixworksbutonlyfrontleftandrightparametersare
used,therestareignored.
FMOD_SPEAKERMODE_QUAD------------------------Thismodeisfor4speakerarrangementsthathaveafrontleft,frontright,rearleftandarearrightspeaker.Monosoundsdefaulttoanevendistributionbetweenfrontleftandfrontright.
TheycanbepannedwithChannel::setPan.Stereosoundsdefaulttotheleftsoundchannelplayedonthefrontleft,andthe
rightsoundchannelplayedonthefrontright.TheycanbecrossfadedwithChannel::setPan.Multichannelsoundsdefaulttoalloftheirsoundchannelsbeingplayedon
eachspeakerinorderofinput.Mixbehaviorformultichannelsoundscanbesetwith
Channel::setSpeakerLevels.Channel::setSpeakerMixworksbutsideleft,sideright,centerandlfeare
ignored.
FMOD_SPEAKERMODE_SURROUND------------------------Thismodeisfor5speakerarrangementsthathavealeft/right/center/rearleft/rearright.Monosoundsdefaulttothecenterspeaker.Theycanbepannedwith
Channel::setPan.Stereosoundsdefaulttotheleftsoundchannelplayedonthefrontleft,andthe
rightsoundchannelplayedonthefrontright.TheycanbecrossfadedwithChannel::setPan.Multichannelsoundsdefaulttoalloftheirsoundchannelsbeingplayedon
eachspeakerinorderofinput.Mixbehaviorformultichannelsoundscanbesetwith
Channel::setSpeakerLevels.Channel::setSpeakerMixworksbutsideleft/siderightareignored.
FMOD_SPEAKERMODE_5POINT1------------------------Thismodeisfor5.1speakerarrangementsthathavealeft/right/center/rearleft/rearrightandasubwooferspeaker.Monosoundsdefaulttothecenterspeaker.Theycanbepannedwith
Channel::setPan.
Stereosoundsdefaulttotheleftsoundchannelplayedonthefrontleft,andtherightsoundchannelplayedonthefrontright.TheycanbecrossfadedwithChannel::setPan.Multichannelsoundsdefaulttoalloftheirsoundchannelsbeingplayedon
eachspeakerinorderofinput.Mixbehaviorformultichannelsoundscanbesetwith
Channel::setSpeakerLevels.Channel::setSpeakerMixworksbutsideleft/siderightareignored.
FMOD_SPEAKERMODE_7POINT1------------------------Thismodeisfor7.1speakerarrangementsthathavealeft/right/center/rearleft/rearright/sideleft/siderightandasubwooferspeaker.Monosoundsdefaulttothecenterspeaker.Theycanbepannedwith
Channel::setPan.Stereosoundsdefaulttotheleftsoundchannelplayedonthefrontleft,andthe
rightsoundchannelplayedonthefrontright.TheycanbecrossfadedwithChannel::setPan.Multichannelsoundsdefaulttoalloftheirsoundchannelsbeingplayedon
eachspeakerinorderofinput.Mixbehaviorformultichannelsoundscanbesetwith
Channel::setSpeakerLevels.Channel::setSpeakerMixworksandeveryparameterisusedtosetthebalance
ofasoundinanyspeaker.
FMOD_SPEAKERMODE_SRS5_1_MATRIX------------------------------------------------------Thismodeisformono,stereo,5.1and6.1speakerarrangements,asitisbackwardsandforwardscompatiblewithstereo,buttogetasurroundeffectaSRS5.1,PrologicorPrologic2hardwaredecoder/amplifierisneededoracompatibleSRSequippeddevice(e.g.,laptop,TV,etc.)oraccessory(e.g.,headphone).PanbehavioristhesameasFMOD_SPEAKERMODE_5POINT1.
IfthisfunctioniscalledthenumoutputchannelssettinginSystem::setSoftwareFormatisoverwritten.
Outputratemustbe44100,48000or96000forthistoworkotherwiseFMOD_ERR_OUTPUT_INITwillbereturned.
FMOD_SPEAKERMODE_MYEARS------------------------------------------------------Thismodeisforheadphones.ThiswillattempttoloadaMyEarsprofile(seemyears.net.au)anduseittogeneratesurroundsoundonheadphonesusingapersonalizedHRTFalgorithm,forrealistic3dsound.PanbehavioristhesameasFMOD_SPEAKERMODE_7POINT1.MyEarsspeakermodewillautomaticallybesetifthespeakermodeisFMOD_SPEAKERMODE_STEREOandtheMyEarsprofileexists.Ifthismodeissetexplicitly,FMOD_INIT_DISABLE_MYEARS_AUTODETECThasnoeffect.IfthismodeissetexplicitlyandtheMyEarsprofiledoesnotexist,FMOD_ERR_OUTPUT_DRIVERCALLwillbereturned.
SeeAlso
System::setSpeakerModeSystem::getSpeakerModeSystem::getDriverCapsSystem::setSoftwareFormatChannel::setSpeakerLevels
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_SYSTEM_CALLBACKTYPEThesecallbacktypesareusedwithSystem::setCallback.
Enumeration
typedefenum{
FMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGED,
FMOD_SYSTEM_CALLBACKTYPE_DEVICELOST,
FMOD_SYSTEM_CALLBACKTYPE_MEMORYALLOCATIONFAILED,
FMOD_SYSTEM_CALLBACKTYPE_THREADCREATED,
FMOD_SYSTEM_CALLBACKTYPE_BADDSPCONNECTION,
FMOD_SYSTEM_CALLBACKTYPE_BADDSPLEVEL,
FMOD_SYSTEM_CALLBACKTYPE_MAX
}FMOD_SYSTEM_CALLBACKTYPE;
Values
FMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGED
CalledfromSystem::updatewhentheenumeratedlistofdeviceshaschanged.
FMOD_SYSTEM_CALLBACKTYPE_DEVICELOST
CalledfromSystem::updatewhenanoutputdevicehasbeenlostduetocontrolpanelparameterchangesandFMODcannotautomaticallyrecover.
FMOD_SYSTEM_CALLBACKTYPE_MEMORYALLOCATIONFAILED
CalleddirectlywhenamemoryallocationfailssomewhereinFMOD.(NOTE-'system'willbeNULLinthiscallbacktype.)
FMOD_SYSTEM_CALLBACKTYPE_THREADCREATED
Calleddirectlywhenathreadiscreated.(NOTE-'system'willbeNULLinthiscallbacktype.)
FMOD_SYSTEM_CALLBACKTYPE_BADDSPCONNECTION
CalledwhenabadconnectionwasmadewithDSP::addInput.Usuallycalled
frommixerthreadbecausethatiswheretheconnectionsaremade.
FMOD_SYSTEM_CALLBACKTYPE_BADDSPLEVEL
Calledwhentoomanyeffectswereaddedexceedingthemaximumtreedepthof128.ThisismostlikelycausedbyaccidentallyaddingtoomanyDSPeffects.Usuallycalledfrommixerthreadbecausethatiswheretheconnectionsaremade.
FMOD_SYSTEM_CALLBACKTYPE_MAX
Maximumnumberofcallbacktypessupported.
Remarks
Eachcallbackhascommanddataparameterspassedasvoid*uniquetothetypeofcallback.SeereferencetoFMOD_SYSTEM_CALLBACKtodeterminewhattheymightmeanforeachtypeofcallback.
Note!UsingFMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGED(onMaconly)requirestheapplicationtoberunninganeventloopwhichwillallowexternalchangestodevicelisttobedetectedbyFMOD.Note!The'system'objectpointerwillbenullforFMOD_SYSTEM_CALLBACKTYPE_THREADCREATEDandFMOD_SYSTEM_CALLBACKTYPE_MEMORYALLOCATIONFAILEDcallbacks.
SeeAlso
System::setCallbackFMOD_SYSTEM_CALLBACKSystem::updateDSP::addInput
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_TAGDATATYPEListofdatatypesthatcanbereturnedbySound::getTag
Enumeration
typedefenum{
FMOD_TAGDATATYPE_BINARY,
FMOD_TAGDATATYPE_INT,
FMOD_TAGDATATYPE_FLOAT,
FMOD_TAGDATATYPE_STRING,
FMOD_TAGDATATYPE_STRING_UTF16,
FMOD_TAGDATATYPE_STRING_UTF16BE,
FMOD_TAGDATATYPE_STRING_UTF8,
FMOD_TAGDATATYPE_CDTOC,
FMOD_TAGDATATYPE_MAX
}FMOD_TAGDATATYPE;
Values
FMOD_TAGDATATYPE_BINARY
FMOD_TAGDATATYPE_INT
FMOD_TAGDATATYPE_FLOAT
FMOD_TAGDATATYPE_STRING
FMOD_TAGDATATYPE_STRING_UTF16
FMOD_TAGDATATYPE_STRING_UTF16BE
FMOD_TAGDATATYPE_STRING_UTF8
FMOD_TAGDATATYPE_CDTOC
FMOD_TAGDATATYPE_MAX
Maximumnumberoftagdatatypessupported.
SeeAlso
Sound::getTag
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_TAGTYPEListoftagtypesthatcouldbestoredwithinasound.Theseincludeid3tags,metadatafromnetstreamsandvorbis/asfdata.
Enumeration
typedefenum{
FMOD_TAGTYPE_UNKNOWN,
FMOD_TAGTYPE_ID3V1,
FMOD_TAGTYPE_ID3V2,
FMOD_TAGTYPE_VORBISCOMMENT,
FMOD_TAGTYPE_SHOUTCAST,
FMOD_TAGTYPE_ICECAST,
FMOD_TAGTYPE_ASF,
FMOD_TAGTYPE_MIDI,
FMOD_TAGTYPE_PLAYLIST,
FMOD_TAGTYPE_FMOD,
FMOD_TAGTYPE_USER,
FMOD_TAGTYPE_MAX
}FMOD_TAGTYPE;
Values
FMOD_TAGTYPE_UNKNOWN
FMOD_TAGTYPE_ID3V1
FMOD_TAGTYPE_ID3V2
FMOD_TAGTYPE_VORBISCOMMENT
FMOD_TAGTYPE_SHOUTCAST
FMOD_TAGTYPE_ICECAST
FMOD_TAGTYPE_ASF
FMOD_TAGTYPE_MIDI
FMOD_TAGTYPE_PLAYLIST
FMOD_TAGTYPE_FMOD
FMOD_TAGTYPE_USER
FMOD_TAGTYPE_MAX
Maximumnumberoftagtypessupported.
SeeAlso
Sound::getTag
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_THREADValuesforthethread_membersoftheFMOD_360_EXTRADRIVERDATAstructure.
Enumeration
typedefenum{
FMOD_THREAD_DEFAULT,
FMOD_THREAD_CORE0THREAD0,
FMOD_THREAD_CORE0THREAD1,
FMOD_THREAD_CORE1THREAD0,
FMOD_THREAD_CORE1THREAD1,
FMOD_THREAD_CORE2THREAD0,
FMOD_THREAD_CORE2THREAD1,
FMOD_THREAD_MAX
}FMOD_THREAD;
Values
FMOD_THREAD_DEFAULT
UseFMODrecommendeddefaultthreadassignment.
FMOD_THREAD_CORE0THREAD0
ThreadwillbecreatedonHWThread0ofCore0
FMOD_THREAD_CORE0THREAD1
ThreadwillbecreatedonHWThread1ofCore0
FMOD_THREAD_CORE1THREAD0
ThreadwillbecreatedonHWThread0ofCore1
FMOD_THREAD_CORE1THREAD1
ThreadwillbecreatedonHWThread1ofCore1
FMOD_THREAD_CORE2THREAD0
ThreadwillbecreatedonHWThread0ofCore2.Defaultforallthreads(exceptrecording)
FMOD_THREAD_CORE2THREAD1
ThreadwillbecreatedonHWThread1ofCore2.Defaultforrecordingthread
FMOD_THREAD_MAX
Maximumnumberofthreadoptionssupported.
SeeAlso
FMOD_360_EXTRADRIVERDATA
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
C++ReferenceInterfacesFunctionsCallbacksStructuresDefinesEnumerations
FirelightTechnologiesFMODEx
C++interfacesEventSystemEventProjectEventGroupEventEventParameterEventCategoryEventReverbEventQueueEventQueueEntryMusicSystemMusicPrompt
FirelightTechnologiesFMODEx
EventSystemInterfaceEventSystem::createEventQueueEventSystem::createEventQueueEntryEventSystem::createReverbEventSystem::get3DListenerAttributesEventSystem::get3DNumListenersEventSystem::getCategoryEventSystem::getCategoryByIndexEventSystem::getEventEventSystem::getEventByGUIDEventSystem::getEventByGUIDStringEventSystem::getEventBySystemIDEventSystem::getGroupEventSystem::getInfoEventSystem::getLanguageEventSystem::getMemoryInfoEventSystem::getMusicCategoryEventSystem::getMusicSystemEventSystem::getNumCategoriesEventSystem::getNumEventsEventSystem::getNumProjectsEventSystem::getNumReverbPresetsEventSystem::getProjectEventSystem::getProjectByIndexEventSystem::getReverbAmbientPropertiesEventSystem::getReverbPresetEventSystem::getReverbPresetByIndexEventSystem::getReverbPropertiesEventSystem::getSystemObjectEventSystem::getUserDataEventSystem::getVersionEventSystem::initEventSystem::loadEventSystem::preloadFSBEventSystem::registerDSPEventSystem::release
EventSystem::set3DListenerAttributesEventSystem::set3DNumListenersEventSystem::setLanguageEventSystem::setMediaPathEventSystem::setPluginPathEventSystem::setReverbAmbientPropertiesEventSystem::setReverbPropertiesEventSystem::setUserDataEventSystem::unloadEventSystem::unloadFSBEventSystem::update
FirelightTechnologiesFMODEx
EventSystem::createEventQueueCreateanewEventQueueobject.EventQueueobjectsallowyoutoqueueupmultipleeventsandletFMODplaythembackforyou.Theymakeiteasytodothingslikedyanimcdialogcommentary,forinstance.
C++Syntax
FMOD_RESULTEventSystem::createEventQueue(
EventQueue**queue
);
CSyntax
FMOD_RESULTFMOD_EventSystem_CreateEventQueue(
FMOD_EVENTSYSTEM*eventsystem,
FMOD_EVENTQUEUE**queue
);
Parameters
queue
AddressofapointerthatwillreceiveapointertothenewlycreatedEventQueueobject
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::createEventQueueEntry
EventQueue::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::createEventQueueEntryCreateanewEventQueueEntryobjectforthespecifiedEvent.
C++Syntax
FMOD_RESULTEventSystem::createEventQueueEntry(
Event*event,
EventQueueEntry**entry
);
CSyntax
FMOD_RESULTFMOD_EventSystem_CreateEventQueueEntry(
FMOD_EVENTSYSTEM*eventsystem,
FMOD_EVENT*event,
FMOD_EVENTQUEUEENTRY**entry
);
Parameters
event
TheEventtocreateanEventQueueEntryfor.NOTE:ThisEventmusthavebeenretrievedwiththeFMOD_EVENT_INFOONLYflagset
entry
AddressofapointerthatwillreceiveapointertothenewlycreatedEventQueueEntryobject
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
TheeventthatgetspassedtothisfunctionmusthavebeenretrievedwiththeFMOD_EVENT_INFOONLYflag.Whenaneventqueueentryrecahestheheadofthequeue,FMODwillgetarealeventinstanceusingtheFMOD_EVENT_INFOONLYhandle.NOTE:Theeventthatgetspassedtothisfunctionmustbesetupsothatitendsnaturally(i.e.withoutfurtherprogrammerinteraction)whenplayed.Generally,thismeansthattheeventshouldbea"oneshot"event.Iftheeventdoesn'tendnaturallythenthequeuewillgetblocked.
SeeAlso
EventSystem::createEventQueueEventQueue::addEventQueueEntry::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::createReverbCreatesa'virtualreverb'object.Thisobjectreactsto3dlocationandmorphsthereverbenvironmentbasedonhowcloseitistothereverbobject'scenter.Multiplereverbobjectscanbecreatedtoachieveamulti-reverbenvironment.
C++Syntax
FMOD_RESULTEventSystem::createReverb(
EventReverb**reverb
);
CSyntax
FMOD_RESULTFMOD_EventSystem_CreateReverb(
FMOD_EVENTSYSTEM*eventsystem,
FMOD_EVENTREVERB**reverb
);
Parameters
reverb
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
The3Dreverbobjectisaspherehaving3Dattributes(position,minimumdistance,maximumdistance)andreverbproperties.Thepropertiesand3Dattributesofallreverbobjectscollectivelydetermine,alongwiththelistener'sposition,thesettingsofandinputgainsintoasingle3D
reverbDSP.Pleasenotethatthisonlyappliestosoftwarechannels.Whenthelisteneriswithinthesphereofeffectofoneormore3dreverbs,thelistener's3Dreverbpropertiesareaweightedcombinationofsuch3dreverbs.Whenthelistenerisoutsideallofthereverbs,the3Dreverbsettingissettothedefaultambientreverbsetting.
UseEventSystem::setReverbAmbientPropertiestoseta'background'defaultreverbenvironment.Thisisareverbthatwillbemorphedtoifthelistenerisnotwithinanyvirtualreverbzones.Bydefaulttheambientreverbissetto'off'.Creatingmultiplereverbobjectsdoesnotimpactperformance.Theseare'virtualreverbs'.Therewillstillbeonly1physicalreverbDSPrunningthatjustmorphsbetweenthedifferentvirtualreverbs.EventSystem::setReverbPropertiescanstillbeusedinconjunctionwiththe3dbasedvirtualreverbsystem.Thisallows2dsoundstohavereverb.Ifthiscallisusedatthesametimevirtualreverbobjectsareactive,2physicalreverbdspswillbeused,incurringasmallmemoryandcpuhit.
SeeAlso
EventSystem::setReverbAmbientPropertiesEventSystem::getReverbAmbientPropertiesEventSystem::setReverbPropertiesEventSystem::getReverbPropertiesEventReverb::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::get3DListenerAttributesThisretrievestheposition,velocityandorientationofthespecified3Dsoundlistener.
C++Syntax
FMOD_RESULTEventSystem::get3DListenerAttributes(
intlistener,
FMOD_VECTOR*pos,
FMOD_VECTOR*vel,
FMOD_VECTOR*forward,
FMOD_VECTOR*up
);
CSyntax
FMOD_RESULTFMOD_EventSystem_Get3DListenerAttributes(
FMOD_EVENTSYSTEM*eventsystem,
intlistener,
FMOD_VECTOR*pos,
FMOD_VECTOR*vel,
FMOD_VECTOR*forward,
FMOD_VECTOR*up
);
Parameters
listener
ListenerIDinamulti-listenerenvironment.Specify0ifthereisonly1listener.
pos
Addressofavariablethatreceivesthepositionofthelistenerinworldspace,measuredindistanceunits.Optional.Specify0toignore.
vel
Addressofavariablethatreceivesthevelocityofthelistenermeasuredindistanceunitspersecond.Optional.Specify0toignore.
forward
Addressofavariablethatreceivestheforwardsorientationofthelistener.Optional.Specify0toignore.
up
Addressofavariablethatreceivestheupwardsorientationofthelistener.Optional.Specify0toignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::set3DListenerAttributesFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::get3DNumListenersRetrievesthenumberof3Dlisteners.
C++Syntax
FMOD_RESULTEventSystem::get3DNumListeners(
int*numlisteners
);
CSyntax
FMOD_RESULTFMOD_EventSystem_Get3DNumListeners(
FMOD_EVENTSYSTEM*eventsystem,
int*numlisteners
);
Parameters
numlisteners
Addressofavariablethatreceivesthecurrentnumberof3Dlistenersinthe3Dscene.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::set3DNumListeners
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getCategoryRetrieveaneventcategoryobjectbyname.
C++Syntax
FMOD_RESULTEventSystem::getCategory(
constchar*name,
EventCategory**category
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetCategory(
FMOD_EVENTSYSTEM*eventsystem,
constchar*name,
FMOD_EVENTCATEGORY**category
);
Parameters
name
Thenameofaneventcategorywithinthiseventsystem.Specify"master"toretrievethemastereventcategory.
category
Addressofavariabletoreceivetheselectedeventcategorywithinthiseventsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Sub-categoriescanberetrievedbyspecifyingtheirfullpathrelativetothemastercategorye.g."vehicles/cars/racers".Note:Don'tspecify"master/vehicles/cars/racers",justuse"vehicles/cars/racers".
SeeAlso
EventSystem::getCategoryByIndexEventSystem::getMusicCategoryEventSystem::getNumCategories
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getCategoryByIndexRetrieveaneventcategoryobjectbyindex.
C++Syntax
FMOD_RESULTEventSystem::getCategoryByIndex(
intindex,
EventCategory**category
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetCategoryByIndex(
FMOD_EVENTSYSTEM*eventsystem,
intindex,
FMOD_EVENTCATEGORY**category
);
Parameters
index
Theindexofaneventcategorywithinthiseventsystemobject.Indicesare0based.Specify-1toretrievethemastereventcategory.
category
Addressofavariabletoreceivetheselectedeventcategorywithinthiseventsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::getCategoryEventSystem::getMusicCategoryEventSystem::getNumCategories
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getEventRetrieveaneventobjectbyname.
C++Syntax
FMOD_RESULTEventSystem::getEvent(
constchar*name,
FMOD_EVENT_MODEmode,
Event**event
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetEvent(
FMOD_EVENTSYSTEM*eventsystem,
constchar*name,
FMOD_EVENT_MODEmode,
FMOD_EVENT**event
);
Parameters
name
Thenameofaneventwithinthiseventsystem.Note:namemustincludefullpathincludingprojectnameandanyeventgroupnamese.g."myproject/group1/group2/myevent"
mode
IfnotalreadyloadedwithEventGroup::loadEventData,thisFMOD_EVENT_MODEflagwilldetermineifdatashouldbeloadedfromdisksynchronouslyorasynchronously.Italsoallowsan'infoonly'eventretreival(eventsthatcantbeplayed)andcanbeusedtoproduceanerrorondiskaccess.
event
Addressofavariabletoreceivetheselectedeventwithinthiseventsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whatisanevent?Aneventistheleafoftheeventgrouptree.Itistheactualsoundtobeplayedwithcomplexbehaviourdesignedbythesounddesigner.
Inthiscaseweareretrievinganeventfromaneventgroup,sowiththe"filters"groupwecouldgettheechoeventwith"echo"asthenameparameter.
Iftheprogrammerdoesnotknowwhicheventsareavailable,thesounddesignertoolcanoutputaprogrammerreportthatliststheeventgroup'seventswiththeappropriatenamesandindiceslistedalongsidethem.
Note!-Aneventisretrievedfromapoolofevents(createdearlierifFMOD_EVENT_CACHEEVENTSflagwassetinEventSystem::getGroup/EventGroup::getGroup).-Datamaynotbeloadedfromthediskforthisevent,sothiseventmaytriggerdiskaccess.Ifyouwishtopre-empthisuseEventGroup::loadEventDatafirst.-
Thepoolofeventshasasizedeterminedbythe'maxplaybacks'propertyintheFMODDesignertoolintheevent'spropertysheet.-Thepointertowillbegettingwillbeapointertooneoftheseeventinstances.-Ifyoucallthisfunctionmoretimesthanthereareeventinstances,thenaninventhandlemaybestolen,ormayfail.Thisbehaviouralsodeterminedbythesounddesigner.Thebehaviourmaybetostealtheoldesteventinthepool,stealthequietesteventinthepool,orsimplyfailthisgetEventandreturnnullastheeventhandle.
SeeAlso
EventSystem::getGroupFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getEventByGUIDRetrieveaneventobjectbyGUID.
C++Syntax
FMOD_RESULTEventSystem::getEventByGUID(
constFMOD_GUID*guid,
FMOD_EVENT_MODEmode,
Event**event
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetEventByGUID(
FMOD_EVENTSYSTEM*eventsystem,
constFMOD_GUID*guid,
FMOD_EVENT_MODEmode,
FMOD_EVENT**event
);
Parameters
guid
TheGUIDofthedesiredevent.
mode
IfnotalreadyloadedwithEventGroup::loadEventData,thisFMOD_EVENT_MODEflagwilldetermineifdatashouldbeloadedfromdisksynchronouslyorasynchronously.Italsoallowsan'infoonly'eventretrieval(eventsthatcan'tbeplayed)andcanbeusedtoproduceanerrorondiskaccess.
event
Addressofavariabletoreceiveahandleforthedesiredevent.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
TheGUIDforaneventcanbefoundintheprogrammerreport,intheprojectheaderfileorintheeventpropertiesinFMODDesigner.ItcanalsoberetrievedusingEvent::getInfobysettingtheguidmemberoftheFMOD_EVENT_INFOstructure.
Note:ThisfunctionwillnotworkunlessFMOD_EVENT_INIT_USE_GUIDSispassedtoEventSystem::init.
SeeAlso
EventSystem::getEventByGUIDStringEventSystem::getEventBySystemIDEventGroup::loadEventDataEvent::getInfoEventSystem::initFMOD_EVENT_INFOFMOD_EVENT_MODEFMOD_GUID
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getEventByGUIDStringRetrieveaneventobjectbyGUID.
C++Syntax
FMOD_RESULTEventSystem::getEventByGUIDString(
constchar*guid,
FMOD_EVENT_MODEmode,
Event**event
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetEventByGUIDString(
FMOD_EVENTSYSTEM*eventsystem,
constchar*guid,
FMOD_EVENT_MODEmode,
FMOD_EVENT**event
);
Parameters
guid
TheGUIDofthedesiredevent.Seeremarksfortheformat.
mode
IfnotalreadyloadedwithEventGroup::loadEventData,thisFMOD_EVENT_MODEflagwilldetermineifdatashouldbeloadedfromdisksynchronouslyorasynchronously.Italsoallowsan'infoonly'eventretrieval(eventsthatcan'tbeplayed)andcanbeusedtoproduceanerrorondiskaccess.
event
Addressofavariabletoreceiveahandleforthedesiredevent.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
TheGUIDforaneventcanbefoundintheprogrammerreport,intheprojectheaderfileorintheeventpropertiesinFMODDesigner.ItcanalsoberetrievedusingEvent::getInfobysettingtheguidmemberoftheFMOD_EVENT_INFOstructure.
Note:ThisfunctionwillnotworkunlessFMOD_EVENT_INIT_USE_GUIDSispassedtoEventSystem::init.
ThisfunctionexpectsaGUIDstringformattedas"{11111111-2222-3333-4444-555555555555}",wherethedigitsindicatethefieldnumber.
Field HexadecimalDigits Value
1 8 TheData1valueoftheGUID2 4 TheData2valueoftheGUID3 4 TheData3valueoftheGUID4 4 TheinitialtwobytesoftheData4valueoftheGUID
5 12 TheremainingsixbytesoftheData4valueoftheGUID
SeeAlso
EventSystem::getEventByGUIDEventSystem::getEventBySystemIDEventGroup::loadEventDataEvent::getInfoEventSystem::init
FMOD_EVENT_INFOFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getEventBySystemIDRetrieveaneventobjectbysystemwideuniqueidentifier.AllloadedeventscanbeenumeratedwiththisfunctionandEventSystem::getNumEvents.
C++Syntax
FMOD_RESULTEventSystem::getEventBySystemID(
unsignedintsystemid,
FMOD_EVENT_MODEmode,
Event**event
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetEventBySystemID(
FMOD_EVENTSYSTEM*eventsystem,
unsignedintsystemid,
FMOD_EVENT_MODEmode,
FMOD_EVENT**event
);
Parameters
systemid
mode
IfnotalreadyloadedwithEventGroup::loadEventData,thisFMOD_EVENT_MODEflagwilldetermineifdatashouldbeloadedfromdisksynchronouslyorasynchronously.Italsoallowsan'infoonly'eventretrieval(eventsthatcan'tbeplayed)andcanbeusedtoproduceanerrorondiskaccess.
event
Addressofavariabletoreceivetheselectedeventwithinthiseventsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whatisanevent?Aneventistheleafoftheeventgrouptree.Itistheactualsoundtobeplayedwithcomplexbehaviourdesignedbythesounddesigner.
Inthiscaseweareretrievinganeventfromaneventgroup,sowiththe"filters"groupwecouldgettheechoeventwith"echo"asthenameparameter.
Iftheprogrammerdoesnotknowwhicheventsareavailable,thesounddesignertoolcanoutputaprogrammerreportthatliststheeventgroup'seventswiththeappropriatenamesandindiceslistedalongsidethem.
Note!-Aneventisretrievedfromapoolofevents(createdearlierifFMOD_EVENT_CACHEEVENTSflagwassetinEventSystem::getGroup/EventGroup::getGroup).-Datamaynotbeloadedfromthediskforthisevent,sothiseventmaytriggerdiskaccess.Ifyouwishtopre-empthisuseEventGroup::loadEventDatafirst.-Thepoolofeventshasasizedeterminedbythe'maxplaybacks'propertyintheFMODDesignertoolintheevent'spropertysheet.-Thepointertowillbegettingwillbeapointertooneoftheseeventinstances.-Ifyoucallthisfunctionmoretimesthanthereareeventinstances,thenaninventhandlemaybestolen,ormayfail.Thisbehaviouralsodeterminedbythesounddesigner.Thebehaviourmaybetostealtheoldesteventinthepool,stealthequietesteventinthepool,orsimplyfailthisgetEventandreturnnullastheeventhandle.
SeeAlso
EventSystem::getNumEventsFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getGroupRetrievesaneventgroupobjectbyname.
C++Syntax
FMOD_RESULTEventSystem::getGroup(
constchar*name,
boolcacheevents,
EventGroup**group
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetGroup(
FMOD_EVENTSYSTEM*eventsystem,
constchar*name,
FMOD_BOOLcacheevents,
FMOD_EVENTGROUP**group
);
Parameters
name
Thenameofaneventgroupthatbelongstothiseventsystem.Note:namemustincludefullpathincludingprojectnameandanyeventgroupnamese.g."myproject/group1/group2"
cacheevents
Ifcacheeventsistruethenalleventinstanceswithinthiseventgroupwillbepre-allocatedsothattherearenomemoryallocswhengetEventiscalled.
group
Addressofavariabletoreceivetheselectedeventgroupwithinthiseventsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whatisaneventgroup?Aneventgroupisa"folder"thatstoreseventsorsub-folders.Withthesefoldersahierarchicaltreecanbebuilttostoreeventsinamorelogicalmanner.
Inthiscaseweareretrievinganeventgroupfromanothereventgroup,soifthis
eventgroupobjectwas"examples"wecouldthengettheeventgroup"filters"with"filters"asthenameparameter.Inthisexample"filters"istheonlysub-groupbelow"examples"sonoothersub-groupsareavailablehere.
Iftheprogrammerdoesnotknowwhichsub-groupsareavailableorwhichsub-groupindexmatcheswhichsub-groupname,thesounddesignertoolcanoutputaprogrammerreportthatliststhegroup'ssub-groupswiththeappropriatenamesandindiceslistedalongsidethem.Theonlybenefitofretrievinganobjectbyindexisthatitisslightlyfastertodosothantoretrieveitbyname.
SeeAlso
EventGroup::getGroupEventGroup::getGroupByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getInfoRetrievesinformationabouttheeventsystem.
C++Syntax
FMOD_RESULTEventSystem::getInfo(
FMOD_EVENT_SYSTEMINFO*info
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetInfo(
FMOD_EVENTSYSTEM*eventsystem,
FMOD_EVENT_SYSTEMINFO*info
);
Parameters
info
AddressofanFMOD_EVENT_SYSTEMINFOstructuretoreceiveeventsysteminformation.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_EVENT_SYSTEMINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getLanguageRetrievesthecurrentlanguagesetbytheuser.
C++Syntax
FMOD_RESULTEventSystem::getLanguage(
char*language
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetLanguage(
FMOD_EVENTSYSTEM*eventsystem,
char*language
);
Parameters
language
Addressofavariabletoreceivethecurrentlysetlanguageinsidetheeventsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
NotethatthemaximumstringlengththatFMODwillwriteintois256bytes.Ifyou'renotsureofthelanguagestringlength,givethisfunctionapointertoabufferofatleast256bytes.
SeeAlso
EventSystem::setLanguage
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTEventSystem::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetMemoryInfo(
FMOD_EVENTSYSTEM*eventsystem,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getMusicCategoryRetrievethemusiceventcategory.
C++Syntax
FMOD_RESULTEventSystem::getMusicCategory(
EventCategory**category
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetMusicCategory(
FMOD_EVENTSYSTEM*eventsystem,
FMOD_EVENTCATEGORY**category
);
Parameters
category
Addressofavariabletoreceivethemusiceventcategorywithinthiseventsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::getCategoryEventSystem::getCategoryByIndexEventSystem::getNumCategories
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getMusicSystemC++Syntax
FMOD_RESULTEventSystem::getMusicSystem(
MusicSystem**musicsystem
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetMusicSystem(
FMOD_EVENTSYSTEM*eventsystem,
FMOD_MUSICSYSTEM**musicsystem
);
Parameters
musicsystem
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getNumCategoriesRetrievethenumberofcategoriesfortheeventsystem.
C++Syntax
FMOD_RESULTEventSystem::getNumCategories(
int*numcategories
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetNumCategories(
FMOD_EVENTSYSTEM*eventsystem,
int*numcategories
);
Parameters
numcategories
Addressofavariabletoreceivethenumberofcategoriesforthiseventsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::getCategoryByIndexEventSystem::getCategoryEventSystem::getMusicCategory
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getNumEventsGetsthetotalnumberofuniqueeventsloadedintothesystematonce,includingthosefromdifferentEventProjects.Mainlyusedforenumerationofalleventsloadedintothesystem.ThiscanbedoneinconjunctionwithEventSystem::getEventBySystemID.
C++Syntax
FMOD_RESULTEventSystem::getNumEvents(
int*numevents
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetNumEvents(
FMOD_EVENTSYSTEM*eventsystem,
int*numevents
);
Parameters
numevents
Pointertoaintegertoretrievethecurrentnumberofuniqueevents.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::getEventBySystemID
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getNumProjectsRetrievethenumberofeventprojectswithinthetopleveleventsystem.
C++Syntax
FMOD_RESULTEventSystem::getNumProjects(
int*numprojects
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetNumProjects(
FMOD_EVENTSYSTEM*eventsystem,
int*numprojects
);
Parameters
numprojects
Addressofavariabletoreceivethenumberofeventprojectswithinthetopleveleventsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::getProjectByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getNumReverbPresetsRetrievethenumberofreverbpresetsdefinedbythesounddesigner.
C++Syntax
FMOD_RESULTEventSystem::getNumReverbPresets(
int*numpresets
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetNumReverbPresets(
FMOD_EVENTSYSTEM*eventsystem,
int*numpresets
);
Parameters
numpresets
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UsethisinconjunctionwithEventSystem::getReverbPresetByIndextoenumerateallsounddesignerspecifiedreverbpresets.
SeeAlso
EventSystem::getReverbPresetByIndexEventSystem::getReverbPreset
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getProjectRetrieveaneventprojectobjectbyname.
C++Syntax
FMOD_RESULTEventSystem::getProject(
constchar*name,
EventProject**project
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetProject(
FMOD_EVENTSYSTEM*eventsystem,
constchar*name,
FMOD_EVENTPROJECT**project
);
Parameters
name
Thenameofaneventprojectwithinthiseventsystem.
project
Addressofavariabletoreceivetheselectedeventprojectwithinthiseventsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::getProjectByIndexEventSystem::load
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getProjectByIndexRetrieveaneventprojectobjectbyindex.
C++Syntax
FMOD_RESULTEventSystem::getProjectByIndex(
intindex,
EventProject**project
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetProjectByIndex(
FMOD_EVENTSYSTEM*eventsystem,
intindex,
FMOD_EVENTPROJECT**project
);
Parameters
index
Theindexofaneventprojectwithinthiseventsystemobject.Indicesare0based.
project
Addressofavariabletoreceivetheselectedeventprojectwithinthiseventsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::getProjectEventSystem::getNumProjectsEventSystem::load
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getReverbAmbientPropertiesRetrievesthedefaultreverbenvrionmentforthevirtualreverbsystem.
C++Syntax
FMOD_RESULTEventSystem::getReverbAmbientProperties(
FMOD_REVERB_PROPERTIES*props
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetReverbAmbientProperties(
FMOD_EVENTSYSTEM*eventsystem,
FMOD_REVERB_PROPERTIES*props
);
Parameters
props
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Bydefaulttheambientreverbissetto'off'.ThisisthesameasFMOD_REVERB_PRESET_OFF.
SeeAlso
FMOD_REVERB_PROPERTIESEventSystem::setReverbAmbientPropertiesEventSystem::createReverb
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getReverbPresetRetrievesareverbpropertystructurecontainingareverbpresetcreatedbythesounddesigner,byname.
C++Syntax
FMOD_RESULTEventSystem::getReverbPreset(
constchar*name,
FMOD_REVERB_PROPERTIES*props,
int*index
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetReverbPreset(
FMOD_EVENTSYSTEM*eventsystem,
constchar*name,
FMOD_REVERB_PROPERTIES*props,
int*index
);
Parameters
name
Thenameofaneventreverbwithinthiseventsystem.
props
index
Addressofavariabletoreceivetheindexofthepresetinthereverblist.Optional.ThisindexistheindexusedinEventSystem::getReverbPresetByIndex.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UsetheretrievedFMOD_REVERB_PROPERTIESstructuretopasstoEventSystem::setReverbProperties,EventSystem::setReverbAmbientPropertiesorEventReverb::setProperties.ReverbpresetscanalsoberetrievedwithEventSystem::getReverbPresetByIndex.
SeeAlso
FMOD_REVERB_PROPERTIESEventSystem::getReverbPresetByIndexEventSystem::setReverbPropertiesEventSystem::setReverbAmbientPropertiesEventReverb::setPropertiesEventReverb::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getReverbPresetByIndexRetrievesareverbpropertystructurecontainingareverbpresetcreatedbythesounddesigner,byindexinsteadofname.
C++Syntax
FMOD_RESULTEventSystem::getReverbPresetByIndex(
constintindex,
FMOD_REVERB_PROPERTIES*props,
char**name
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetReverbPresetByIndex(
FMOD_EVENTSYSTEM*eventsystem,
constintindex,
FMOD_REVERB_PROPERTIES*props,
char**name
);
Parameters
index
Theindexofaneventreverbwithinthiseventsystemobject.Indicesare0based.
props
name
Addressofavariabletoreceiveapointertothenameofthepreset.Optional.ThisindexisthenameusedinEventSystem::getReverbPreset.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.UsetheretrievedFMOD_REVERB_PROPERTIESstructuretopasstoEventSystem::setReverbProperties,EventSystem::setReverbAmbientPropertiesorEventReverb::setProperties.
Remarks
AllreverbscanbeenumeratedbyusingthisfunctioninconjunctionwithEventSystem::getNumReverbPresets.ReverbpresetscanalsoberetrievedwithEventSystem::getReverbPreset.
SeeAlso
FMOD_REVERB_PROPERTIESEventSystem::getReverbPresetEventSystem::getNumReverbPresetsEventReverb::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getReverbPropertiesRetrievesthecurrentreverbenvironment.
C++Syntax
FMOD_RESULTEventSystem::getReverbProperties(
FMOD_REVERB_PROPERTIES*props
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetReverbProperties(
FMOD_EVENTSYSTEM*eventsystem,
FMOD_REVERB_PROPERTIES*props
);
Parameters
props
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::setReverbPropertiesEvent::setReverbPropertiesEvent::getReverbProperties
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getSystemObjectRetrievetheeventsystem'sinternalFMOD::SystemobjectforthelowlevelFMODExAPI.
C++Syntax
FMOD_RESULTEventSystem::getSystemObject(
FMOD::System**system
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetSystemObject(
FMOD_EVENTSYSTEM*eventsystem,
FMOD_SYSTEM**system
);
Parameters
system
AddressofapointertoreceivetheFMOD::Systempointer.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note!Thisshouldgenerallynotbeusedunlessyouaretryingtoaddfeaturesthatthesounddesignercannotprovide!
TheaimofthisAPIistogivethesounddesignerthecontroloverthesoundbehaviour.IftherearethingsmissingfromtheEventSystemAPIthatcouldbeincludedcontactFMODsupportatsupport@fmod.organditwillbeconsideredforaddition.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getUserDataRetrievestheuservaluethatthatwassetbycallingtheEventSystem::setUserDatafunction.
C++Syntax
FMOD_RESULTEventSystem::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetUserData(
FMOD_EVENTSYSTEM*eventsystem,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeEventSystem::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::getVersionReturnsthecurrentversionoftheeventsystembeingused.
C++Syntax
FMOD_RESULTEventSystem::getVersion(
unsignedint*version
);
CSyntax
FMOD_RESULTFMOD_EventSystem_GetVersion(
FMOD_EVENTSYSTEM*eventsystem,
unsignedint*version
);
Parameters
version
Addressofavariablethatreceivesthecurrenteventsystemversion.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Theversionisa32bithexadecimalvalueformatedas16:8:8,withtheupper16bitsbeingthemajorversion,themiddle8bitsbeingtheminorversionandthebottom8bitsbeingthedevelopmentversion.Forexampleavalueof00010106hisequalto1.01.06.
SeeAlso
EventSystem::init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::initInitializestheeventsystemobject,FMODsystemobjectandthesounddevice.Thishastobecalledatthestartoftheuser'sprogram.YoumustcreateaneventsystemobjectwithEventSystem_Create.
C++Syntax
FMOD_RESULTEventSystem::init(
intmaxchannels,
FMOD_INITFLAGSflags,
void*extradriverdata,
FMOD_EVENT_INITFLAGSeventflags
);
CSyntax
FMOD_RESULTFMOD_EventSystem_Init(
FMOD_EVENTSYSTEM*eventsystem,
intmaxchannels,
FMOD_INITFLAGSflags,
void*extradriverdata,
FMOD_EVENT_INITFLAGSeventflags
);
Parameters
maxchannels
ThemaximumnumberofchannelstobeusedinFMOD.Theyarealsocalled'virtualchannels'asyoucanplayasmanyoftheseasyouwant,evenifyouonlyhaveasmallnumberofhardwareorsoftwarevoices.Seeremarksformore.
flags
SeeFMOD_INITFLAGS.ThiscanbeaselectionofflagsbitwiseOR'edtogethertochangethebehaviourofFMODatinitializationtime.
extradriverdata
Driverspecificdatathatcanbepassedtotheoutputplugin.Forexamplethefilenameforthewavwriterplugin.SeeFMOD_OUTPUTTYPEforwhateachoutputmodemighttakehere.Optional.Specify0toignore.
eventflags
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeFMODExdocumentationfordetailsonFMOD_INITFLAGSetc.
SeeAlso
EventSystem_Create
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::loadLoadsaneventfile(.fev).
C++Syntax
FMOD_RESULTEventSystem::load(
constchar*name_or_data,
FMOD_EVENT_LOADINFO*loadinfo,
EventProject**project
);
CSyntax
FMOD_RESULTFMOD_EventSystem_Load(
FMOD_EVENTSYSTEM*eventsystem,
constchar*name_or_data,
FMOD_EVENT_LOADINFO*loadinfo,
FMOD_EVENTPROJECT**project
);
Parameters
name_or_data
FilenameoftheeventfiletobeloadedorpointertomemoryblockifFMOD_EVENT_LOADINFOisprovidedandhasanon-zero"loadfrommemory_length"field.
loadinfo
PointertoanFMOD_EVENT_LOADINFOstructurewhichletstheuserprovideextendedinformationaboutloadingthefile.Optional.Specify0orNULLtoignore.
project
Addressofavariabletoreceivethespecifiedprojectobject.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
LoadingtheeventdatafilewillnotopenanyFSBfilesorallocateanymemoryforevents.ThisisdonewithEventGroup::loadEventData(toloadFSBdata)andEventProject::getGroup/EventProject::getGroupByIndex/EventGroup::getGroup/EventGroup::getGroupByIndextoallocatememoryfortheeventinstancessothattheycanbeplayed.Toloada.fevfilefrommemory,passapointertothememoryblockin"name_or_data"andprovideanFMOD_EVENT_LOADINFOstructurewiththe"loadfrommemory_length"fieldsettothelengthofthememoryblock.Thememoryblockcanbefreedimmediatelyafterthisfunctionreturns.
Note:CurrentlyFMODcanonlyloadoneprojectthatcontainsmusicdataatatime.MusicdataiscreatedwheneveryoudoworkinthemusictabinFMODDesigner.FMOD_ERR_UNSUPPORTEDwillbereturnedifyoutrytoloadmorethanoneprojectcontainingmusicdata.
SeeAlso
EventSystem::setMediaPathEventGroup::loadEventDataEventSystem::getProjectEventSystem::getProjectByIndexEventSystem::unloadEventGroup::getGroupEventGroup::getGroupByIndexEventProject::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::preloadFSBForusersthatwanttopre-loadstaticsampleFSBfilesintomemory,thisfunctioncanbeusedtostopFMODfromloadinganyFSBwiththesamefilenamefromdisk.
C++Syntax
FMOD_RESULTEventSystem::preloadFSB(
constchar*filename,
intstreaminstance,
FMOD::Sound*sound,
boolunloadprevious
);
CSyntax
FMOD_RESULTFMOD_EventSystem_PreloadFSB(
FMOD_EVENTSYSTEM*eventsystem,
constchar*filename,
intstreaminstance,
FMOD_SOUND*sound,
FMOD_BOOLunloadprevious
);
Parameters
filename
FilenamethatFMODeventsystemwouldusetoload.FMODwillcomparethisstringagainstmediapath+fsbfilenameorjustfsbfilenamebyitself.
streaminstance
Ifabankisstreaming,thisistheinstancenumberoutofthetotalstreamsinstancesthatmightbepossiblyusedforthisbank(see'MaxStreams'inthewavebankssettings).Forsamplebasedbanksjustsupply0.Seeremarksformore.
sound
PointertoapreloadedFSBfile,withSystem::createSound.
unloadprevious
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Fordatathathasalreadybeenloadedintomemorybytheuser,useFMOD_OPENMEMORY_POINTwhencreatingasoundtostopitduplicatingmemory.
IfyouuseFMOD_OPENMEMORY_POINT,donotfreethememoryuntilyouhavecalledEventSystem::unloadFSB.OnPlaystation2,youcannot'point'toVAGdatainEEram.YouwillhavetouseFMOD_OPENMEMORYinstead,thenyoucanfreethedatafromEEram.
Moreon'streaminstance'.Ifaneventreferstoabankmorethanonce,forexampleithas'MaxPlaybacks'settosomethinghigherthan1,say4,thenyouwillneedtoopenthebank4timesandcallthisfunction4times,eachwithadifferentinstancenumbertostopFMODfromtryingtoloaditfromdisk.Thisnumberofinstanceswillusuallycorrespondtothenumberofstreamsspecifiedinthewavebankscreenunder'Maxstreams'.Notethoughthatthevaluesetindesignermightbetoohigh.Itisworthbeingcarefulandcountingwhateventsusethebankatthesametimeotherwiseyoumightbepreloadingtoomanystreamsthatarenotused,wastingmemory.Asanexampleifyouonlycalledthisfunctiononce,thefirstinstanceofthestreamwouldbepreloaded,buttheother3wouldattempttoloadfromdiskasifitwasnotpreloaded.streaminstancehasnorelevancetosamplebasedbanks,theyareonlyeveropenedonceinsidefmod,so0canbeusedhereandonlypreloaditonce.Ifyouhave1eventwith1soundthatreferstothebankonce,justsupply0.
SeeAlso
EventSystem::unloadFSBSystem::createSoundSystem::createStreamFMOD_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::registerDSPRegisterauser-definedDSPeffectforusewiththeEventSystem.Thisfunctionallowsyoutoregisterstatically-linkedDSPeffects.Onceregistered,youcancreateinstancesoftheDSPeffectbyusingSystem::createDSPByPlugin.
C++Syntax
FMOD_RESULTEventSystem::registerDSP(
FMOD_DSP_DESCRIPTION*description,
unsignedint*handle
);
CSyntax
FMOD_RESULTFMOD_EventSystem_RegisterDSP(
FMOD_EVENTSYSTEM*eventsystem,
FMOD_DSP_DESCRIPTION*description,
unsignedint*handle
);
Parameters
description
AddressofanFMOD_DSP_DESCRIPTIONstructure,containinginformationabouttheDSPeffect.
handle
Addressofavariabletoreceivethepluginhandleofthenewly-registeredDSPeffect.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_DSP_DESCRIPTIONSystem::registerDSPSystem::createDSPByPluginSystem::getNumPluginsSystem::getPluginInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::releaseClosesandfreesaneventsystemobject.
C++Syntax
FMOD_RESULTEventSystem::release();
CSyntax
FMOD_RESULTFMOD_EventSystem_Release(FMOD_EVENTSYSTEM*eventsystem
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thiswillfreetheeventsystemobjectandeverythingcreatedunderit.
SeeAlso
EventSystem_CreateEventSystem::init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::set3DListenerAttributesThisupdatestheposition,velocityandorientationofthespecified3Dsoundlistener.
C++Syntax
FMOD_RESULTEventSystem::set3DListenerAttributes(
intlistener,
constFMOD_VECTOR*pos,
constFMOD_VECTOR*vel,
constFMOD_VECTOR*forward,
constFMOD_VECTOR*up
);
CSyntax
FMOD_RESULTFMOD_EventSystem_Set3DListenerAttributes(
FMOD_EVENTSYSTEM*eventsystem,
intlistener,
constFMOD_VECTOR*pos,
constFMOD_VECTOR*vel,
constFMOD_VECTOR*forward,
constFMOD_VECTOR*up
);
Parameters
listener
ListenerIDinamulti-listenerenvironment.Specify0ifthereisonly1listener.
pos
Addressofavariablethatreceivesthepositionofthelistenerinworldspace,measuredindistanceunits.Youcanspecify0orNULLtonotupdatetheposition.
vel
Addressofavariablethatreceivesthevelocityofthelistenermeasuredin
distanceunitspersecond.Youcanspecify0orNULLtonotupdatethevelocityofthelistener.
forward
Addressofavariablethatreceivestheforwardsorientationofthelistener.Thisvectormustbeofunitlengthandperpendiculartotheupvector.Youcanspecify0orNULLtonotupdatetheforwardsorientationofthelistener.
up
Addressofavariablethatreceivestheupwardsorientationofthelistener.Thisvectormustbeofunitlengthandperpendiculartotheforwardsvector.Youcanspecify0orNULLtonotupdatetheupwardsorientationofthelistener.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Bydefault,FMODusesaleft-handedco-ordinatesystem.Thismeans+Xisright,+Yisup,and+Zisforwards.Tochangethistoaright-handedcoordinatesystem,useFMOD_INIT_3D_RIGHTHANDED.Thismeans+Xisright,+Yisup,and+Zisbackwardsortowardsyou.
Tomaptoanothercoordinatesystem,flip/negateandexchangethesevalues.
OrientationvectorsareexpectedtobeofUNITlength.Thismeansthemagnitudeofthevectorshouldbe1.0.
A'distanceunit'isspecifiedbythesounddesignerintheFMODDesignertool.Bydefaultthisissettometerswhichisadistancescaleof1.0.
Alwaysremembertouseunitspersecond,notunitsperframeasthisisacommonmistakeandwillmakethedopplereffectsoundwrong.Forexample,Donotjustuse(pos-lastpos)fromthelastframe'sdataforvelocity,asthisisnotcorrect.Youneedtotimecompensateitsoitisgiveninunitspersecond.Youcouldalteryourpos-lastposcalculationtosomethinglikethis.
vel=(pos-lastpos)/time_taken_since_last_frame_in_seconds.
I.e.at60fpstheformulawouldlooklikethisvel=(pos-lastpos)/0.0166667.
SeeAlso
EventSystem::get3DListenerAttributesFMOD_INITFLAGSFMOD_VECTOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::set3DNumListenersSetsthenumberof3D'listeners'inthe3Dsoundscene.Thisfunctionisusefulmainlyforsplit-screengamepurposes.
C++Syntax
FMOD_RESULTEventSystem::set3DNumListeners(
intnumlisteners
);
CSyntax
FMOD_RESULTFMOD_EventSystem_Set3DNumListeners(
FMOD_EVENTSYSTEM*eventsystem,
intnumlisteners
);
Parameters
numlisteners
Numberoflistenersinthescene.Validvaluesarefrom1-4inclusive.Default=1.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifthenumberoflistenersissettomorethan1,thenpanninganddopplerareturnedoff.Allsoundeffectswillbemono.
FMODusesa'closestsoundtothelistener'methodtodeterminewhatshouldbeheardinthiscase.
SeeAlso
EventSystem::get3DNumListenersEventSystem::set3DListenerAttributes
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::setLanguageGloballysetstherequestedlanguageforfutureloadingofwavebanks,wheremultiplelanguagesaresupported.FEVfilesthatareloadedfromthispointonwillloadthebanksthatmatchwiththeselectedlanguage.
C++Syntax
FMOD_RESULTEventSystem::setLanguage(
constchar*language
);
CSyntax
FMOD_RESULTFMOD_EventSystem_SetLanguage(
FMOD_EVENTSYSTEM*eventsystem,
constchar*language
);
Parameters
language
Astringcontainingtherequestedlanguage.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctioncanbecalledafterEventSystem::load.Ifacurrentlanguagerelatedbankisloaded,thenEventGroup::freeEventDataneedstobecalledtounloadit,
followedbyacalltothisfunctionthenEventGroup::loadEventData/EventGroup::getEventwillbeneeded.Thereisnoerrorcheckingonlanguagestringspassedin.Ifthelanguagedoesnotexistthenitwillbeignoreduponloadingwavebanksandthepreviousordefaultlanguagewillbeused.Upperorlowercaseisnotimportantinthisfunction,FMODwillmatchthestringagainsttheinternallystoredFEVlanguagelistwithoutregardforcase.
SeeAlso
EventSystem::getLanguageEventGroup::loadEventDataEventGroup::freeEventDataEventGroup::getEvent
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::setMediaPathSpecifyabasesearchpathformediafilessotheycanbeplacedsomewhereotherthanthedirectoryofthemainexecutable.
C++Syntax
FMOD_RESULTEventSystem::setMediaPath(
constchar*path
);
CSyntax
FMOD_RESULTFMOD_EventSystem_SetMediaPath(
FMOD_EVENTSYSTEM*eventsystem,
constchar*path
);
Parameters
path
Acharacterstringcontainingacorrectlyformattedpathtoloadmediafilesfrom.NOTE:Mustcontainatrailingslash/backslashiffilesystemrequiresit!
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
FMODusedtoaddaslash/backslashseperatorbetweenthepathprovidedhereandthefilesthatitneededtoload.Thiscausedinconsistentandinflexible
behavioursothisfunctionhasbeenchangedtoexpectapaththatalreadycontainsatrailingslash/backslash.FMODwillnolongeraddanyslash/backslashseperatorsbetweenthepathspecifiedhereandthefilesthatitneedstoload.Thisallowstheusertoprovidethecorrectseperatorforthefilesysteminuse-whichmayactuallybetheuser'sownfilesystemwhichmayormaynotuseaseperatoratall.
SeeAlso
EventSystem::load
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::setPluginPathSpecifyabasesearchpathforpluginssotheycanbeplacedsomewhereotherthanthedirectoryofthemainexecutable.
C++Syntax
FMOD_RESULTEventSystem::setPluginPath(
constchar*path
);
CSyntax
FMOD_RESULTFMOD_EventSystem_SetPluginPath(
FMOD_EVENTSYSTEM*eventsystem,
constchar*path
);
Parameters
path
Acharacterstringcontainingacorrectlyformattedpathtoloadpluginsfrom.Youcanspecify0orNULLtotellFMODnottoloadanyplugins.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::load
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::setReverbAmbientPropertiesSetsa'background'defaultreverbenvironmentforthevirtualreverbsystem.Thisisareverbpresetthatwillbemorphedtoifthelistenerisnotwithinanyvirtualreverbzones.Bydefaulttheambientreverbissetto'off'.
C++Syntax
FMOD_RESULTEventSystem::setReverbAmbientProperties(
FMOD_REVERB_PROPERTIES*props
);
CSyntax
FMOD_RESULTFMOD_EventSystem_SetReverbAmbientProperties(
FMOD_EVENTSYSTEM*eventsystem,
FMOD_REVERB_PROPERTIES*props
);
Parameters
props
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThereisonereverbDSPdedicatedtoprovidinga3Dreverbeffect.ThisDSP'spropertiesareaweightedsumofallthecontributingvirtualreverbs.Thedefault3dreverbpropertiesspecifythereverbpropertiesinthe3Dvolumes
whichhasnovirtualreverbsdefined.
EventSystem::getReverbPresetandEventSystem::getReverbPresetByIndexcanbeusedtoretrievesounddesignerdefinedpresets,oritcanbesetprogramatically.
SeeAlso
FMOD_REVERB_PROPERTIESEventSystem::getReverbAmbientPropertiesEventSystem::createReverbEventSystem::getReverbPresetEventSystem::getReverbPresetByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::setReverbPropertiesSetsparametersfortheglobalreverbenvironment.Reverbparameterscanbesetmanually,orautomaticallyusingthepre-definedpresetsgiveninthefmod.hheader.
C++Syntax
FMOD_RESULTEventSystem::setReverbProperties(
constFMOD_REVERB_PROPERTIES*props
);
CSyntax
FMOD_RESULTFMOD_EventSystem_SetReverbProperties(
FMOD_EVENTSYSTEM*eventsystem,
constFMOD_REVERB_PROPERTIES*props
);
Parameters
props
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
EventSystem::getReverbPresetandEventSystem::getReverbPresetByIndexcanbeusedtoretrievesounddesignerdefinedpresets,oritcanbesetprogramatically.
SeeAlso
FMOD_REVERB_PROPERTIESEventSystem::getReverbPropertiesEvent::setReverbPropertiesEvent::getReverbPropertiesEventSystem::getReverbPresetEventSystem::getReverbPresetByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::setUserDataSetsauservaluethattheEventSystemobjectwillstoreinternally.CanberetrievedwithEventSystem::getUserData.
C++Syntax
FMOD_RESULTEventSystem::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_EventSystem_SetUserData(
FMOD_EVENTSYSTEM*eventsystem,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheEventSystemobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingEventSystem::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
EventSystem::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::unloadUnloadsallloadedeventprojects.
C++Syntax
FMOD_RESULTEventSystem::unload();
CSyntax
FMOD_RESULTFMOD_EventSystem_Unload(FMOD_EVENTSYSTEM*eventsystem);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisunloadsallloadedprojects.Ifyouwanttounloadasingleproject,useEventProject::release.
SeeAlso
EventSystem::loadEventProject::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::unloadFSBDe-registerapreloadedFSBfromtheeventsystem.
C++Syntax
FMOD_RESULTEventSystem::unloadFSB(
constchar*filename,
intstreaminstance
);
CSyntax
FMOD_RESULTFMOD_EventSystem_UnloadFSB(
FMOD_EVENTSYSTEM*eventsystem,
constchar*filename,
intstreaminstance
);
Parameters
filename
FSBfilenametounregister.
streaminstance
Ifastreamingfsbhasbeenregisteredmultipletimes,thisvaluerepresentswhichinstanceofthefilenameshouldbeunloaded.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
AnyreferencestothisfilenamebytheEventSysteminternallywillbeloadedfromdiskasnormalifthisFSBisunregisteredasapreloadedFSB.
SeeAlso
EventSystem::preloadFSB
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventSystem::updateUpdatestheeventsystem.Thisshouldbecalledonceper'game'tick,oronceperframeinyourapplication.
C++Syntax
FMOD_RESULTEventSystem::update();
CSyntax
FMOD_RESULTFMOD_EventSystem_Update(FMOD_EVENTSYSTEM*eventsystem);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProjectInterfaceEventProject::cancelAllLoadsEventProject::getEventEventProject::getEventByProjectIDEventProject::getGroupEventProject::getGroupByIndexEventProject::getInfoEventProject::getMemoryInfoEventProject::getNumEventsEventProject::getNumGroupsEventProject::getUserDataEventProject::loadSampleDataEventProject::releaseEventProject::setUserDataEventProject::stopAllEvents
FirelightTechnologiesFMODEx
EventProject::cancelAllLoadsCancelsanyqueuedupasynchronousloadscausedbyFMOD_EVENT_NONBLOCKINGflag.
C++Syntax
FMOD_RESULTEventProject::cancelAllLoads();
CSyntax
FMOD_RESULTFMOD_EventProject_CancelAllLoads(FMOD_EVENTPROJECT*eventproject
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note,ifthisfunctioniscalled,theeventGroupthatyouareloadingmayonlybehalfloaded.ThestateoftheeventgroupissettoFMOD_ERR_FILE_DISKEJECTED.Toclearthisstateandfullyloadtheeventgroup,itmayhavetobeunloadedwithEventGroup::freeEventDataandreloadedagainwithEventGroup::loadEventData.
SeeAlso
EventProject::stopAllEventsEventGroup::loadEventDataEventGroup::freeEventDataFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::getEventRetrieveaneventobjectbyname.
C++Syntax
FMOD_RESULTEventProject::getEvent(
constchar*name,
FMOD_EVENT_MODEmode,
Event**event
);
CSyntax
FMOD_RESULTFMOD_EventProject_GetEvent(
FMOD_EVENTPROJECT*eventproject,
constchar*name,
FMOD_EVENT_MODEmode,
FMOD_EVENT**event
);
Parameters
name
Thenameofaneventwithinthiseventproject.Note:namemustincludefullpathincludinganyeventgroupnamese.g."group1/group2/myevent"
mode
IfnotalreadyloadedwithEventGroup::loadEventData,thisFMOD_EVENT_MODEflagwilldetermineifdatashouldbeloadedfromdisksynchronouslyorasynchronously.Italsoallowsan'infoonly'eventretreival(eventsthatcantbeplayed)andcanbeusedtoproduceanerrorondiskaccess.
event
Addressofavariabletoreceivetheselectedeventwithinthiseventproject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whatisanevent?Aneventistheleafoftheeventgrouptree.Itistheactualsoundtobeplayedwithcomplexbehaviourdesignedbythesounddesigner.
Inthiscaseweareretrievinganeventfromaneventgroup,sowiththe"filters"
groupwecouldgettheechoeventwith"echo"asthenameparameter.
Iftheprogrammerdoesnotknowwhicheventsareavailable,thesounddesignertoolcanoutputaprogrammerreportthatliststheeventgroup'seventswiththeappropriatenamesandindiceslistedalongsidethem.
Note!-Aneventisretrievedfromapoolofevents(createdearlierifFMOD_EVENT_CACHEEVENTSflagwassetinEventSystem::getGroup/EventGroup::getGroup).-Datamaynotbeloadedfromthediskforthisevent,sothiseventmaytriggerdiskaccess.Ifyouwishtopre-empthisuseEventGroup::loadEventDatafirst.-Thepoolofeventshasasizedeterminedbythe'maxplaybacks'propertyintheFMODDesignertoolintheevent'spropertysheet.-Thepointertowillbegettingwillbeapointertooneoftheseeventinstances.-Ifyoucallthisfunctionmoretimesthanthereareeventinstances,thenaneventhandlemaybestolen,ormayfail.Thisbehaviouralsodeterminedbythesounddesigner.Thebehaviourmaybetostealtheoldesteventinthepool,stealthequietesteventinthepool,orsimplyfailthisgetEventandreturnnullastheeventhandle.
SeeAlso
EventProject::getEventByProjectIDEventGroup::getEventByIndexEventSystem::getGroupEventGroup::getGroupFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::getEventByProjectIDRetrieveaneventhandlebyaprojectuniqueid.
C++Syntax
FMOD_RESULTEventProject::getEventByProjectID(
unsignedintprojectid,
FMOD_EVENT_MODEmode,
Event**event
);
CSyntax
FMOD_RESULTFMOD_EventProject_GetEventByProjectID(
FMOD_EVENTPROJECT*eventproject,
unsignedintprojectid,
FMOD_EVENT_MODEmode,
FMOD_EVENT**event
);
Parameters
projectid
Theprojectidofaneventwithinthiseventproject.Uniqueidscanbefoundintheprogrammerreportgeneratedwhentheprojectisbuilt,andtheCheader.
mode
IfnotalreadyloadedwithEventGroup::loadEventData,thisFMOD_EVENT_MODEflagwilldetermineifdatashouldbeloadedfromdisksynchronouslyorasynchronously.Italsoallowsan'infoonly'eventretreival(eventsthatcantbeplayed)andcanbeusedtoproduceanerrorondiskaccess.
event
Addressofavariabletoreceivetheselectedeventwithinthiseventproject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whatisanevent?Aneventistheleafoftheeventgrouptree.Itistheactualsoundtobeplayedwithcomplexbehaviourdesignedbythesounddesigner.
Inthiscaseweareretrievinganeventfromaneventgroup,sowiththe"filters"
groupwecouldgettheechoeventwith"echo"asthenameparameter.
Iftheprogrammerdoesnotknowwhicheventsareavailable,thesounddesignertoolcanoutputaprogrammerreportthatliststheeventgroup'seventswiththeappropriatenamesandindiceslistedalongsidethem.
Note!-Aneventisretrievedfromapoolofevents(createdearlierifFMOD_EVENT_CACHEEVENTSflagwassetinEventSystem::getGroup/EventGroup::getGroup).-Datamaynotbeloadedfromthediskforthisevent,sothiseventmaytriggerdiskaccess.Ifyouwishtopre-empthisuseEventGroup::loadEventDatafirst.-Thepoolofeventshasasizedeterminedbythe'maxplaybacks'propertyintheFMODDesignertoolintheevent'spropertysheet.-Thepointertowillbegettingwillbeapointertooneoftheseeventinstances.-Ifyoucallthisfunctionmoretimesthanthereareeventinstances,thenaneventhandlemaybestolen,ormayfail.Thisbehaviouralsodeterminedbythesounddesigner.Thebehaviourmaybetostealtheoldesteventinthepool,stealthequietesteventinthepool,orsimplyfailthisgetEventandreturnnullastheeventhandle.
SeeAlso
EventProject::getEventEventProject::getNumEventsEventGroup::getEventByIndexEventSystem::getGroupEventGroup::getGroupFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::getGroupRetrievesaneventgroupobjectbyname.
C++Syntax
FMOD_RESULTEventProject::getGroup(
constchar*name,
boolcacheevents,
EventGroup**group
);
CSyntax
FMOD_RESULTFMOD_EventProject_GetGroup(
FMOD_EVENTPROJECT*eventproject,
constchar*name,
FMOD_BOOLcacheevents,
FMOD_EVENTGROUP**group
);
Parameters
name
Thenameofaneventgroupthatbelongstothiseventproject.
cacheevents
Ifcacheeventsistruethenalleventinstanceswithinthiseventgroupwillbepre-allocatedsothattherearenomemoryallocswhengetEventiscalled.
group
Addressofavariabletoreceivetheselectedeventgroupwithinthiseventproject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventProject::getGroupByIndexEventGroup::getGroupEventGroup::getGroupByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::getGroupByIndexRetrievesaneventgroupobjectbyindex.
C++Syntax
FMOD_RESULTEventProject::getGroupByIndex(
intindex,
boolcacheevents,
EventGroup**group
);
CSyntax
FMOD_RESULTFMOD_EventProject_GetGroupByIndex(
FMOD_EVENTPROJECT*eventproject,
intindex,
FMOD_BOOLcacheevents,
FMOD_EVENTGROUP**group
);
Parameters
index
Theindexofaneventgroupwithinthiseventproject.Indicesare0based.
cacheevents
Ifcacheeventsistruethenalleventinstanceswithinthiseventgroupwillbepre-allocatedsothattherearenomemoryallocswhengetEventiscalled.
group
Addressofavariabletoreceivetheselectedeventgroupwithinthiseventproject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventProject::getNumGroupsEventProject::getGroupEventGroup::getGroupEventGroup::getGroupByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::getInfoRetrieveinformationaboutthiseventproject.
C++Syntax
FMOD_RESULTEventProject::getInfo(
FMOD_EVENT_PROJECTINFO*info
);
CSyntax
FMOD_RESULTFMOD_EventProject_GetInfo(
FMOD_EVENTPROJECT*eventproject,
FMOD_EVENT_PROJECTINFO*info
);
Parameters
info
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventGroup::getInfoEvent::getInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTEventProject::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_EventProject_GetMemoryInfo(
FMOD_EVENTPROJECT*eventproject,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::getNumEventsReturnsthetotalnumberofeventsforthisprojectonly.
C++Syntax
FMOD_RESULTEventProject::getNumEvents(
int*numevents
);
CSyntax
FMOD_RESULTFMOD_EventProject_GetNumEvents(
FMOD_EVENTPROJECT*eventproject,
int*numevents
);
Parameters
numevents
Addressofavariabletoreceivethenumberofeventsinthisproject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventProject::getEventByProjectID
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::getNumGroupsRetrievesthenumberofeventgroupsstoredwithinthiseventproject.
C++Syntax
FMOD_RESULTEventProject::getNumGroups(
int*numgroups
);
CSyntax
FMOD_RESULTFMOD_EventProject_GetNumGroups(
FMOD_EVENTPROJECT*eventproject,
int*numgroups
);
Parameters
numgroups
Addressofavariabletoreceivethenumberofgroupswithinthiseventproject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventProject::getGroupByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::getUserDataRetrievestheuservaluethatthatwassetbycallingtheEventProject::setUserDatafunction.
C++Syntax
FMOD_RESULTEventProject::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_EventProject_GetUserData(
FMOD_EVENTPROJECT*eventproject,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeEventProject::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventProject::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::loadSampleDataLoadsampledataformultipleevents/eventgroupsatonceinanoptimizedway.
C++Syntax
FMOD_RESULTEventProject::loadSampleData(
int*eventid_array,
intsizeof_eventid_array,
char**groupname_array,
intsizeof_groupname_array,
FMOD_EVENT_MODEeventmode
);
CSyntax
FMOD_RESULTFMOD_EventProject_LoadSampleData(
FMOD_EVENTPROJECT*eventproject,
int*eventid_array,
intsizeof_eventid_array,
char**groupname_array,
intsizeof_groupname_array,
FMOD_EVENT_MODEeventmode
);
Parameters
eventid_array
AddressofanarrayofprojectIDsofeventstoloadsampledatafor.Note:TheseareprojectIDs,notsystemIDs.
sizeof_eventid_array
NumberofprojectIDsintheeventid_array.
groupname_array
Addressofanarrayofeventgroupnamestoloadsampledatafor.Note:eventgroupnamesmustbespecifiedusingtheirfullpath.
sizeof_groupname_array
Numberofeventgroupnamesinthegroupname_array.
eventmode
UseeitherFMOD_EVENT_DEFAULTforblockingbehaviourorFMOD_EVENT_NONBLOCKINGfornon-blockingbehaviour.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisisthefastestwayofloadingadisparateassortmentofeventsandeventgroups.It'sfasterthanmultiplecallstoEventGroup::loadEventDatabecauseitglobstogethertheinformationonwhatFSBsubsoundsarerequiredandthenperformsonebigFSBreadtoloadtheminallatthesametimewithminimalseeking.
Usethisfunctionwhenyouwanttoloadapre-definedsetofeventsand/oreventgroupsinonebigchunke.g.atthestartofalevel.Ifyourequiremore"randomaccess"or"on-the-fly"loadingofevents/eventgroupsthenEventGroup::loadEventDatamaybeabetterfit.
Example:
constintSIZEOF_EVENTID_ARRAY=4;
inteventid_array[SIZEOF_EVENTID_ARRAY]=
{
EVENT_EXAMPLES_FEATUREDEMONSTRATION_BASICS_SIMPLEEVENT,
EVENT_EXAMPLES_FEATUREDEMONSTRATION_SEQUENCINGANDSTITCHING_PROGRAMMERSELECTED,
EVENT_EXAMPLES_ADVANCEDTECHNIQUES_CAR,
EVENT_EXAMPLES_ADVANCEDTECHNIQUES_LOOPBASEDMUSIC,
};
constintSIZEOF_GROUPNAME_ARRAY=2;
char*groupname_array[SIZEOF_GROUPNAME_ARRAY]=
{
"FeatureDemonstration/Randomization",
"FeatureDemonstration/Effects",
};
result=eventproject->loadSampleData(eventid_array,SIZEOF_EVENTID_ARRAY,groupname_array,SIZEOF_GROUPNAME_ARRAY,
SeeAlso
EventGroup::loadEventDataEventGroup::freeEventDataFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::releaseReleasethiseventprojectandalltheevents/eventgroupsthatitcontains.
C++Syntax
FMOD_RESULTEventProject::release();
CSyntax
FMOD_RESULTFMOD_EventProject_Release(FMOD_EVENTPROJECT*eventproject
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note:ThisfunctionmayblockmomentarilyifthereareasynchronousloadscurrentlyqueuedupduetoFMOD_NONBLOCKING/FMOD_EVENT_NONBLOCKINGuse.
SeeAlso
EventSystem::getProjectEventSystem::getProjectByIndexEventSystem::unload
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::setUserDataSetsauservaluethattheEventProjectobjectwillstoreinternally.CanberetrievedwithEventProject::getUserData.
C++Syntax
FMOD_RESULTEventProject::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_EventProject_SetUserData(
FMOD_EVENTPROJECT*eventproject,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheEventProjectobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingEventProject::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
EventProject::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventProject::stopAllEventsStopalleventsinthisproject.
C++Syntax
FMOD_RESULTEventProject::stopAllEvents(
boolimmediate
);
CSyntax
FMOD_RESULTFMOD_EventProject_StopAllEvents(
FMOD_EVENTPROJECT*eventproject,
FMOD_BOOLimmediate
);
Parameters
immediate
Avaluetopassasthe'immediate'parametertoEvent::stop
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctionsimplyiteratesthroughalleventsintheprojectandcallsEvent::stoponthem.
SeeAlso
Event::stop
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroupInterfaceEventGroup::freeEventDataEventGroup::getEventEventGroup::getEventByIndexEventGroup::getGroupEventGroup::getGroupByIndexEventGroup::getInfoEventGroup::getMemoryInfoEventGroup::getNumEventsEventGroup::getNumGroupsEventGroup::getNumPropertiesEventGroup::getParentGroupEventGroup::getParentProjectEventGroup::getPropertyEventGroup::getPropertyByIndexEventGroup::getStateEventGroup::getUserDataEventGroup::loadEventDataEventGroup::setUserData
FirelightTechnologiesFMODEx
EventGroup::freeEventDataFreethewavedataandeventinstancesforanEventGroupandallsubgroupsunderitorforjustasinglespecifiedevent.
C++Syntax
FMOD_RESULTEventGroup::freeEventData(
Event*event,
boolwaituntilready
);
CSyntax
FMOD_RESULTFMOD_EventGroup_FreeEventData(
FMOD_EVENTGROUP*eventgroup,
FMOD_EVENT*event,
FMOD_BOOLwaituntilready
);
Parameters
event
Singleeventtofreeresourcesfor.Specify0orNULLtoignore.Note:ThespecifiedeventmustexistinthisEventGroup,notinachildofthisEventGroup.
waituntilready
IfTRUE,thisfunctionwillblockuntilallpendingasynchronousloadshavecompletedbeforefreeingtheeventdata.IfFALSE,thisfunctionwillreturnFMOD_ERR_NOTREADYifanyasynchronousloadsarependinganditwillNOTfreeanyeventdata.Default=TRUE.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.Ifthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedinthe
FMOD_RESULTenumeration.
Remarks
IfnoeventisspecifiedthenresourcesforalleventsinthisEventGroup,andallEventGroupswithinthisEventGroup,willbefreed.Ifaneventisspecifiedthenallresourcesforallinstancesofthateventonlywillbefreed.NOTE:Thisfunctiondoesnotcompletelyremoveeventsfrommemory,itsimplyfreesanyeventinstancesandwavedataallocatedbythem.Tocompletelyremoveeventsfrommemory,useEventSystem::unload.Usewaituntilready=falseintime-criticalsituationstoavoidblockingthemainthread.NotethatifFMOD_ERR_NOTREADYisreturnedfromthisfunctionthennoeventdatawasactuallyfreed-youwillneedtocallthisfunctionagainuntilitsucceeds.
Note:Donotcallthisfunctionfromaneventcallback!
SeeAlso
EventGroup::loadEventDataEventSystem::getGroupEvent::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getEventRetrieveaaneventobjectbyname.
C++Syntax
FMOD_RESULTEventGroup::getEvent(
constchar*name,
FMOD_EVENT_MODEmode,
Event**event
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetEvent(
FMOD_EVENTGROUP*eventgroup,
constchar*name,
FMOD_EVENT_MODEmode,
FMOD_EVENT**event
);
Parameters
name
Thenameofaneventwithinthiseventgroup.
mode
IfnotalreadyloadedwithEventGroup::loadEventData,thisFMOD_EVENT_MODEflagwilldetermineifdatashouldbeloadedfromdisksynchronouslyorasynchronously.Italsoallowsan'infoonly'eventretreival(eventsthatcantbeplayed)andcanbeusedtoproduceanerrorondiskaccess.
event
Addressofavariabletoreceivetheselectedeventwithinthiseventgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whatisanevent?Aneventistheleafoftheeventgrouptree.Itistheactualsoundtobeplayedwithcomplexbehaviourdesignedbythesounddesigner.
Inthiscaseweareretrievinganeventfromaneventgroup,sowiththe"filters"
groupwecouldgettheechoeventwith"echo"asthenameparameter.
Iftheprogrammerdoesnotknowwhicheventsareavailable,thesounddesignertoolcanoutputaprogrammerreportthatliststheeventgroup'seventswiththeappropriatenamesandindiceslistedalongsidethem.
Note!-Aneventisretrievedfromapoolofevents(createdearlierifFMOD_EVENT_CACHEEVENTSflagwassetinEventSystem::getGroup/EventGroup::getGroup).-Datamaynotbeloadedfromthediskforthisevent,sothiseventmaytriggerdiskaccess.Ifyouwishtopre-empthisuseEventGroup::loadEventDatafirst.-Thepoolofeventshasasizedeterminedbythe'maxplaybacks'propertyintheFMODDesignertoolintheevent'spropertysheet.-Thepointertowillbegettingwillbeapointertooneoftheseeventinstances.-Ifyoucallthisfunctionmoretimesthanthereareeventinstances,thenaninventhandlemaybestolen,ormayfail.Thisbehaviouralsodeterminedbythesounddesigner.Thebehaviourmaybetostealtheoldesteventinthepool,stealthequietesteventinthepool,orsimplyfailthisgetEventandreturnnullastheeventhandle.
SeeAlso
EventGroup::getEventByIndexEventSystem::getGroupEventGroup::getGroupFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getEventByIndexRetrieveaneventobjectbyindexforthisgroup.
C++Syntax
FMOD_RESULTEventGroup::getEventByIndex(
intindex,
FMOD_EVENT_MODEmode,
Event**event
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetEventByIndex(
FMOD_EVENTGROUP*eventgroup,
intindex,
FMOD_EVENT_MODEmode,
FMOD_EVENT**event
);
Parameters
index
Theindexofaneventwithinthiseventsub-group.Indicesare0based.
mode
IfnotalreadyloadedwithEventGroup::loadEventData,thisFMOD_EVENT_MODEflagwilldetermineifdatashouldbeloadedfromdisksynchronouslyorasynchronously.Italsoallowsan'infoonly'eventretreival(eventsthatcantbeplayed)andcanbeusedtoproduceanerrorondiskaccess.
event
Addressofavariabletoreceivetheselectedeventwithinthiseventgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whatisanevent?Aneventistheleafoftheeventgrouptree.Itistheactualsoundtobeplayedwithcomplexbehaviourdesignedbythesounddesigner.
Inthiscaseweareretrievinganeventfromaneventgroup,sowiththe"filters"
groupwecouldgettheechoeventwith2astheindexparameter.
Iftheprogrammerdoesnotknowwhicheventsareavailableorwhicheventindexmatcheswhicheventname,thesounddesignertoolcanoutputaprogrammerreportthatliststheeventgroup'seventswiththeappropriatenamesandindiceslistedalongsidethem.Theonlybenefitofretrievinganobjectbyindexisthatitisslightlyfastertodosothantoretrieveitbyname.Note!-Aneventisretrievedfromapoolofevents(createdearlierifFMOD_EVENT_CACHEEVENTSflagwassetinEventSystem::getGroup/EventGroup::getGroup).-Datamaynotbeloadedfromthediskforthisevent,sothiseventmaytriggerdiskaccess.Ifyouwishtopre-empthisuseEventGroup::loadEventDatafirst.-Thepoolofeventshasasizedeterminedbythe'maxplaybacks'propertyintheFMODDesignertoolintheevent'spropertysheet.-Thepointertowillbegettingwillbeapointertooneoftheseeventinstances.-Ifyoucallthisfunctionmoretimesthanthereareeventinstances,thenaninventhandlemaybestolen,ormayfail.Thisbehaviouralsodeterminedbythesounddesigner.Thebehaviourmaybetostealtheoldesteventinthepool,stealthequietesteventinthepool,orsimplyfailthisgetEventandreturnnullastheeventhandle.
SeeAlso
EventGroup::getEventEventGroup::getNumEventsFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getGroupRetrievesaneventgroup'ssub-groupobjectbyname.
C++Syntax
FMOD_RESULTEventGroup::getGroup(
constchar*name,
boolcacheevents,
EventGroup**group
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetGroup(
FMOD_EVENTGROUP*eventgroup,
constchar*name,
FMOD_BOOLcacheevents,
FMOD_EVENTGROUP**group
);
Parameters
name
Thenameofaneventsub-groupthatbelongstothiseventgroup.
cacheevents
Ifcacheeventsistruethenalleventinstanceswithinthiseventgroupwillbepre-allocatedsothattherearenomemoryallocswhengetEventiscalled.
group
Addressofavariabletoreceivetheselectedeventsub-groupwithinthiseventgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whatisaneventgroup?Aneventgroupisa"folder"thatstoreseventsorsub-folders.Withthesefoldersahierarchicaltreecanbebuilttostoreeventsinamorelogicalmanner.
Inthiscaseweareretrievinganeventgroupfromanothereventgroup,soifthiseventgroupobjectwas"examples"wecouldthengettheeventgroup"filters"with"filters"asthenameparameter.
Inthisexample"filters"istheonlysub-groupbelow"examples"sonoothersub-groupsareavailablehere.
Iftheprogrammerdoesnotknowwhichsub-groupsareavailableorwhichsub-groupindexmatcheswhichsub-groupname,thesounddesignertoolcanoutputaprogrammerreportthatliststhegroup'ssub-groupswiththeappropriatenamesandindiceslistedalongsidethem.Theonlybenefitofretrievinganobjectbyindexisthatitisslightlyfastertodosothantoretrieveitbyname.
SeeAlso
EventSystem::getGroupEventGroup::getGroupByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getGroupByIndexRetrievesaneventgroup'ssub-groupobjectbyindex.
C++Syntax
FMOD_RESULTEventGroup::getGroupByIndex(
intindex,
boolcacheevents,
EventGroup**group
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetGroupByIndex(
FMOD_EVENTGROUP*eventgroup,
intindex,
FMOD_BOOLcacheevents,
FMOD_EVENTGROUP**group
);
Parameters
index
Theindexofaneventsub-groupwithinthiseventgroup.Indicesare0based.
cacheevents
Ifcacheeventsistruethenalleventinstanceswithinthiseventgroupwillbepre-allocatedsothattherearenomemoryallocswhengetEventiscalled.
group
Addressofavariabletoreceivetheselectedeventsub-groupwithinthiseventgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Whatisaneventgroup?Aneventgroupisa"folder"thatstoreseventsorsub-folders.Withthesefoldersahierarchicaltreecanbebuilttostoreeventsinamorelogicalmanner.
Inthiscaseweareretrievinganeventgroupfromanothereventgroup,soifthiseventgroupobjectwas"examples"wecouldthengettheeventgroup"filters"with0astheindexparameter.
Inthisexample"filters"istheonlysub-groupbelow"examples"sonoothersub-groupsareavailablehere.
Iftheprogrammerdoesnotknowwhichgroupsareavailableorwhicheventgroupindexmatcheswhichgroupname,thesounddesignertoolcanoutputaprogrammerreportthatliststhegroup'ssub-groupswiththeappropriatenamesandindiceslistedalongsidethem.Theonlybenefitofretrievinganobjectbyindexisthatitisslightlyfastertodosothantoretrieveitbyname.
SeeAlso
EventSystem::getGroupEventGroup::getGroupEventGroup::getNumGroups
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getInfoRetrieveinformationaboutthiseventgroup.
C++Syntax
FMOD_RESULTEventGroup::getInfo(
int*index,
char**name
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetInfo(
FMOD_EVENTGROUP*eventgroup,
int*index,
char**name
);
Parameters
index
Addressofavariabletoreceivetheeventgroupindex.
name
Addressofavariabletoreceivetheeventgroupname.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventParameter::getInfoEvent::getInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTEventGroup::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetMemoryInfo(
FMOD_EVENTGROUP*eventgroup,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getNumEventsRetrievesthenumberofeventeventsstoredwithinthiseventgroup.
C++Syntax
FMOD_RESULTEventGroup::getNumEvents(
int*numevents
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetNumEvents(
FMOD_EVENTGROUP*eventgroup,
int*numevents
);
Parameters
numevents
Adressofavariabletoreceivethenumberofeventswithinthiseventgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventGroup::getEventByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getNumGroupsRetrievesthenumberofeventgroupsstoredwithinthiseventgroup.
C++Syntax
FMOD_RESULTEventGroup::getNumGroups(
int*numgroups
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetNumGroups(
FMOD_EVENTGROUP*eventgroup,
int*numgroups
);
Parameters
numgroups
Adressofavariabletoreceivethenumberofgroupswithinthiseventgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventGroup::getGroupByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getNumPropertiesRetrievethenumberofpropertiesforaneventgroup.
C++Syntax
FMOD_RESULTEventGroup::getNumProperties(
int*numproperties
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetNumProperties(
FMOD_EVENTGROUP*eventgroup,
int*numproperties
);
Parameters
numproperties
Addressofavariabletoreceivethenumberofpropertiesforthiseventgroup.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventGroup::getPropertyByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getParentGroupRetrievestheeventgroupobjecttowhichthiseventgroupbelongs.
C++Syntax
FMOD_RESULTEventGroup::getParentGroup(
EventGroup**group
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetParentGroup(
FMOD_EVENTGROUP*eventgroup,
FMOD_EVENTGROUP**group
);
Parameters
group
Addressofavariablethatreceivesapointertotheeventgroup'sparenteventgroup
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thetopleveleventgroupwillreturnaparentof0orNULL,asithasnoparent.
SeeAlso
EventGroup::getGroupEventGroup::getGroupByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getParentProjectRetrievestheeventprojectobjecttowhichthiseventgroupbelongs.
C++Syntax
FMOD_RESULTEventGroup::getParentProject(
EventProject**project
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetParentProject(
FMOD_EVENTGROUP*eventgroup,
FMOD_EVENTPROJECT**project
);
Parameters
project
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventGroup::getGroupEventGroup::getGroupByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getPropertyRetrieveaneventgrouppropertybyname.
C++Syntax
FMOD_RESULTEventGroup::getProperty(
constchar*propertyname,
void*value
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetProperty(
FMOD_EVENTGROUP*eventgroup,
constchar*propertyname,
void*value
);
Parameters
propertyname
Nameofthepropertytoretrieve.ThisisthenamethatwasspecifiedinFMODDesigner.
value
Addressofavariabletoreceivetheeventgroupproperty.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventGroup::getPropertyByIndexEventGroup::getNumPropertiesEventGroup::getEvent
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getPropertyByIndexRetrieveaneventgrouppropertybyindex.
C++Syntax
FMOD_RESULTEventGroup::getPropertyByIndex(
intpropertyindex,
void*value
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetPropertyByIndex(
FMOD_EVENTGROUP*eventgroup,
intpropertyindex,
void*value
);
Parameters
propertyindex
Indexofthepropertytoretrieve.
value
Addressofavariabletoreceivetheeventgroupproperty.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventGroup::getPropertyEventGroup::getNumPropertiesEventGroup::getEvent
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getStateRetrievesthecurrentstateofaneventgroup.
C++Syntax
FMOD_RESULTEventGroup::getState(
FMOD_EVENT_STATE*state
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetState(
FMOD_EVENTGROUP*eventgroup,
FMOD_EVENT_STATE*state
);
Parameters
state
Addressofavariablethatreceivestheeventgroup'scurrentstate.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
WhenFMOD_EVENT_STATE_PLAYINGisset,atleastoneeventinthegroupisplaying.WhenFMOD_EVENT_STATE_LOADINGisset,atleastoneeventinthiseventgroupisloading,elsenoeventsinthiseventgroupareloading.
FMOD_EVENT_STATE_LOADING,FMOD_EVENT_STATE_ERRORorFMOD_EVENT_STATE_READYwillbethestateafterusingEventGroup::loadEventData.
Note:TheabsenceofFMOD_EVENT_STATE_LOADINGdoesnotimplythatalleventdataisloaded,justthatnothingisintheprocessofloadingatthispointintime.
SeeAlso
FMOD_EVENT_STATEEventGroup::loadEventData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::getUserDataRetrievestheuservaluethatthatwassetbycallingtheEventGroup::setUserDatafunction.
C++Syntax
FMOD_RESULTEventGroup::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_EventGroup_GetUserData(
FMOD_EVENTGROUP*eventgroup,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeEventGroup::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventGroup::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::loadEventDataLoadswavedataandallocateseventinstancesforalleventswithinaneventgroup.
C++Syntax
FMOD_RESULTEventGroup::loadEventData(
FMOD_EVENT_RESOURCEresource,
FMOD_EVENT_MODEmode
);
CSyntax
FMOD_RESULTFMOD_EventGroup_LoadEventData(
FMOD_EVENTGROUP*eventgroup,
FMOD_EVENT_RESOURCEresource,
FMOD_EVENT_MODEmode
);
Parameters
resource
Typeofwavedatatoload.Eitherloadsamples,streams,orboth.SeeFMOD_EVENT_RESOURCE.
mode
UseeitherFMOD_EVENT_DEFAULTforblockingbehaviourorFMOD_EVENT_NONBLOCKINGfornon-blockingbehaviour.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UseEventGroup::freeEventDatatounloadwavedataforthisgroup.Notethatifanothereventinadifferentgroupisstillusingthewavedata,itwillnotbefreeduntilthoseeventshavehadfreeEventDatacalledonthemaswell.(Ontheirparentgroup).NOTE:Eventinstanceswillalwaysbeallocatedbythisfunctionregardlessofwhatparametersarepassedin.
SeeAlso
EventGroup::freeEventDataEventSystem::getGroupFMOD_EVENT_RESOURCEFMOD_EVENT_MODEEventProject::loadSampleData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventGroup::setUserDataSetsauservaluethattheEventGroupobjectwillstoreinternally.CanberetrievedwithEventGroup::getUserData.
C++Syntax
FMOD_RESULTEventGroup::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_EventGroup_SetUserData(
FMOD_EVENTGROUP*eventgroup,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheEventGroupobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingEventGroup::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
EventGroup::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventInterfaceEvent::get3DAttributesEvent::get3DOcclusionEvent::getCategoryEvent::getChannelGroupEvent::getInfoEvent::getMemoryInfoEvent::getMuteEvent::getNumParametersEvent::getNumPropertiesEvent::getParameterEvent::getParameterByIndexEvent::getParentGroupEvent::getPausedEvent::getPitchEvent::getPropertyEvent::getPropertyByIndexEvent::getPropertyInfoEvent::getReverbPropertiesEvent::getStateEvent::getUserDataEvent::getVolumeEvent::releaseEvent::set3DAttributesEvent::set3DOcclusionEvent::setCallbackEvent::setMuteEvent::setPausedEvent::setPitchEvent::setPropertyEvent::setPropertyByIndexEvent::setReverbPropertiesEvent::setUserDataEvent::setVolumeEvent::startEvent::stop
FirelightTechnologiesFMODEx
Event::get3DAttributesRetrievesthepositionandvelocityofanevent.
C++Syntax
FMOD_RESULTEvent::get3DAttributes(
FMOD_VECTOR*position,
FMOD_VECTOR*velocity,
FMOD_VECTOR*orientation
);
CSyntax
FMOD_RESULTFMOD_Event_Get3DAttributes(
FMOD_EVENT*event,
FMOD_VECTOR*position,
FMOD_VECTOR*velocity,
FMOD_VECTOR*orientation
);
Parameters
position
Addressofavariablethatreceivesthepositionin3Dspaceoftheevent.Optional.Specify0toignore.
velocity
Addressofavariablethatreceivesthevelocityin'distanceunitspersecond'in3Dspaceoftheevent.Seeremarks.Optional.Specify0toignore.
orientation
Addressofavariablethatreceivestheorientationoftheevent.Optional.Specify0toignore.Onlyusedforeventswithsoundconesspecified.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
A'distanceunit'isspecifiedintheFMODDesignertoolandarethedistanceunitsusedbythegame(i.e.feet,meters,inches,centimetersetc).Aneventhastobe3Dtohaveits3dpositionandvelocityset.
SeeAlso
Event::set3DAttributes
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::get3DOcclusionRetrievesthetheEAXorsoftwarebasedocclusionfactorsforanevent.
C++Syntax
FMOD_RESULTEvent::get3DOcclusion(
float*directocclusion,
float*reverbocclusion
);
CSyntax
FMOD_RESULTFMOD_Event_Get3DOcclusion(
FMOD_EVENT*event,
float*directocclusion,
float*reverbocclusion
);
Parameters
directocclusion
Addressofavariablethatreceivestheocclusionfactorforavoiceforthedirectpath.0.0=notoccluded.1.0=fullyoccluded.Default=0.0.Optional.Specify0orNULLtoignore.
reverbocclusion
Addressofavariablethatreceivestheocclusionfactorforavoiceforthereverbmix.0.0=notoccluded.1.0=fullyoccluded.Default=0.0.Optional.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
WithEAXbasedsoundcards,orI3DL2basedhardwareacceleratedvoices,thiswillattenuatethesoundandfrequencies.WithnonEAXorI3DL2harwardacceleratedvoices,thenthevolumeisattenuatedbythedirectOcclusionfactor.
SeeAlso
Event::set3DOcclusion
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getCategoryRetrieveaneventcategorythatthiseventbelongsto.
C++Syntax
FMOD_RESULTEvent::getCategory(
EventCategory**category
);
CSyntax
FMOD_RESULTFMOD_Event_GetCategory(
FMOD_EVENT*event,
FMOD_EVENTCATEGORY**category
);
Parameters
category
Addressofavariabletoreceivetheeventcategory.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Event::getInfoEventGroup::getEvent
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getChannelGroupRetrievesapointertoalowerlevelChannelGroupclass,mainlysothattheprogrammercanaddacustomDSPeffectwithChannelGroup::addDSP.
C++Syntax
FMOD_RESULTEvent::getChannelGroup(
FMOD::ChannelGroup**channelgroup
);
CSyntax
FMOD_RESULTFMOD_Event_GetChannelGroup(
FMOD_EVENT*event,
FMOD_CHANNELGROUP**channelgroup
);
Parameters
channelgroup
AddressofavariabletoreceiveapointertoalowlevelChannelGroupclass.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
IfyougetFMOD_ERR_DSP_NOTFOUNDwhenusingtheretrievedchannelgroup,thentheeventsystemhasoptimizedthechannelgroup'sDSPunitawaytosavememory.YoucanforcethechannelgrouptocontainaDSPunit
withtheFMOD_EVENT_USERDSPflag.
SeeAlso
FMOD_RESULTFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getInfoRetrievesinformationabouttheevent.
C++Syntax
FMOD_RESULTEvent::getInfo(
int*index,
char**name,
FMOD_EVENT_INFO*info
);
CSyntax
FMOD_RESULTFMOD_Event_GetInfo(
FMOD_EVENT*event,
int*index,
char**name,
FMOD_EVENT_INFO*info
);
Parameters
index
Addressofavariabletoreceivetheeventgroup'sindex.Specify0orNULLtoignore.
name
Addressofavariabletoreceivetheeventname.Specify0orNULLtoignore.
info
AddressofanFMOD_EVENT_INFOstructuretoreceiveextendedeventinformation.Specify0orNULLtoignore.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
TheFMOD_EVENT_INFOstructurehasmembersthatneedtobeinitializedbeforeEvent::getInfoiscalled.AlwaysinitializetheFMOD_EVENT_INFOstructurebeforecallingEvent::getInfo!
SeeAlso
EventGroup::getEventEventGroup::getEventByIndexEventParameter::getInfoFMOD_EVENT_INFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTEvent::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_Event_GetMemoryInfo(
FMOD_EVENT*event,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getMuteRetrievesthemutedstateofanevent.
C++Syntax
FMOD_RESULTEvent::getMute(
bool*mute
);
CSyntax
FMOD_RESULTFMOD_Event_GetMute(
FMOD_EVENT*event,
FMOD_BOOL*mute
);
Parameters
mute
Addressofavariabletoreceivethemutedstateoftheevent.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Event::setMute
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getNumParametersRetrievethenumberofparametersforanevent.
C++Syntax
FMOD_RESULTEvent::getNumParameters(
int*numparameters
);
CSyntax
FMOD_RESULTFMOD_Event_GetNumParameters(
FMOD_EVENT*event,
int*numparameters
);
Parameters
numparameters
Addressofavariabletoreceivethenumberofparametersforthisevent.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Event::getParameterByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getNumPropertiesRetrievethenumberofpropertiesforanevent.
C++Syntax
FMOD_RESULTEvent::getNumProperties(
int*numproperties
);
CSyntax
FMOD_RESULTFMOD_Event_GetNumProperties(
FMOD_EVENT*event,
int*numproperties
);
Parameters
numproperties
Addressofavariabletoreceivethenumberofpropertiesforthisevent.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Event::getPropertyByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getParameterRetrieveaneventparameterobjectbyname.
C++Syntax
FMOD_RESULTEvent::getParameter(
constchar*name,
EventParameter**parameter
);
CSyntax
FMOD_RESULTFMOD_Event_GetParameter(
FMOD_EVENT*event,
constchar*name,
FMOD_EVENTPARAMETER**parameter
);
Parameters
name
Thenameofaneventparameterthatbelongstothisevent.
parameter
Addressofavariabletoreceivetheselectedeventparameterwithinthisevent.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Eacheventwillhavealistofparameterstocontroltheplaybackbehaviouroftheevent.Forexample,ifasounddesignermadeacarengineevent,oneoftheparametersmightbe'RPM'.Iftheprogrammerdoesnotknowwhichparametersareavailable,thesounddesignertoolcanoutputaprogrammerreportthatliststheevent'sparameterswiththeappropriatenamesandindiceslistedalongsidethem.
SeeAlso
Event::getParameterByIndexEventGroup::getEventEventGroup::getEventByIndexFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getParameterByIndexRetrieveaneventparameterbyindex.
C++Syntax
FMOD_RESULTEvent::getParameterByIndex(
intindex,
EventParameter**parameter
);
CSyntax
FMOD_RESULTFMOD_Event_GetParameterByIndex(
FMOD_EVENT*event,
intindex,
FMOD_EVENTPARAMETER**parameter
);
Parameters
index
Theindexofaneventparameterwithinthisevent.Indicesare0based.Pass-1toretrievethisevent'sprimaryparameter.
parameter
Addressofavariabletoreceivetheeventparameterobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Eacheventwillhavealistofparameterstocontroltheplaybackbehaviouroftheevent.Forexample,ifasounddesignermadeacarengineevent,oneoftheparametersmightbe'RPM'.Iftheprogrammerdoesnotknowwhichparametersareavailableorwhichindexmatcheswhichparameter,thesounddesignertoolcanoutputaprogrammerreportthatliststheevent'sparameterswiththeappropriatenamesandindiceslistedalongsidethem.Theonlybenefitofretrievingaparameterbyindexisthatitisslightlyfastertodosothantoretrieveitbyname.
SeeAlso
Event::getParameterEvent::getNumParametersEventGroup::getEventEventGroup::getEventByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getParentGroupRetrievestheeventgroupobjecttowhichthiseventbelongs.
C++Syntax
FMOD_RESULTEvent::getParentGroup(
EventGroup**group
);
CSyntax
FMOD_RESULTFMOD_Event_GetParentGroup(
FMOD_EVENT*event,
FMOD_EVENTGROUP**group
);
Parameters
group
Addressofavariablethatreceivesapointertotheevent'sparenteventgroup
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventGroup::getEventEventGroup::getEventByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getPausedRetrievesthepausedstateofanevent.
C++Syntax
FMOD_RESULTEvent::getPaused(
bool*paused
);
CSyntax
FMOD_RESULTFMOD_Event_GetPaused(
FMOD_EVENT*event,
FMOD_BOOL*paused
);
Parameters
paused
Addressofavariabletoreceivethepausedstateoftheevent.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Event::setPaused
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getPitchRetrievestheoverallpitchofanevent.
C++Syntax
FMOD_RESULTEvent::getPitch(
float*pitch,
FMOD_EVENT_PITCHUNITSunits
);
CSyntax
FMOD_RESULTFMOD_Event_GetPitch(
FMOD_EVENT*event,
float*pitch,
FMOD_EVENT_PITCHUNITSunits
);
Parameters
pitch
Addressofavariabletoreceivethecurrentpitchleveloftheevent.0.0=normalpitch(default).
units
Thedesiredunitsfortheretrievedpitchvalue.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Event::setPitchFMOD_EVENT_PITCHUNITS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getPropertyRetrieveaneventuserpropertybyname.
C++Syntax
FMOD_RESULTEvent::getProperty(
constchar*propertyname,
void*value,
boolthis_instance
);
CSyntax
FMOD_RESULTFMOD_Event_GetProperty(
FMOD_EVENT*event,
constchar*propertyname,
void*value,
FMOD_BOOLthis_instance
);
Parameters
propertyname
Nameoftheuserpropertytoretrieve.ThisisthenamethatwasspecifiedinFMODDesigner.
value
Addressofavariabletoreceivetheeventuserproperty.
this_instance
IfTRUEthenretrievetheper-instanceuserpropertyvalue,ifFALSEthenretrievetheparent(FMOD_EVENT_INFOONLY)event'suserpropertyvalue.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Aparent,orFMOD_EVENT_INFOONLY,eventistheprototypethatallitseventinstancesarebasedon.AneventinstanceobtainedbyusinganyofthegetEventXXXfunctionswillbeinitializedwiththecurrentpropertyvaluesofitsparentevent.Afteraneventinstanceisobtained,itspropertyvaluesmaybemodifiedusingEvent::setPropertyandEvent::setPropertyByIndexsothattheydifferfromtheirparentevent'sproperties.Usethe'this_instance'parametertospecifywhethertoretrievethepropertyvalueoftheparenteventorthespecificeventinstance.
Note:Thisfunctionisusedtoaccessuserpropertiesonly.Toaccessbuilt-ineventpropertiesuseEvent::getPropertyByIndex.
SeeAlso
Event::getPropertyByIndexEvent::setPropertyEvent::setPropertyByIndexEventGroup::getEvent
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getPropertyByIndexRetrieveaneventpropertybyindex.
C++Syntax
FMOD_RESULTEvent::getPropertyByIndex(
intpropertyindex,
void*value,
boolthis_instance
);
CSyntax
FMOD_RESULTFMOD_Event_GetPropertyByIndex(
FMOD_EVENT*event,
intpropertyindex,
void*value,
FMOD_BOOLthis_instance
);
Parameters
propertyindex
Indexofthepropertytoretrieve.SeeFMOD_EVENT_PROPERTYfordetails.
value
Addressofavariabletoreceivetheeventproperty.
this_instance
IfTRUEthenretrievetheper-instancepropertyvalue,ifFALSEthenretrievetheparent(FMOD_EVENT_INFOONLY)event'spropertyvalue.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Aparent,orFMOD_EVENT_INFOONLY,eventistheprototypethatallitseventinstancesarebasedon.AneventinstanceobtainedbyusinganyofthegetEventXXXfunctionswillbeinitializedwiththecurrentpropertyvaluesofitsparentevent.Afteraneventinstanceisobtained,itspropertyvaluesmaybemodifiedusingEvent::setPropertyandEvent::setPropertyByIndexsothattheydifferfromtheirparentevent'sproperties.Usethe'this_instance'parametertospecifywhethertoretrievethepropertyvalueoftheparenteventorthespecificeventinstance.
Toaccessuserpropertiesbyindex,addFMOD_EVENTPROPERTY_USER_BASEtopropertyindexe.g.toretrieveuserproperty2,setpropertyindextoFMOD_EVENTPROPERTY_USER_BASE+2.
SeeAlso
Event::getPropertyEvent::getNumPropertiesEvent::setPropertyEvent::setPropertyByIndexEventGroup::getEventFMOD_EVENT_PROPERTY
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getPropertyInfoRetrievenameorindexinformationaboutauserproperty.
C++Syntax
FMOD_RESULTEvent::getPropertyInfo(
int*propertyindex,
char**propertyname,
FMOD_EVENTPROPERTY_TYPE*type
);
CSyntax
FMOD_RESULTFMOD_Event_GetPropertyInfo(
FMOD_EVENT*event,
int*propertyindex,
char**propertyname,
FMOD_EVENTPROPERTY_TYPE*type
);
Parameters
propertyindex
Pointertoauserpropertyindex.Seeremarksfordetails.
propertyname
Pointertoauserpropertyname.Seeremarksfordetails.
type
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Usethisfunctiontoretrieveauserproperty'snamefromitsindexor,conversely,itsindexfromitsname:
If"*propertyname"isnon-NULLonentrythenthisfunctionwillset"*propertyindex"totheindexoftheuserpropertycalled"*propertyname".If"*propertyname"isNULLonentrythenthisfunctionwillset"*propertyname"tothenameoftheuserpropertywithindex"*propertyindex".
IfthespecifieduserpropertyisnotfoundthenFMOD_ERR_INVALID_PARAMwillbereturned.
Note!Thisfunctionworksonuserpropertiesonly.Whenspecifying"propertyindex"onentry,rememberthatuserpropertyindicesbeginatFMOD_EVENTPROPERTY_USER_BASE.Note!Donotfreethe"*propertyname"pointerobtainedfromthisfunction!FMODownsit.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getReverbPropertiesRetrievesthecurrentreverbpropertiesforthisevent.
C++Syntax
FMOD_RESULTEvent::getReverbProperties(
FMOD_REVERB_CHANNELPROPERTIES*props
);
CSyntax
FMOD_RESULTFMOD_Event_GetReverbProperties(
FMOD_EVENT*event,
FMOD_REVERB_CHANNELPROPERTIES*props
);
Parameters
props
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Event::setReverbPropertiesFMOD_REVERB_CHANNELPROPERTIES
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getStateRetrievesthecurrentstateofanevent.
C++Syntax
FMOD_RESULTEvent::getState(
FMOD_EVENT_STATE*state
);
CSyntax
FMOD_RESULTFMOD_Event_GetState(
FMOD_EVENT*event,
FMOD_EVENT_STATE*state
);
Parameters
state
Addressofavariablethatreceivestheevent'scurrentstate.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventGroup::loadEventDataEventGroup::getEventFMOD_EVENT_STATEFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getUserDataRetrievestheuservaluethatthatwassetbycallingtheEvent::setUserDatafunction.
C++Syntax
FMOD_RESULTEvent::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_Event_GetUserData(
FMOD_EVENT*event,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeEvent::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Event::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::getVolumeRetrievestheoverallvolumeofanevent.
C++Syntax
FMOD_RESULTEvent::getVolume(
float*volume
);
CSyntax
FMOD_RESULTFMOD_Event_GetVolume(
FMOD_EVENT*event,
float*volume
);
Parameters
volume
Addressofavariabletoreceivethecurrentvolumeleveloftheevent.0.0=silent,1.0=fullvolume(default).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
Event::setVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::releaseReleasethiseventinstancebacktotheeventsystemsoitcanbereused.
C++Syntax
FMOD_RESULTEvent::release(
boolfreeeventdata,
boolwaituntilready
);
CSyntax
FMOD_RESULTFMOD_Event_Release(
FMOD_EVENT*event,
FMOD_BOOLfreeeventdata,
FMOD_BOOLwaituntilready
);
Parameters
freeeventdata
Setthistotruetofreeeventdataforthiseventinstance.
waituntilready
IfTRUE,thisfunctionwillblockuntilallpendingasynchronousloadshavecompletedbeforefreeingtheeventdata.IfFALSE,thisfunctionwillreturnFMOD_ERR_NOTREADYifanyasynchronousloadsarependinganditwillNOTfreeanyeventdata.Default=TRUE.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note:Thisfunctioniscurrentlyonlyforwhenyou'vespecified>0valueforFMOD_EVENT_LOADINFO.sizeof_instancepool_simple.
Whenusinganeventinstancepool(byspecifyinga>0valueinFMOD_EVENT_LOADINFO.sizeof_instancepool_simple)thisfunctionbecomesveryimportant.Usethisfunctiontoreleaseeventinstancesbacktotheinstancepoolsotheycanbereused.Ifyoudon'treleaseeventinstancesbacktotheinstancepoolitmaybepossibleforeventswithhigh"Stealpriority"tohogtheinstancepool,notallowingeventswithlow"Stealpriority"tobeacquired.
Whenusinganeventinstancepoolforeventswithdifferent"Stealpriorities",alwaysreleaseeventinstanceswhenyou'refinishedwiththem!
Usewaituntilready=falseintime-criticalsituationstoavoidblockingthemainthread.NotethatifFMOD_ERR_NOTREADYisreturnedfromthisfunctionthennoeventdatawasactuallyfreed-youwillneedtocallthisfunctionagainuntilitsucceeds.
Note:Donotcallthisfunctionfromaneventcallback!
SeeAlso
EventGroup::getEventEventGroup::getEventByIndexEventGroup::freeEventData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::set3DAttributesSetsthe3dpositionandvelocityofanevent.
C++Syntax
FMOD_RESULTEvent::set3DAttributes(
constFMOD_VECTOR*position,
constFMOD_VECTOR*velocity,
constFMOD_VECTOR*orientation
);
CSyntax
FMOD_RESULTFMOD_Event_Set3DAttributes(
FMOD_EVENT*event,
constFMOD_VECTOR*position,
constFMOD_VECTOR*velocity,
constFMOD_VECTOR*orientation
);
Parameters
position
Positionin3Dspaceoftheevent.Specifying0/nullwillignorethisparameter.
velocity
Velocityin'distanceunitspersecond'in3Dspaceoftheevent.Seeremarks.Specifying0/nullwillignorethisparameter.
orientation
Orientationoftheeventsoundcone.Onlyusediftheeventhasaconespecifiedtodetermineconedetection,otherwisejustspecify0/null.Specifying0/nullwillignorethisparameter.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
A'distanceunit'isspecifiedintheFMODDesignertoolandarethedistanceunitsusedbythegame(i.e.feet,meters,inches,centimetersetc).Aneventhastobe3Dtohaveits3dpositionandvelocityset.
Beforegettinganeventwith'justfailifquietest'maxplaybacksbehaviour,thisfunctionshouldbecalledonanEVENT_INFOONLYeventtoallowtheeventsystemtoestimatevolume.ThevariousgetEvent*functionscopythe3DattributesfromtheEVENT_INFOONLYeventtotheeventthatisreturned,soitisnotnecessarytosetthe3Dattributesagainaftergettingarealevent.
SeeAlso
Event::get3DAttributes
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::set3DOcclusionSetstheEAXorsoftwarebasedocclusionfactorsforanevent.ThisfunctioncanbecalledtoproducethesameaudibleeffectsastheFMODgeometryengine,justwithoutthebuiltinpolygonprocessing.
C++Syntax
FMOD_RESULTEvent::set3DOcclusion(
floatdirectocclusion,
floatreverbocclusion
);
CSyntax
FMOD_RESULTFMOD_Event_Set3DOcclusion(
FMOD_EVENT*event,
floatdirectocclusion,
floatreverbocclusion
);
Parameters
directocclusion
Occlusionfactorforavoiceforthedirectpath.0.0=notoccluded.1.0=fullyoccluded.Default=0.0.
reverbocclusion
Occlusionfactorforavoiceforthereverbmix.0.0=notoccluded.1.0=fullyoccluded.Default=0.0.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctiondoesnotgothroughandoverwritethechannelocclusionfactors,itcallsChannelGroup::set3DOcclusion.ThismeansthatfinalocclusionvalueswillbeaffectedbybothEventocclusionandgeometry(ifany).
WithEAXbasedsoundcards,orI3DL2basedhardwareacceleratedvoices,thiswillattenuatethesoundandfrequencies.WithnonEAXorI3DL2harwardacceleratedvoices,thenthevolumeisattenuatedbythedirectOcclusionfactor.
SeeAlso
Event::get3DOcclusionEvent::setReverbPropertiesChannelGroup::set3DOcclusion
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::setCallbackSetsacallbacksothatwhencertaineventbehaviourshappen,theycanbecaughtbytheuser.
C++Syntax
FMOD_RESULTEvent::setCallback(
FMOD_EVENT_CALLBACKcallback,
void*userdata
);
CSyntax
FMOD_RESULTFMOD_Event_SetCallback(
FMOD_EVENT*event,
FMOD_EVENT_CALLBACKcallback,
void*userdata
);
Parameters
callback
PointertoacallbacktobecalledbyFMOD.
userdata
Userdatapointertobepassedtocallback.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
wavsyncpointsaresupported.Thesecanbecreatedbyplacing'markers'intheoriginalsourcewavsusingatoolsuchasSoundForgeorCooledit.FMOD_EVENT_CALLBACKTYPE_SYNCPOINTcallbackswillbeautomaticallygeneratedwhenthesemarkersareencountered.
NOTE:IfyoucallthisfunctiononanFMOD_EVENT_INFOONLYevent,thecallbackwillbesetforALLinstancesoftheevent.
SeeAlso
FMOD_EVENT_CALLBACKFMOD_EVENT_CALLBACKTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::setMuteMutesorunmutesanevent.
C++Syntax
FMOD_RESULTEvent::setMute(
boolmute
);
CSyntax
FMOD_RESULTFMOD_Event_SetMute(
FMOD_EVENT*event,
FMOD_BOOLmute
);
Parameters
mute
Mutestateoftheevent.true=muted,false=unmuted.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Aneventcanhaveseveralhardware/softwarevoicesplayingunderitatoncesothisfunctionmutesallrelevantvoicesforthisevent.
SeeAlso
Event::getMute
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::setPausedPausesorunpausesanevent.
C++Syntax
FMOD_RESULTEvent::setPaused(
boolpaused
);
CSyntax
FMOD_RESULTFMOD_Event_SetPaused(
FMOD_EVENT*event,
FMOD_BOOLpaused
);
Parameters
paused
Pausedstateoftheevent.true=paused,false=unpaused.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Aneventcanhaveseveralhardware/softwarevoicesplayingunderitatoncesothisfunctionpausesallrelevantvoicesforthisevent.
SeeAlso
Event::getPaused
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::setPitchSetstheoverallpitchofanevent.
C++Syntax
FMOD_RESULTEvent::setPitch(
floatpitch,
FMOD_EVENT_PITCHUNITSunits
);
CSyntax
FMOD_RESULTFMOD_Event_SetPitch(
FMOD_EVENT*event,
floatpitch,
FMOD_EVENT_PITCHUNITSunits
);
Parameters
pitch
Pitchleveloftheevent.0.0=normalpitch(default).
units
Theunitsinwhichthenewpitchlevelisspecified.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Aneventcanhaveseveralhardware/softwarevoicesplayingunderitatoncesothisfunctionscalesallrelevantvoicepitchesforthisevent.Thisfunctionisnottobeusedunlessneededforruntimereasons,asthesounddesignerwillhavesettheappropriateeventpitchlevelintheFMODDesignertool.
SeeAlso
Event::getPitchFMOD_EVENT_PITCHUNITS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::setPropertySetaneventuserpropertybyname.
C++Syntax
FMOD_RESULTEvent::setProperty(
constchar*propertyname,
void*value,
boolthis_instance
);
CSyntax
FMOD_RESULTFMOD_Event_SetProperty(
FMOD_EVENT*event,
constchar*propertyname,
void*value,
FMOD_BOOLthis_instance
);
Parameters
propertyname
Nameoftheuserpropertytoset.ThisisthenamethatwasspecifiedinFMODDesigner.
value
Pointertothenewvalueforthiseventuserproperty.
this_instance
IfTRUEthensettheper-instanceuserpropertyvalue,ifFALSEthensettheuserpropertyvalueofalleventinstancesandalsotheparent(FMOD_EVENT_INFOONLY)event.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Aparent,orFMOD_EVENT_INFOONLY,eventistheprototypethatallitseventinstancesarebasedon.AneventinstanceobtainedbyusinganyofthegetEventXXXfunctionswillbeinitializedwiththecurrentpropertyvaluesofitsparentevent.Afteraneventinstanceisobtained,itspropertyvaluesmaybemodifiedusingEvent::setPropertyandEvent::setPropertyByIndexsothattheydifferfromtheirparentevent'sproperties.Usethe'this_instance'parametertospecifywhethertosetthepropertyvalueofalleventinstancesandalsotheparenteventorjustthespecificeventinstance.
Note:Thisfunctionisusedtoaccessuserpropertiesonly.Toaccessbuilt-ineventpropertiesuseEvent::setPropertyByIndex.
SeeAlso
Event::getPropertyEvent::setPropertyByIndexEventGroup::getEvent
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::setPropertyByIndexSetaneventpropertybyindex.
C++Syntax
FMOD_RESULTEvent::setPropertyByIndex(
intpropertyindex,
void*value,
boolthis_instance
);
CSyntax
FMOD_RESULTFMOD_Event_SetPropertyByIndex(
FMOD_EVENT*event,
intpropertyindex,
void*value,
FMOD_BOOLthis_instance
);
Parameters
propertyindex
Indexofthepropertytoset.SeeFMOD_EVENT_PROPERTYfordetails.
value
Pointertothenewvalueforthiseventproperty.
this_instance
IfTRUEthensettheper-instancepropertyvalue,ifFALSEthensetthepropertyvalueofalleventinstancesandalsotheparent(FMOD_EVENT_INFOONLY)event.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Aparent,orFMOD_EVENT_INFOONLY,eventistheprototypethatallitseventinstancesarebasedon.AneventinstanceobtainedbyusinganyofthegetEventXXXfunctionswillbeinitializedwiththecurrentpropertyvaluesofitsparentevent.Afteraneventinstanceisobtained,itspropertyvaluesmaybemodifiedusingEvent::setPropertyandEvent::setPropertyByIndexsothattheydifferfromtheirparentevent'sproperties.Usethe'this_instance'parametertospecifywhethertosetthepropertyvalueofalleventinstancesandalsotheparenteventorjustthespecificeventinstance.
Toaccessuserpropertiesbyindex,addFMOD_EVENTPROPERTY_USER_BASEtopropertyindexe.g.tosetuserproperty2,setpropertyindextoFMOD_EVENTPROPERTY_USER_BASE+2.
SeeAlso
Event::getPropertyEvent::setPropertyEventGroup::getEventFMOD_EVENT_PROPERTY
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::setReverbPropertiesSetstheeventspecificreverbproperties,includingthingslikewet/drymix(Room/Direct),andthingslikeobstructionandocclusionproperties.
C++Syntax
FMOD_RESULTEvent::setReverbProperties(
constFMOD_REVERB_CHANNELPROPERTIES*props
);
CSyntax
FMOD_RESULTFMOD_Event_SetReverbProperties(
FMOD_EVENT*event,
constFMOD_REVERB_CHANNELPROPERTIES*props
);
Parameters
props
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thiswillscalewiththevaluesetbythedesignerintheeventproperties.
OnPlayStation2,the'Room'parameteristheonlyparametersupported.Thehardwareonlyallows'on'or'off',sothereverbwillbeoffwhen'Room'is-10000andonforeveryothervalue.
NOTE:ThisfunctionoverridesvaluessetwithEvent::set3DOcclusion.IfyouneedEvent::set3DOcclusionfunctionalitythenfactoritintoyourFMOD_REVERB_CHANNELPROPERTIESvalues.
SeeAlso
Event::getReverbPropertiesSystem::setReverbPropertiesFMOD_REVERB_CHANNELPROPERTIESEvent::set3DOcclusion
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::setUserDataSetsauservaluethattheEventobjectwillstoreinternally.CanberetrievedwithEvent::getUserData.
C++Syntax
FMOD_RESULTEvent::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_Event_SetUserData(
FMOD_EVENT*event,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheEventobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingEvent::getUserDatawouldhelpintheidentificationoftheobject.
NOTE:IfyoucallthisfunctiononanFMOD_EVENT_INFOONLYevent,theuserdatawillonlybesetfortheFMOD_EVENT_INFOONLYevent,notalloftheevent'sinstances.
SeeAlso
Event::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::setVolumeSetstheoverallvolumeofanevent.
C++Syntax
FMOD_RESULTEvent::setVolume(
floatvolume
);
CSyntax
FMOD_RESULTFMOD_Event_SetVolume(
FMOD_EVENT*event,
floatvolume
);
Parameters
volume
Volumeleveloftheevent.0.0=silent,1.0=fullvolume(default).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Aneventcanhaveseveralhardware/softwarevoicesplayingunderitatoncesothisfunctionscalesallrelevantvoicevolumesforthisevent.Thisfunctionisnottobeusedunlessneededforruntimereasons,asthesounddesignerwillhavesettheappropriateeventvolumelevelintheFMODDesigner
tool.
SeeAlso
Event::getVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::startStartthiseventplaying.
C++Syntax
FMOD_RESULTEvent::start();
CSyntax
FMOD_RESULTFMOD_Event_Start(FMOD_EVENT*event);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
CallEvent::stoptohaltplaybackofanevent.
AttemptingtousethisfunctiononanFMOD_EVENT_INFOONLYeventwillcauseanFMOD_ERR_INVALID_HANDLEerrortobereturned.
SeeAlso
Event::stopEventGroup::getEventEventGroup::getEventByIndex
FMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
Event::stopStopthiseventplaying.
C++Syntax
FMOD_RESULTEvent::stop(
boolimmediate
);
CSyntax
FMOD_RESULTFMOD_Event_Stop(
FMOD_EVENT*event,
FMOD_BOOLimmediate
);
Parameters
immediate
Setthistotruetoforcetheeventtostopimmediately,ignoringthe"Fadeouttime"property
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
AttemptingtousethisfunctiononanFMOD_EVENT_INFOONLYeventwillcauseanFMOD_ERR_INVALID_HANDLEerrortobereturned.
SeeAlso
Event::startEventGroup::getEventEventGroup::getEventByIndexFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameterInterfaceEventParameter::disableAutomationEventParameter::getInfoEventParameter::getMemoryInfoEventParameter::getRangeEventParameter::getSeekSpeedEventParameter::getUserDataEventParameter::getValueEventParameter::getVelocityEventParameter::keyOffEventParameter::setSeekSpeedEventParameter::setUserDataEventParameter::setValueEventParameter::setVelocity
FirelightTechnologiesFMODEx
EventParameter::disableAutomationTurnoffautomationforaparameter.Thisisonlyrelevanttoautomaticparameterssuchas(distance),(eventangle),(listenerangle)withinFMODDesigner.
C++Syntax
FMOD_RESULTEventParameter::disableAutomation(
booldisable
);
CSyntax
FMOD_RESULTFMOD_EventParameter_DisableAutomation(
FMOD_EVENTPARAMETER*eventparameter,
FMOD_BOOLdisable
);
Parameters
disable
Whentrue,FMODstopsautomaticallyupdatingparameters,allowingtheusertosetitmanually.Whenfalse,theparameterupdatesautomatically(defaultbehaviour).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameter::getInfoRetrieveinformationaboutthiseventparameter.
C++Syntax
FMOD_RESULTEventParameter::getInfo(
int*index,
char**name
);
CSyntax
FMOD_RESULTFMOD_EventParameter_GetInfo(
FMOD_EVENTPARAMETER*eventparameter,
int*index,
char**name
);
Parameters
index
Addressofavariabletoreceivetheeventparametersindexintotheparentevent.
name
Addressofavariabletoreceivetheeventparametername.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Mainlyusedfordisplaypurposes,thisfunctionreturnsapointertomemorycontainingtheevent'sname.Donotmodifyortrytofreethismemory.
SeeAlso
EventParameter::getRange
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameter::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTEventParameter::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_EventParameter_GetMemoryInfo(
FMOD_EVENTPARAMETER*eventparameter,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameter::getRangeRetrievetheminimumandmaximumvaluesforthiseventparameter.
C++Syntax
FMOD_RESULTEventParameter::getRange(
float*rangemin,
float*rangemax
);
CSyntax
FMOD_RESULTFMOD_EventParameter_GetRange(
FMOD_EVENTPARAMETER*eventparameter,
float*rangemin,
float*rangemax
);
Parameters
rangemin
AddressofvariabletoreceivetheminimumvalueallowedforthisEventParameter.
rangemax
AddressofvariabletoreceivethemaximumvalueallowedforthisEventParameter.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisparameterisdefinedbythesounddesigner,andusuallyhasalogicalmeaning,suchasRPMforacarengineforexample.
SeeAlso
EventParameter::setValueEventParameter::getValueEventParameter::getInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameter::getSeekSpeedReceievestheseekvelocityofanevent.
C++Syntax
FMOD_RESULTEventParameter::getSeekSpeed(
float*value
);
CSyntax
FMOD_RESULTFMOD_EventParameter_GetSeekSpeed(
FMOD_EVENTPARAMETER*eventparameter,
float*value
);
Parameters
value
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventParameter::setSeekSpeed
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameter::getUserDataRetrievestheuservaluethatthatwassetbycallingtheEventParameter::setUserDatafunction.
C++Syntax
FMOD_RESULTEventParameter::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_EventParameter_GetUserData(
FMOD_EVENTPARAMETER*eventparameter,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeEventParameter::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventParameter::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameter::getValueRetrievethecurrentvalueofthisparameter.
C++Syntax
FMOD_RESULTEventParameter::getValue(
float*value
);
CSyntax
FMOD_RESULTFMOD_EventParameter_GetValue(
FMOD_EVENTPARAMETER*eventparameter,
float*value
);
Parameters
value
Addressofvariabletoreceivetheparametervalue.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisparameterisdefinedbythesounddesigner,andhasaminimumandmaximumvalue.Itusuallyhasalogicalmeaning,suchasRPMforacarengineforexample.
AttemptingtousethisfunctiononanFMOD_EVENT_INFOONLYeventwillcauseanFMOD_ERR_INVALID_HANDLEerrortobereturned.
SeeAlso
EventParameter::setValueEventParameter::getRangeEventParameter::getInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameter::getVelocityReceievesthevelocityofanevent.
C++Syntax
FMOD_RESULTEventParameter::getVelocity(
float*value
);
CSyntax
FMOD_RESULTFMOD_EventParameter_GetVelocity(
FMOD_EVENTPARAMETER*eventparameter,
float*value
);
Parameters
value
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventParameter::setVelocity
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameter::keyOffTriggersakeyoffonaneventparameterthathassustainpointsinit.Ifaneventparameteriscurrentlysustainingonasustainpoint,triggeringakeyoffwillreleaseitandallowtheparametertocontinue.
C++Syntax
FMOD_RESULTEventParameter::keyOff();
CSyntax
FMOD_RESULTFMOD_EventParameter_KeyOff(FMOD_EVENTPARAMETER*eventparameter
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Keyoffscanbetriggeredinadvanceofasustainpointbeingreached,sothattheycontinuepastthesustainpointaheadoftime.AttemptingtousethisfunctiononanFMOD_EVENT_INFOONLYeventwillcauseanFMOD_ERR_INVALID_HANDLEerrortobereturned.
SeeAlso
EventParameter::setVelocity
EventParameter::getVelocity
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameter::setSeekSpeedSetstheseekvelocityofaparameter.
C++Syntax
FMOD_RESULTEventParameter::setSeekSpeed(
floatvalue
);
CSyntax
FMOD_RESULTFMOD_EventParameter_SetSeekSpeed(
FMOD_EVENTPARAMETER*eventparameter,
floatvalue
);
Parameters
value
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Notethatcurrentlysettingthevelocityofaneventparameterwillsetthevelocityforallinstancesofthisevent.Thisvalueisnormallysetbythesounddesignerbutmaybeusediftheprogrammerwishestovaryit.AttemptingtousethisfunctiononanFMOD_EVENT_INFOONLYeventwillcauseanFMOD_ERR_INVALID_HANDLEerrortobereturned.
SeeAlso
EventParameter::getSeekSpeed
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameter::setUserDataSetsauservaluethattheEventParameterobjectwillstoreinternally.CanberetrievedwithEventParameter::getUserData.
C++Syntax
FMOD_RESULTEventParameter::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_EventParameter_SetUserData(
FMOD_EVENTPARAMETER*eventparameter,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheEventParameterobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.
ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasaparameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingEventParameter::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
EventParameter::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameter::setValueSetthe'value'ofthisparameter.
C++Syntax
FMOD_RESULTEventParameter::setValue(
floatvalue
);
CSyntax
FMOD_RESULTFMOD_EventParameter_SetValue(
FMOD_EVENTPARAMETER*eventparameter,
floatvalue
);
Parameters
value
Valuetosetthisparameterto.Note!MustlieintherangedescribedbyEventParameter::getRange.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisparameterisdefinedbythesounddesigner,andhasaminimumandmaximumvalue.Itusuallyhasalogicalmeaning,suchasRPMforacarengineforexample.
AttemptingtousethisfunctiononanFMOD_EVENT_INFOONLYeventwillcauseanFMOD_ERR_INVALID_HANDLEerrortobereturned.
SeeAlso
EventParameter::getValueEventParameter::getRange
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventParameter::setVelocitySetsthevelocityofaparameter.Inmostcasesthevelocityofaparameterwillbe0,unlessitisatimebasedevent.
C++Syntax
FMOD_RESULTEventParameter::setVelocity(
floatvalue
);
CSyntax
FMOD_RESULTFMOD_EventParameter_SetVelocity(
FMOD_EVENTPARAMETER*eventparameter,
floatvalue
);
Parameters
value
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Notethatcurrentlysettingthevelocityofaneventparameterwillsetthevelocityforallinstancesofthisevent.Thisvalueisnormallysetbythesounddesignerbutmaybeusediftheprogrammerwishestopauseorspeedup/slowdowntheparametermovement.AttemptingtousethisfunctiononanFMOD_EVENT_INFOONLYeventwill
causeanFMOD_ERR_INVALID_HANDLEerrortobereturned.
SeeAlso
EventParameter::getVelocity
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategoryInterfaceEventCategory::getCategoryEventCategory::getCategoryByIndexEventCategory::getChannelGroupEventCategory::getEventByIndexEventCategory::getInfoEventCategory::getMemoryInfoEventCategory::getMuteEventCategory::getNumCategoriesEventCategory::getNumEventsEventCategory::getParentCategoryEventCategory::getPausedEventCategory::getPitchEventCategory::getUserDataEventCategory::getVolumeEventCategory::setMuteEventCategory::setPausedEventCategory::setPitchEventCategory::setUserDataEventCategory::setVolumeEventCategory::stopAllEvents
FirelightTechnologiesFMODEx
EventCategory::getCategoryRetrieveaneventcategoryobjectbyname.
C++Syntax
FMOD_RESULTEventCategory::getCategory(
constchar*name,
EventCategory**category
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetCategory(
FMOD_EVENTCATEGORY*eventcategory,
constchar*name,
FMOD_EVENTCATEGORY**category
);
Parameters
name
Thenameofaneventcategorythatbelongstothiseventcategory.
category
Addressofavariabletoreceivetheselectedeventcategorywithinthiseventcategory.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Sub-categoriescanberetrievedbyspecifyingtheirfullpathrelativetothiscategorye.g."cars/racers".
SeeAlso
EventCategory::getCategoryByIndexEventSystem::getCategory
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getCategoryByIndexRetrieveaneventcategoryobjectbyindex.
C++Syntax
FMOD_RESULTEventCategory::getCategoryByIndex(
intindex,
EventCategory**category
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetCategoryByIndex(
FMOD_EVENTCATEGORY*eventcategory,
intindex,
FMOD_EVENTCATEGORY**category
);
Parameters
index
Theindexofaneventcategorywithinthiseventcategory.Indicesare0based.
category
Addressofavariabletoreceivetheeventcategoryobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventCategory::getCategoryEventSystem::getCategory
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getChannelGroupRetrievesapointertoalowerlevelChannelGroupclass,mainlysothattheprogrammercanaddacustomDSPeffectwithChannelGroup::addDSP.
C++Syntax
FMOD_RESULTEventCategory::getChannelGroup(
FMOD::ChannelGroup**channelgroup
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetChannelGroup(
FMOD_EVENTCATEGORY*eventcategory,
FMOD_CHANNELGROUP**channelgroup
);
Parameters
channelgroup
AddressofavariabletoreceiveapointertoalowlevelChannelGroupclass.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getEventByIndexRetrieveaneventobjectbyindex.
C++Syntax
FMOD_RESULTEventCategory::getEventByIndex(
intindex,
FMOD_EVENT_MODEmode,
Event**event
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetEventByIndex(
FMOD_EVENTCATEGORY*eventcategory,
intindex,
FMOD_EVENT_MODEmode,
FMOD_EVENT**event
);
Parameters
index
Theindexofaneventwithinthiseventcategory.Indicesare0based.
mode
IfnotalreadyloadedwithEventGroup::loadEventData,thisFMOD_EVENT_MODEflagwilldetermineifdatashouldbeloadedfromdisksynchronouslyorasynchronously.Italsoallowsan'infoonly'eventretreival(eventsthatcantbeplayed)andcanbeusedtoproduceanerrorondiskaccess.
event
Addressofavariabletoreceivetheeventobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::getCategoryEventCategory::getNumEventsFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getInfoRetrieveinformationaboutthiseventcategory.
C++Syntax
FMOD_RESULTEventCategory::getInfo(
int*index,
char**name
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetInfo(
FMOD_EVENTCATEGORY*eventcategory,
int*index,
char**name
);
Parameters
index
Addressofavariabletoreceivetheeventcategory'sindex.
name
Addressofavariabletoreceivetheeventcategory'sname.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Mainlyusedfordisplaypurposes,thisfunctionreturnsapointertomemorycontainingtheeventcategory'sname.Donotmodifyortrytofreethismemory.
SeeAlso
EventSystem::getCategory
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTEventCategory::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetMemoryInfo(
FMOD_EVENTCATEGORY*eventcategory,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getMuteRetrievesthemutestateofaneventcategory.
C++Syntax
FMOD_RESULTEventCategory::getMute(
bool*mute
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetMute(
FMOD_EVENTCATEGORY*eventcategory,
FMOD_BOOL*mute
);
Parameters
mute
Addressofavariabletoreceivethemutestateoftheeventcategory.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventCategory::setMute
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getNumCategoriesRetrievethenumberofsub-categoriesbelowthiseventcategory.
C++Syntax
FMOD_RESULTEventCategory::getNumCategories(
int*numcategories
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetNumCategories(
FMOD_EVENTCATEGORY*eventcategory,
int*numcategories
);
Parameters
numcategories
Addressofavariabletoreceivethenumberofcategoriesinthiscategory.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventCategory::getCategoryEventSystem::getCategory
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getNumEventsRetrievethenumberofeventswithinthiseventcategory.
C++Syntax
FMOD_RESULTEventCategory::getNumEvents(
int*numevents
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetNumEvents(
FMOD_EVENTCATEGORY*eventcategory,
int*numevents
);
Parameters
numevents
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::getCategoryEventCategory::getEventByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getParentCategoryRetrievestheeventcategoryobjecttowhichthiseventcategorybelongs.
C++Syntax
FMOD_RESULTEventCategory::getParentCategory(
EventCategory**category
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetParentCategory(
FMOD_EVENTCATEGORY*eventcategory,
FMOD_EVENTCATEGORY**category
);
Parameters
category
Addressofavariablethatreceivesapointertotheeventcategory'sparenteventcategory
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventCategory::getCategoryEventSystem::getCategory
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getPausedRetrievesthepausedstateofaneventcategory.
C++Syntax
FMOD_RESULTEventCategory::getPaused(
bool*paused
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetPaused(
FMOD_EVENTCATEGORY*eventcategory,
FMOD_BOOL*paused
);
Parameters
paused
Addressofavariabletoreceivethepausedstateoftheeventcategory.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventCategory::setPaused
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getPitchRetrievestheoverallpitchofaneventcategory.
C++Syntax
FMOD_RESULTEventCategory::getPitch(
float*pitch,
FMOD_EVENT_PITCHUNITSunits
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetPitch(
FMOD_EVENTCATEGORY*eventcategory,
float*pitch,
FMOD_EVENT_PITCHUNITSunits
);
Parameters
pitch
Addressofavariabletoreceivethecurrentpitchleveloftheeventcategory.0.0=normalpitch(default).
units
Thedesiredunitsfortheretrievedpitchvalue.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventCategory::setPitchFMOD_EVENT_PITCHUNITS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getUserDataRetrievestheuservaluethatthatwassetbycallingtheEventCategory::setUserDatafunction.
C++Syntax
FMOD_RESULTEventCategory::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetUserData(
FMOD_EVENTCATEGORY*eventcategory,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeEventCategory::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventCategory::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::getVolumeRetrievestheoverallvolumeofaneventcategory.
C++Syntax
FMOD_RESULTEventCategory::getVolume(
float*volume
);
CSyntax
FMOD_RESULTFMOD_EventCategory_GetVolume(
FMOD_EVENTCATEGORY*eventcategory,
float*volume
);
Parameters
volume
Addressofavariabletoreceivethecurrentvolumeleveloftheeventcategory.0.0=silent,1.0=fullvolume(default).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventCategory::setVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::setMutePausesorunpausesaneventcategoryforruntimereasons.
C++Syntax
FMOD_RESULTEventCategory::setMute(
boolmute
);
CSyntax
FMOD_RESULTFMOD_EventCategory_SetMute(
FMOD_EVENTCATEGORY*eventcategory,
FMOD_BOOLmute
);
Parameters
mute
Mutetheeventcategory.true=muted,false=unmuted.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventCategory::getMute
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::setPausedPausesorunpausesaneventcategoryforruntimereasons.
C++Syntax
FMOD_RESULTEventCategory::setPaused(
boolpaused
);
CSyntax
FMOD_RESULTFMOD_EventCategory_SetPaused(
FMOD_EVENTCATEGORY*eventcategory,
FMOD_BOOLpaused
);
Parameters
paused
Pausedstateoftheeventcategory.true=paused,false=unpaused.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventCategory::getPaused
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::setPitchSetstheoverallpitchofaneventcategory.
C++Syntax
FMOD_RESULTEventCategory::setPitch(
floatpitch,
FMOD_EVENT_PITCHUNITSunits
);
CSyntax
FMOD_RESULTFMOD_EventCategory_SetPitch(
FMOD_EVENTCATEGORY*eventcategory,
floatpitch,
FMOD_EVENT_PITCHUNITSunits
);
Parameters
pitch
Pitchleveloftheeventcategory.0.0=normalpitch(default).
units
Theunitsinwhichthenewpitchlevelisspecified.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventCategory::getPitchFMOD_EVENT_PITCHUNITS
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::setUserDataSetsauservaluethattheEventCategoryobjectwillstoreinternally.CanberetrievedwithEventCategory::getUserData.
C++Syntax
FMOD_RESULTEventCategory::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_EventCategory_SetUserData(
FMOD_EVENTCATEGORY*eventcategory,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheEventCategoryobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingEventCategory::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
EventCategory::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::setVolumeSetstheoverallvolumeofaneventcategory.
C++Syntax
FMOD_RESULTEventCategory::setVolume(
floatvolume
);
CSyntax
FMOD_RESULTFMOD_EventCategory_SetVolume(
FMOD_EVENTCATEGORY*eventcategory,
floatvolume
);
Parameters
volume
Volumeleveloftheeventcategory.0.0=silent,1.0=fullvolume(default).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Aneventcategorycanhaveseveraleventsplayingunderitatoncesothisfunctionscalesallrelevanteventvolumesforthiseventcategory.Thisfunctionisnottobeusedunlessneededforruntimereasons,asthesounddesignerwillhavesettheappropriateeventcategoryvolumelevelintheFMOD
Designertool.
SeeAlso
EventCategory::getVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventCategory::stopAllEventsStopsalleventsinthiscategoryandsubcategories.
C++Syntax
FMOD_RESULTEventCategory::stopAllEvents();
CSyntax
FMOD_RESULTFMOD_EventCategory_StopAllEvents(FMOD_EVENTCATEGORY*eventcategory
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventReverbInterfaceEventReverb::get3DAttributesEventReverb::getActiveEventReverb::getMemoryInfoEventReverb::getPropertiesEventReverb::getUserDataEventReverb::releaseEventReverb::set3DAttributesEventReverb::setActiveEventReverb::setPropertiesEventReverb::setUserData
FirelightTechnologiesFMODEx
EventReverb::get3DAttributesGetsthe3Dattributesoftheevent3Dreverbobject
C++Syntax
FMOD_RESULTEventReverb::get3DAttributes(
FMOD_VECTOR*position,
float*mindistance,
float*maxdistance
);
CSyntax
FMOD_RESULTFMOD_EventReverb_Get3DAttributes(
FMOD_EVENTREVERB*eventreverb,
FMOD_VECTOR*position,
float*mindistance,
float*maxdistance
);
Parameters
position
pointertoavectorin3Dspacewherethereverbiscentred
mindistance
radiuswithinwhichthereverbhasfulleffect
maxdistance
radiusoutsideofwhichthereverbhaszeroeffect
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.
IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
The3Dreverbobjectisaspherehaving3Dattributes(position,minimumdistance,maximumdistance)andreverbproperties.Thepropertiesand3Dattributesofallreverbobjectscollectivelydetermine,alongwiththelistener'sposition,thesettingsofandinputgainsintoasingle3DreverbDSP.Pleasenotethatthisonlyappliestosoftwarechannels.Whenthelisteneriswithinthesphereofeffectofoneormore3dreverbs,thelistener's3Dreverbpropertiesareaweightedcombinationofsuch3dreverbs.Whenthelistenerisoutsideallofthereverbs,the3Dreverbsettingissettothedefaultambientreverbsetting.
SeeAlso
EventReverb::set3DAttributes
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventReverb::getActiveRetrievestheactivestateofthereverbobject.
C++Syntax
FMOD_RESULTEventReverb::getActive(
bool*active
);
CSyntax
FMOD_RESULTFMOD_EventReverb_GetActive(
FMOD_EVENTREVERB*eventreverb,
FMOD_BOOL*active
);
Parameters
active
Addressofavariabletoreceivethecurrentactivestateofthereverbobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventReverb::setActiveEventSystem::createReverb
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventReverb::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTEventReverb::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_EventReverb_GetMemoryInfo(
FMOD_EVENTREVERB*eventreverb,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventReverb::getPropertiesRetrievesthecurrentreverbpropertiesforthisevent3dreverbobject.
C++Syntax
FMOD_RESULTEventReverb::getProperties(
FMOD_REVERB_PROPERTIES*props
);
CSyntax
FMOD_RESULTFMOD_EventReverb_GetProperties(
FMOD_EVENTREVERB*eventreverb,
FMOD_REVERB_PROPERTIES*props
);
Parameters
props
AddressofavariabletoreceivetheFMOD_REVERB_PROPERTIESinformation.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventReverb::setPropertiesFMOD_REVERB_PROPERTIES
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventReverb::getUserDataRetrievestheuservaluethatthatwassetbycallingtheEventReverb::setUserDatafunction.
C++Syntax
FMOD_RESULTEventReverb::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_EventReverb_GetUserData(
FMOD_EVENTREVERB*eventreverb,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeEventReverb::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventReverb::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventReverb::releaseReleasememoryforaneventreverbobject.
C++Syntax
FMOD_RESULTEventReverb::release();
CSyntax
FMOD_RESULTFMOD_EventReverb_Release(FMOD_EVENTREVERB*eventreverb
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thiswillreleasethiseventreverbobject.
SeeAlso
EventSystem::getReverbPresetEventSystem::getReverbPresetByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventReverb::set3DAttributesSetsthe3Dattributesoftheevent3Dreverbobject
C++Syntax
FMOD_RESULTEventReverb::set3DAttributes(
constFMOD_VECTOR*position,
floatmindistance,
floatmaxdistance
);
CSyntax
FMOD_RESULTFMOD_EventReverb_Set3DAttributes(
FMOD_EVENTREVERB*eventreverb,
constFMOD_VECTOR*position,
floatmindistance,
floatmaxdistance
);
Parameters
position
pointertoavectorin3Dspacewherethereverbiscentred
mindistance
radiuswithinwhichthereverbhasfulleffect
maxdistance
radiusoutsideofwhichthereverbhaszeroeffect
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.
IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
The3Dreverbobjectisaspherehaving3Dattributes(position,minimumdistance,maximumdistance)andreverbproperties.Thepropertiesand3Dattributesofallreverbobjectscollectivelydetermine,alongwiththelistener'sposition,thesettingsofandinputgainsintoasingle3DreverbDSP.Pleasenotethatthisonlyappliestosoftwarechannels.Whenthelisteneriswithinthesphereofeffectofoneormore3dreverbs,thelistener's3Dreverbpropertiesareaweightedcombinationofsuch3dreverbs.Whenthelistenerisoutsideallofthereverbs,the3Dreverbsettingissettothedefaultambientreverbsetting.
SeeAlso
EventReverb::get3DAttributes
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventReverb::setActiveDisablesorenablesareverbobjectsothatitdoesordoesnotcontributetothe3dscene.
C++Syntax
FMOD_RESULTEventReverb::setActive(
boolactive
);
CSyntax
FMOD_RESULTFMOD_EventReverb_SetActive(
FMOD_EVENTREVERB*eventreverb,
FMOD_BOOLactive
);
Parameters
active
true=active,false=notactive.Default=true.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventReverb::getActiveEventSystem::createReverb
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventReverb::setPropertiesSetsthereverbpropertiesforthisevent3dreverbobject.
C++Syntax
FMOD_RESULTEventReverb::setProperties(
constFMOD_REVERB_PROPERTIES*props
);
CSyntax
FMOD_RESULTFMOD_EventReverb_SetProperties(
FMOD_EVENTREVERB*eventreverb,
constFMOD_REVERB_PROPERTIES*props
);
Parameters
props
PointertoaFMOD_REVERB_PROPERTIESstructuredefinition.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
EventSystem::getReverbPresetandEventSystem::getReverbPresetByIndexcanbeusedtoretrievesounddesignerdefinedpresets,oritcanbesetprogrammatically.
SeeAlso
EventReverb::getPropertiesFMOD_REVERB_PROPERTIESEventSystem::getReverbPresetEventSystem::getReverbPresetByIndexEventSystem::createReverb
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventReverb::setUserDataSetsauservaluethattheEventReverbobjectwillstoreinternally.CanberetrievedwithEventReverb::getUserData.
C++Syntax
FMOD_RESULTEventReverb::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_EventReverb_SetUserData(
FMOD_EVENTREVERB*eventreverb,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheEventReverbobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingEventReverb::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
EventReverb::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueInterfaceEventQueue::addEventQueue::clearEventQueue::dumpEventQueue::excludeDuckingCategoryEventQueue::findFirstEntryEventQueue::findNextEntryEventQueue::getMemoryInfoEventQueue::getPausedEventQueue::getUserDataEventQueue::includeDuckingCategoryEventQueue::releaseEventQueue::removeEventQueue::removeHeadEventQueue::setCallbackEventQueue::setPausedEventQueue::setUserData
FirelightTechnologiesFMODEx
EventQueue::addAddanEventQueueEntrytothisEventQueue.
C++Syntax
FMOD_RESULTEventQueue::add(
EventQueueEntry*entry,
boolallow_duplicates
);
CSyntax
FMOD_RESULTFMOD_EventQueue_Add(
FMOD_EVENTQUEUE*eventqueue,
FMOD_EVENTQUEUEENTRY*entry,
FMOD_BOOLallow_duplicates
);
Parameters
entry
TheEventQueueEntrytoaddtothisEventQueue
allow_duplicates
IfTRUE,multipleentriesforthesameeventwillbeallowed.IfFALSE,onlyoneentryforanygiveneventwillbeallowedatonetime-ifyoutrytoaddanentryforaneventthatisalreadyrepresentedinthequeuethenthisfunctionwillfail.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::createEventQueueEntryEventQueue::remove
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::clearRemoveallEventQueueEntriesfromthisEventQueue.ThisfunctionalsoreleasesthememoryforallEventQueueEntries.
C++Syntax
FMOD_RESULTEventQueue::clear(
boolstopallevents
);
CSyntax
FMOD_RESULTFMOD_EventQueue_Clear(
FMOD_EVENTQUEUE*eventqueue,
FMOD_BOOLstopallevents
);
Parameters
stopallevents
IfTRUE,stopallplayingeventsthatwerestartedbythisqueue.IfFALSE,anyeventsplayedfromthisqueuewillcontinuetoplaytocompletionafterthisqueuehasbeencleared
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueue::remove
EventQueue::add
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::dumpDumpinformationaboutthisEventQueuetothedebuglog.
C++Syntax
FMOD_RESULTEventQueue::dump();
CSyntax
FMOD_RESULTFMOD_EventQueue_Dump(FMOD_EVENTQUEUE*eventqueue);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::excludeDuckingCategoryExcludeanEventCategoryfromduckingwheneventsareplayingfromthisEventQueue.
C++Syntax
FMOD_RESULTEventQueue::excludeDuckingCategory(
EventCategory*category
);
CSyntax
FMOD_RESULTFMOD_EventQueue_ExcludeDuckingCategory(
FMOD_EVENTQUEUE*eventqueue,
FMOD_EVENTCATEGORY*category
);
Parameters
category
Thecategorytoexcludefromduckingwheneventsareplayingfromthisqueue
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
NOTE:Thisfunctioniscurrentlyunimplemented.
SeeAlso
EventQueue::includeDuckingCategory
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::findFirstEntryRetrieveapointertothefirstEventQueueEntryinthisEventQueue.UsethisfunctioninconjunctionwithEventQueue::findNextEntrytoiteratethroughtheentriesinthisEventQueue.
C++Syntax
FMOD_RESULTEventQueue::findFirstEntry(
EventQueueEntry**entry
);
CSyntax
FMOD_RESULTFMOD_EventQueue_FindFirstEntry(
FMOD_EVENTQUEUE*eventqueue,
FMOD_EVENTQUEUEENTRY**entry
);
Parameters
entry
AddressofapointertoreceiveapointertoanEventQueueEntryobject
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueue::findNextEntry
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::findNextEntryRetrieveapointertothenextEventQueueEntryinthisEventQueue.UsethisfunctioninconjunctionwithEventQueue::findFirstEntrytoiteratethroughtheentriesinthisEventQueue.
C++Syntax
FMOD_RESULTEventQueue::findNextEntry(
EventQueueEntry**entry
);
CSyntax
FMOD_RESULTFMOD_EventQueue_FindNextEntry(
FMOD_EVENTQUEUE*eventqueue,
FMOD_EVENTQUEUEENTRY**entry
);
Parameters
entry
AddressofapointertoreceiveapointertoanEventQueueEntryobject.Whenthisfunctioniscalled,entrymustpointtoavalidEventQueueEntry.UseEventQueue::findFirstEntrytoretrieveavalidEventQueueEntry.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueue::findFirstEntry
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTEventQueue::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_EventQueue_GetMemoryInfo(
FMOD_EVENTQUEUE*eventqueue,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::getPausedGetthepausedstateofthisEventQueue.
C++Syntax
FMOD_RESULTEventQueue::getPaused(
bool*paused
);
CSyntax
FMOD_RESULTFMOD_EventQueue_GetPaused(
FMOD_EVENTQUEUE*eventqueue,
FMOD_BOOL*paused
);
Parameters
paused
AddressofabooltoreceivethepausedstateofthisEventQueue.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueue::setPaused
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::getUserDataRetrievestheuservaluethatthatwassetbycallingtheEventQueue::setUserDatafunction.
C++Syntax
FMOD_RESULTEventQueue::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_EventQueue_GetUserData(
FMOD_EVENTQUEUE*eventqueue,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeEventQueue::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueue::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::includeDuckingCategoryIncludeanEventCategorytoduckwheneventsareplayingfromthisEventQueue.
C++Syntax
FMOD_RESULTEventQueue::includeDuckingCategory(
EventCategory*category,
floatducked_volume,
floatunducked_volume,
unsignedintduck_time,
unsignedintunduck_time
);
CSyntax
FMOD_RESULTFMOD_EventQueue_IncludeDuckingCategory(
FMOD_EVENTQUEUE*eventqueue,
FMOD_EVENTCATEGORY*category,
floatducked_volume,
floatunducked_volume,
unsignedintduck_time,
unsignedintunduck_time
);
Parameters
category
TheEventCategorytoduckwheneventsareplayingfromthisqueue
ducked_volume
Thevolumetoduckthecategorydownto(0.0->1.0)
unducked_volume
Thevolumetounduckthecategorytowhennoeventsareplayingfromthisqueue(0.0->1.0)
duck_time
Thetimeinmillisecondsoverwhichthecategory'scurrentvolumewillbefadeddowntowardsthespecifiedducked_volume
unduck_time
Thetimeinmillisecondsoverwhichthecategory'scurrentvolumewillbefadeduptowardsthespecifiedunducked_volume
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Usethisfunctionimplement"ducking".Forexample,youmaywanttotemporarilybringdownthevolumeofyourbackgroundmusicwhenacharacteristalking.Youcanusethisfunctiontospecifythatthe"music"categorybeduckedbyaspecifiedamountwheneversomethingisplayingonthisEventQueue.Usethe"duck_time"and"unduck_time"tospecifyhowfastyouwantthecategorytoduckandun-ducke.g.shorter"duck_time"willmakethebackgroundmusicduckaggressivelyassoonassomeonetalks;longer"unduck_time"willkeepthemusiclowforalittlewhileafterthetalkinghasstopped.
SeeAlso
EventQueue::excludeDuckingCategory
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::releaseReleasememoryforanEventQueueobjectandallEventQueueEntryobjectsthatitcontains.
C++Syntax
FMOD_RESULTEventQueue::release();
CSyntax
FMOD_RESULTFMOD_EventQueue_Release(FMOD_EVENTQUEUE*eventqueue);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctionwillstopallplayingeventsinthequeueimmediatelyandcallEventQueueEntry::releaseonallEventQueueEntriesbeforereleasingtheEventQueueitself.
SeeAlso
EventSystem::createEventQueueEventQueueEntry::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::removeRemovethespecifiedEventQueueEntryfromthisEventQueue.ThisfunctionalsoreleasesthememoryforthespecifiedEventQueueEntry.
C++Syntax
FMOD_RESULTEventQueue::remove(
EventQueueEntry*entry
);
CSyntax
FMOD_RESULTFMOD_EventQueue_Remove(
FMOD_EVENTQUEUE*eventqueue,
FMOD_EVENTQUEUEENTRY*entry
);
Parameters
entry
TheEventQueueEntrytoremovefromthisEventQueue.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueue::removeHeadEventQueue::add
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::removeHeadRemovethefirstEventQueueEntryinthisEventQueue.ThisfunctionalsoreleasesthememoryfortheEventQueueEntry.
C++Syntax
FMOD_RESULTEventQueue::removeHead();
CSyntax
FMOD_RESULTFMOD_EventQueue_RemoveHead(FMOD_EVENTQUEUE*eventqueue
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueue::removeEventQueue::add
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::setCallbackSetsacallbacksothatwhencertaineventqueuebehaviourshappen,theycanbecaughtbytheuser.
C++Syntax
FMOD_RESULTEventQueue::setCallback(
FMOD_EVENTQUEUE_CALLBACKcallback,
void*callbackuserdata
);
CSyntax
FMOD_RESULTFMOD_EventQueue_SetCallback(
FMOD_EVENTQUEUE*eventqueue,
FMOD_EVENTQUEUE_CALLBACKcallback,
void*callbackuserdata
);
Parameters
callback
PointertoacallbacktobecalledbyFMOD.
callbackuserdata
Userdatapointertobepassedtocallback.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_EVENTQUEUE_CALLBACKFMOD_EVENTQUEUE_CALLBACKTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::setPausedPauseorunpausethisEventQueue.WhenanEventQueueispaused,anyeventscurrentlyplayingfromthisqueuewillbepausedandnoneweventswillbeplayed.
C++Syntax
FMOD_RESULTEventQueue::setPaused(
boolpaused
);
CSyntax
FMOD_RESULTFMOD_EventQueue_SetPaused(
FMOD_EVENTQUEUE*eventqueue,
FMOD_BOOLpaused
);
Parameters
paused
IfTRUE,thisEventQueuewillbepaused.IfFALSE,thisEventQueuewillbeunpaused
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueue::getPaused
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueue::setUserDataSetsauservaluethattheEventQueueobjectwillstoreinternally.CanberetrievedwithEventQueue::getUserData.
C++Syntax
FMOD_RESULTEventQueue::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_EventQueue_SetUserData(
FMOD_EVENTQUEUE*eventqueue,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheEventQueueobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasa
parameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingEventQueue::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
EventQueue::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntryInterfaceEventQueueEntry::getCrossfadeTimeEventQueueEntry::getDelayTimeEventQueueEntry::getExpiryTimeEventQueueEntry::getInfoOnlyEventEventQueueEntry::getInterruptEventQueueEntry::getMemoryInfoEventQueueEntry::getPriorityEventQueueEntry::getRealEventEventQueueEntry::getUserDataEventQueueEntry::releaseEventQueueEntry::setCrossfadeTimeEventQueueEntry::setDelayTimeEventQueueEntry::setExpiryTimeEventQueueEntry::setInterruptEventQueueEntry::setPriorityEventQueueEntry::setUserData
FirelightTechnologiesFMODEx
EventQueueEntry::getCrossfadeTimeRetrievethecrossfadetimeforthiseventqueueentry.
C++Syntax
FMOD_RESULTEventQueueEntry::getCrossfadeTime(
int*crossfade
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_GetCrossfadeTime(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
int*crossfade
);
Parameters
crossfade
Addressofavariabletoreceivethecrossfadetimeofthiseventqueueentry
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::setCrossfadeTime
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::getDelayTimeRetrievethedelaytimeforthiseventqueueentry.
C++Syntax
FMOD_RESULTEventQueueEntry::getDelayTime(
unsignedint*delay
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_GetDelayTime(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
unsignedint*delay
);
Parameters
delay
Addressofavariabletoreceivethedelaytime(inmilliseconds)ofthiseventqueueentry
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::setDelayTime
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::getExpiryTimeRetrievetheexpirytimeforthiseventqueueentry.
C++Syntax
FMOD_RESULTEventQueueEntry::getExpiryTime(
unsignedint*expirytime
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_GetExpiryTime(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
unsignedint*expirytime
);
Parameters
expirytime
Addressofavariabletoreceivetheexpirytime(inmilliseconds)ofthiseventqueueentry
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::setExpiryTime
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::getInfoOnlyEventRetrieveahandletotheeventthatisassociatedwiththiseventqueueentry.Note:ThishandlewillbethesameFMOD_EVENT_INFOONLYeventhandlethatwaspassedtoEventSystem::createEventQueueEntry.
C++Syntax
FMOD_RESULTEventQueueEntry::getInfoOnlyEvent(
Event**infoonlyevent
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_GetInfoOnlyEvent(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
FMOD_EVENT**infoonlyevent
);
Parameters
infoonlyevent
AddressofaneventhandlethatreceivestheFMOD_EVENT_INFOONLYeventhandleassociatedwiththiseventqueueentry
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::getRealEvent
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::getInterruptRetrievetheinterruptflagforthiseventqueueentry.
C++Syntax
FMOD_RESULTEventQueueEntry::getInterrupt(
bool*interrupt
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_GetInterrupt(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
FMOD_BOOL*interrupt
);
Parameters
interrupt
Addressofavariabletoreceivetheinterruptflagofthiseventqueueentry
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::getInterrupt
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTEventQueueEntry::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_GetMemoryInfo(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::getPriorityGetthepriorityofthiseventqueueentry.
C++Syntax
FMOD_RESULTEventQueueEntry::getPriority(
unsignedchar*priority
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_GetPriority(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
unsignedchar*priority
);
Parameters
priority
Addressofavariabletoreceivethepriorityofthiseventqueueentry
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::setPriority
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::getRealEventRetrieveahandletotheplayingeventthatisassociatedwiththiseventqueueentry.Thishandlewillbeavalideventinstancehandleoftheplayingevent,notanFMOD_EVENT_INFOONLYhandle.Iftheeventisnotcurrentlyplaying,0willberetruned.
C++Syntax
FMOD_RESULTEventQueueEntry::getRealEvent(
Event**realevent
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_GetRealEvent(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
FMOD_EVENT**realevent
);
Parameters
realevent
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::getInfoOnlyEvent
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::getUserDataRetrievestheuservaluethatthatwassetbycallingtheEventQueueEntry::setUserDatafunction.
C++Syntax
FMOD_RESULTEventQueueEntry::getUserData(
void**userdata
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_GetUserData(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
void**userdata
);
Parameters
userdata
AddressofapointerthatreceivesthedataspecifiedwiththeEventQueueEntry::setUserDatafunction.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::setUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::releaseReleasethiseventqueueentryandallassociatedmemory.Ifthiseventqueueentryisinaneventqueue,itwillberemovedfromtheeventqueuebeforeitisreleased.
C++Syntax
FMOD_RESULTEventQueueEntry::release();
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_Release(FMOD_EVENTQUEUEENTRY*eventqueueentry
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventSystem::createEventQueueEntryEventQueue::add
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::setCrossfadeTimeSetacrossfadetimeforthiseventqueueentry.NOTE:Thisfunctioniscurrentlyunimplemented.
C++Syntax
FMOD_RESULTEventQueueEntry::setCrossfadeTime(
intcrossfade
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_SetCrossfadeTime(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
intcrossfade
);
Parameters
crossfade
Crossfadetimeinmilliseconds
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::getCrossfadeTime
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::setDelayTimeSetadelaytimeforthiseventqueueentry.Settingadelaytimeforanentryallowsyoutodelayeventplaybackwhenanentryreachestheheadofthequeue.
C++Syntax
FMOD_RESULTEventQueueEntry::setDelayTime(
unsignedintdelay
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_SetDelayTime(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
unsignedintdelay
);
Parameters
delay
Timeinmillisecondstodelayeventplaybackwhenthisentryreachestheheadofthequeue.Example:1500=eventplaybackwillstart1.5secondsafterthisentryreachestheheadofthequeue
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::getDelayTime
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::setExpiryTimeSetanexpirytimeforthiseventqueueentry.Ifthisentrysitsinthequeueforlongerthantheexpirytimewithoutplayingthenitwillexpireandberemovedfromthequeue.
C++Syntax
FMOD_RESULTEventQueueEntry::setExpiryTime(
unsignedintexpirytime
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_SetExpiryTime(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
unsignedintexpirytime
);
Parameters
expirytime
Expirytimeinmilliseconds.Example:2000=entrywillberemovedifithasn'tplayedwithin2seconds
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::getExpiryTime
EventQueue::add
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::setInterruptSettheinterruptflagforthiseventqueueentry.Ifanentrywiththeinterruptflagsetisaddedtoaqueuethenitwillstopthecurrentlyplayingeventandplayimmediately.
C++Syntax
FMOD_RESULTEventQueueEntry::setInterrupt(
boolinterrupt
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_SetInterrupt(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
FMOD_BOOLinterrupt
);
Parameters
interrupt
IfTRUE,thisentrywillinterruptthequeuewhenadded.IfFALSE,thisentrywillbeaddedtothequeueasnormal
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::getInterrupt
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::setPrioritySetthepriorityofthiseventqueueentry.Thisdetermineswherethisentrywillbeinsertedwhenitisaddedtoaneventqueue.Callthisfunctionbeforeaddingthisentrytoaneventqueue.
C++Syntax
FMOD_RESULTEventQueueEntry::setPriority(
unsignedcharpriority
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_SetPriority(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
unsignedcharpriority
);
Parameters
priority
Thepriorityofthisentry0=lowest=endofthequeue,255=highest=startofthequeue
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
EventQueueEntry::getPriority
EventQueue::add
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EventQueueEntry::setUserDataSetsauservaluethattheEventQueueEntryobjectwillstoreinternally.CanberetrievedwithEventQueueEntry::getUserData.
C++Syntax
FMOD_RESULTEventQueueEntry::setUserData(
void*userdata
);
CSyntax
FMOD_RESULTFMOD_EventQueueEntry_SetUserData(
FMOD_EVENTQUEUEENTRY*eventqueueentry,
void*userdata
);
Parameters
userdata
AddressofuserdatathattheuserwishesstoredwithintheEventQueueEntryobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionisprimarilyusedincasetheuserwishesto'attach'datatoanFMODobject.
ItcanbeusefulifanFMODcallbackpassesanobjectofthistypeasaparameter,andtheuserdoesnotknowwhichobjectitis(ifmanyofthesetypesofobjectsexist).UsingEventQueueEntry::getUserDatawouldhelpintheidentificationoftheobject.
SeeAlso
EventQueueEntry::getUserData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystemInterfaceMusicSystem::freeSoundDataMusicSystem::getCuesMusicSystem::getInfoMusicSystem::getMemoryInfoMusicSystem::getMuteMusicSystem::getNextCueMusicSystem::getNextParameterMusicSystem::getParameterValueMusicSystem::getParametersMusicSystem::getPausedMusicSystem::getReverbPropertiesMusicSystem::getVolumeMusicSystem::loadSoundDataMusicSystem::prepareCueMusicSystem::promptCueMusicSystem::resetMusicSystem::setCallbackMusicSystem::setMuteMusicSystem::setParameterValueMusicSystem::setPausedMusicSystem::setReverbPropertiesMusicSystem::setVolume
FirelightTechnologiesFMODEx
MusicSystem::freeSoundDataFreessounddataforthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::freeSoundData(
boolwaituntilready
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_FreeSoundData(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_BOOLwaituntilready
);
Parameters
waituntilready
IfTRUE,thisfunctionwillblockuntilallpendingasynchronousloadshavecompletedbeforefreeingthesounddata.IfFALSE,thisfunctionwillreturnFMOD_ERR_NOTREADYifanyasynchronousloadsarependinganditwillNOTfreeanysounddata.Default=TRUE.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Note:Thisfunctiondoesnotcompletelyremovemusicdatafrommemory,it
simplyfreesanysoundsallocatedbythemusicsystem.Tocompletelyremovemusicdatafrommemory,useEventSystem::unload.Usewaituntilready=falseintime-criticalsituationstoavoidblockingthemainthread.NotethatifFMOD_ERR_NOTREADYisreturnedfromthisfunctionthennoeventdatawasactuallyfreed-youwillneedtocallthisfunctionagainuntilitsucceeds.
Note:Donotcallthisfunctionfromamusicsystemcallback!
SeeAlso
MusicSystem::loadSoundDataEventSystem::unload
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::getCuesGetsamusiciteratorfromthemusicsystempointingtothefirstcuematchingthefilterstring.
C++Syntax
FMOD_RESULTMusicSystem::getCues(
FMOD_MUSIC_ITERATOR*it,
constchar*filter
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_GetCues(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_MUSIC_ITERATOR*it,
constchar*filter
);
Parameters
it
Addressofaniteratortoreceivetheresult.
filter
Thefilterstringusedtomatchcuenames.Thesystemwilllookforanexactmatchtothecuename.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifthefilterstringisnulltheiteratorwillpointtothefirstcueofallcuessortedalphabetically.Ifthereisn'tamatchtheiteratorwillholdanullvalue.
SeeAlso
FMOD_MUSIC_ITERATORMusicSystem::getNextCue
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::getInfoRetrievesinformationaboutthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::getInfo(
FMOD_MUSIC_INFO*info
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_GetInfo(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_MUSIC_INFO*info
);
Parameters
info
AddressofanFMOD_MUSIC_INFOstructuretoreceivemusicsysteminformation.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_MUSIC_INFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTMusicSystem::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_GetMemoryInfo(
FMOD_MUSICSYSTEM*musicsystem,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::getMuteRetrievesthemutestateofthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::getMute(
bool*mute
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_GetMute(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_BOOL*mute
);
Parameters
mute
Addressofavariabletoreceivethemutestateofthemusicsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
MusicSystem::setMute
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::getNextCueAdvancestheiteratorsetbyMusicSystem::getCuestothenextmatchingcueinthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::getNextCue(
FMOD_MUSIC_ITERATOR*it
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_GetNextCue(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_MUSIC_ITERATOR*it
);
Parameters
it
Addressofaniteratortoreceivetheresult.MustbetheaddressofaniteratorpreviouslygiventoMusicSystem::getCues.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
IfthefilterstringgiventoMusicSystem::getCueswasnulltheiteratorwillpointtothenextcueofallcuessortedalphabetically.Ifthereisn'tamatchtheiterator
willholdanullvalue.
SeeAlso
FMOD_MUSIC_ITERATORMusicSystem::getCues
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::getNextParameterAdvancestheiteratorsetbyMusicSystem::getParameterstothenextmatchingparameterinthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::getNextParameter(
FMOD_MUSIC_ITERATOR*it
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_GetNextParameter(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_MUSIC_ITERATOR*it
);
Parameters
it
Addressofaniteratortoreceivetheresult.MustbetheaddressofaniteratorpreviouslygiventoMusicSystem::getParameters.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
IfthefilterstringgiventoMusicSystem::getParameterswasnulltheiteratorwillpointtothenextparameterofallparameterssortedalphabetically.Ifthereisn'ta
matchtheiteratorwillholdanullvalue.
SeeAlso
FMOD_MUSIC_ITERATORMusicSystem::getParameters
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::getParameterValueGetsthevalueofagivenmusicsystemparameter.
C++Syntax
FMOD_RESULTMusicSystem::getParameterValue(
FMOD_MUSIC_PARAM_IDid,
float*parameter
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_GetParameterValue(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_MUSIC_PARAM_IDid,
float*parameter
);
Parameters
id
Theuniqueidentifierfortheparameter.
parameter
Addressofavariabletoreceivetheparametervalue.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
MusicSystem::setParameterValue
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::getParametersGetsamusiciteratorfromthemusicsystempointingtothefirstparametermatchingthefilterstring.
C++Syntax
FMOD_RESULTMusicSystem::getParameters(
FMOD_MUSIC_ITERATOR*it,
constchar*filter
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_GetParameters(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_MUSIC_ITERATOR*it,
constchar*filter
);
Parameters
it
Addressofaniteratortoreceivetheresult.
filter
Thefilterstringusedtomatchparameternames.Thesystemwilllookforanexactmatchtotheparametername.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Ifthefilterstringisnulltheiteratorwillpointtothefirstparameterofallparameterssortedalphabetically.Ifthereisn'tamatchtheiteratorwillholdanullvalue.
SeeAlso
FMOD_MUSIC_ITERATORMusicSystem::getNextParameter
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::getPausedRetrievesthepausedstateofthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::getPaused(
bool*paused
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_GetPaused(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_BOOL*paused
);
Parameters
paused
Addressofavariabletoreceivethepausedstateofthemusicsystem.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
MusicSystem::setPaused
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::getReverbPropertiesGetsthereverbpropertiesofthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::getReverbProperties(
FMOD_REVERB_CHANNELPROPERTIES*props
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_GetReverbProperties(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_REVERB_CHANNELPROPERTIES*props
);
Parameters
props
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
TheConnectionPointmemberisalwaysNULL.
SeeAlso
MusicSystem::setReverbProperties
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::getVolumeRetrievestheoverallvolumeofthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::getVolume(
float*volume
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_GetVolume(
FMOD_MUSICSYSTEM*musicsystem,
float*volume
);
Parameters
volume
Addressofavariabletoreceivethecurrentvolumelevelofthemusicsystem.0.0=silent,1.0=fullvolume(default).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
MusicSystem::setVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::loadSoundDataLoadssounddataforthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::loadSoundData(
FMOD_EVENT_RESOURCEresource,
FMOD_EVENT_MODEmode
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_LoadSoundData(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_EVENT_RESOURCEresource,
FMOD_EVENT_MODEmode
);
Parameters
resource
Typeofdatatoload.CurrentlyonlyFMOD_EVENT_RESOURCE_SAMPLESissupported.SeeFMOD_EVENT_RESOURCE.
mode
OnlyusesFMOD_EVENT_NONBLOCKINGflagtodeterminewhethertoloadasynchronously.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UseMusicSystem::freeSoundDatatounloadmusicsystemsounddata.Notethatifthereareeventsstillusingthesounddata,itwillnotbefreeduntilthoseeventshavehadEventGroup::freeEventDatacalledonthemaswell.
SeeAlso
MusicSystem::freeSoundDataEventGroup::freeEventDataFMOD_EVENT_RESOURCEFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::prepareCuePreparesamusicpromptforthegivencue.
C++Syntax
FMOD_RESULTMusicSystem::prepareCue(
FMOD_MUSIC_CUE_IDid,
MusicPrompt**prompt
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_PrepareCue(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_MUSIC_CUE_IDid,
FMOD_MUSICPROMPT**prompt
);
Parameters
id
Theuniqueidentifierforthecue.
prompt
Addressofavariabletoreceivethepromptobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThisfunctioncanbeusedtoobtainaMusicPromptobjecttotriggerandcontrolthelifespanofacue.MusicPrompt::beginandMusicPrompt::endcanthenbecalledtocontrolthecue.
Note!ThisfunctionallocatesmemoryfortheMusicPromptobject.MusicPrompt::releasemustbecalledtofreethismemory.
SeeAlso
MusicSystem::promptCueMusicPrompt::beginMusicPrompt::endMusicPrompt::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::promptCueTriggersaninstantaneouscue.
C++Syntax
FMOD_RESULTMusicSystem::promptCue(
FMOD_MUSIC_CUE_IDid
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_PromptCue(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_MUSIC_CUE_IDid
);
Parameters
id
Theuniqueidentifierforthecue.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisisaconveniencefunctionfortriggeringcues.Thelifespanofthecuewithinthemusicsystemisinstantaneous.Thisfunctionismostusefulfortriggeringmusicalstings.ForalongermusicaleventMusicSystem::prepareCuecanbeusedtoobtainaMusicPromptobjecttocontrolthelifespanofacue.
ThisfunctionisequivalenttocallingMusicSystem::prepareCuefollowedimmediatelybyMusicPrompt::beginandMusicPrompt::end.
SeeAlso
MusicSystem::prepareCueMusicPrompt::beginMusicPrompt::end
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::resetResetsthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::reset();
CSyntax
FMOD_RESULTFMOD_MusicSystem_Reset(FMOD_MUSICSYSTEM*musicsystem);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionstopsallplayingsoundswithinthemusicsystemandclearsallactivecues.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::setCallbackSetsacallbacksothatwhencertainmusicbehaviourshappen,theycanbecaughtbytheuser.
C++Syntax
FMOD_RESULTMusicSystem::setCallback(
FMOD_MUSIC_CALLBACKcallback,
void*userdata
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_SetCallback(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_MUSIC_CALLBACKcallback,
void*userdata
);
Parameters
callback
PointertoacallbacktobecalledbyFMOD.
userdata
Userdatapointertobepassedtocallback.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
FMOD_MUSIC_CALLBACKFMOD_MUSIC_CALLBACKTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::setMuteMutesorunmutesthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::setMute(
boolmute
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_SetMute(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_BOOLmute
);
Parameters
mute
Mutestateofthemusicsystem.true=muted,false=unmuted.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
MusicSystem::getMute
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::setParameterValueSetsthevalueofagivenmusicsystemparameter.
C++Syntax
FMOD_RESULTMusicSystem::setParameterValue(
FMOD_MUSIC_PARAM_IDid,
floatparameter
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_SetParameterValue(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_MUSIC_PARAM_IDid,
floatparameter
);
Parameters
id
Theuniqueidentifierfortheparameter.
parameter
Thevalueoftheparametertoset.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
MusicSystem::getParameterValue
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::setPausedPausesorunpausesthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::setPaused(
boolpaused
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_SetPaused(
FMOD_MUSICSYSTEM*musicsystem,
FMOD_BOOLpaused
);
Parameters
paused
Pausedstateofthemusicsystem.true=paused,false=unpaused.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
MusicSystem::getPaused
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::setReverbPropertiesSetsthereverbpropertiesofthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::setReverbProperties(
constFMOD_REVERB_CHANNELPROPERTIES*props
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_SetReverbProperties(
FMOD_MUSICSYSTEM*musicsystem,
constFMOD_REVERB_CHANNELPROPERTIES*props
);
Parameters
props
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
TheConnectionPointmemberwillbeignored.
SeeAlso
MusicSystem::getReverbProperties
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicSystem::setVolumeSetstheoverallvolumeofthemusicsystem.
C++Syntax
FMOD_RESULTMusicSystem::setVolume(
floatvolume
);
CSyntax
FMOD_RESULTFMOD_MusicSystem_SetVolume(
FMOD_MUSICSYSTEM*musicsystem,
floatvolume
);
Parameters
volume
Volumelevelofthemusicsystem.0.0=silent,1.0=fullvolume(default).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
MusicSystem::getVolume
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicPromptInterfaceMusicPrompt::beginMusicPrompt::endMusicPrompt::getMemoryInfoMusicPrompt::isActiveMusicPrompt::release
FirelightTechnologiesFMODEx
MusicPrompt::beginBeginsamusicprompt.
C++Syntax
FMOD_RESULTMusicPrompt::begin();
CSyntax
FMOD_RESULTFMOD_MusicPrompt_Begin(FMOD_MUSICPROMPT*musicprompt);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionbeginsthelifespanofthemusicpromptobject.Thepromptstatebecomesactive,andanyassociatedactionsareperformed(e.g.apromptobtainedfromMusicSystem::prepareCuewillactivateitsassociatedcue).
Thisfunctionhasnoeffectifthepromptisalreadyactive.
SeeAlso
MusicSystem::prepareCue
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicPrompt::endEndsamusicprompt.
C++Syntax
FMOD_RESULTMusicPrompt::end();
CSyntax
FMOD_RESULTFMOD_MusicPrompt_End(FMOD_MUSICPROMPT*musicprompt);
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Thisfunctionendsthelifespanofthemusicpromptobject.Thepromptstatebecomesinactive,andanyassociatedactionsareperformed(e.g.apromptobtainedfromMusicSystem::prepareCuewilldeactivateitsassociatedcue).
Thisfunctionhasnoeffectifthepromptisalreadyinactive.
SeeAlso
MusicSystem::prepareCue
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicPrompt::getMemoryInfoRetrievedetailedmemoryusageinformationaboutthisobject.
C++Syntax
FMOD_RESULTMusicPrompt::getMemoryInfo(
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
CSyntax
FMOD_RESULTFMOD_MusicPrompt_GetMemoryInfo(
FMOD_MUSICPROMPT*musicprompt,
unsignedintmemorybits,
unsignedintevent_memorybits,
unsignedint*memoryused,
FMOD_MEMORY_USAGE_DETAILS*memoryused_details
);
Parameters
memorybits
MemoryusagebitsforFMODEx.SeeFMOD_MEMBITS.
event_memorybits
MemoryusagebitsforFMODEventSystem.SeeFMOD_EVENT_MEMBITS.
memoryused
Optional.Specify0toignore.Addressofavariabletoreceivehowmuchmemoryisbeingusedbythisobjectgiventhespecified"memorybits"and"event_memorybits".
memoryused_details
Optional.Specify0toignore.Addressofauser-allocatedFMOD_MEMORY_USAGE_DETAILSstructuretobefilledwithdetailedmemoryusageinformationaboutthisobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
SeeSystem::getMemoryInfoformoredetails.
SeeAlso
FMOD_MEMBITSFMOD_EVENT_MEMBITSFMOD_MEMORY_USAGE_DETAILSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicPrompt::isActiveRetrievestheactivestateofamusicprompt.
C++Syntax
FMOD_RESULTMusicPrompt::isActive(
bool*active
);
CSyntax
FMOD_RESULTFMOD_MusicPrompt_IsActive(
FMOD_MUSICPROMPT*musicprompt,
FMOD_BOOL*active
);
Parameters
active
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
TheactivestateofamusicpromptiscontrolledbyMusicPrompt::beginandMusicPrompt::end.
SeeAlso
MusicPrompt::beginMusicPrompt::end
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
MusicPrompt::releaseReleasesmemoryforaMusicPromptobject.
C++Syntax
FMOD_RESULTMusicPrompt::release();
CSyntax
FMOD_RESULTFMOD_MusicPrompt_Release(FMOD_MUSICPROMPT*musicprompt
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
ThiswillreleasethisMusicPromptobject,freeingthememoryituses.
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FunctionsEventSystem_Create
FirelightTechnologiesFMODEx
EventSystem_CreateFactoryfunctiontocreateanEventSystemobject.ThismustbecalledtocreateanFMODSystemobjectbeforeyoucandoanythingelse.Usethisfunctiontocreate1,ormultipleinstancesofFMODSystemobjects.
C++Syntax
FMOD_RESULTEventSystem_Create(
EventSystem**eventsystem
);
CSyntax
FMOD_RESULTFMOD_EventSystem_Create(
FMOD_EVENTSYSTEM**eventsystem
);
Parameters
eventsystem
AddressofapointerthatreceivesthenewFMODEventSystemobject.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
UseEventSystem::releasetofreeaneventsystemobject.
Itisgenerallyrecommendedtoonlycreateonesystemobject.Creatingmore
thanonecanleadtoexcesscpuusageasitwillspawnextrasoftwaremixerthreads.
SeeAlso
EventSystem::release
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
CallbacksFMOD_EVENTQUEUE_CALLBACKFMOD_EVENT_CALLBACKFMOD_MUSIC_CALLBACK
FirelightTechnologiesFMODEx
FMOD_EVENTQUEUE_CALLBACKEventQueuecallbackthatiscalledwhenoneofthethingslistedinFMOD_EVENTQUEUE_CALLBACKTYPEoccurs.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_EVENTQUEUE_CALLBACK(
FMOD_EVENTQUEUE_CALLBACKTYPEtype,
FMOD_EVENTQUEUE*queue,
FMOD_EVENTQUEUEENTRY*entry,
void*callbackuserdata
);
Parameters
type
Typeofcallbackbeingissued.SeeFMOD_EVENTQUEUE_CALLBACKTYPEforthedifferentreasonsFMODwillgenerateacallbackforanEventQueue.
queue
TheEventQueuethatthiscallbackrelatesto.
entry
TheEventQueueEntrythatthiscallbackrelatesto.
callbackuserdata
UserspecifiedvaluesetwhencallingEventQueue::setCallback.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.Ifthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedinthe
FMOD_RESULTenumeration.
Remarks
C++Users.CastFMOD_EVENTQUEUE*toFMOD::EventQueue*insidethecallbackanduseasnormal.C++Users.CastFMOD_EVENTQUEUEENTRY*toFMOD::EventQueueEntry*insidethecallbackanduseasnormal.
Toavoidneedingtoprocessallmessagessimplyswitchonthemessagesyouareinterestedin.
SeeFMOD_EVENTQUEUE_CALLBACKTYPEfordetails.
SeeAlso
FMOD_EVENTQUEUE_CALLBACKTYPEEventQueue::setCallback
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_CALLBACKEventcallbackthatiscalledwhenoneoftheeventslistedinFMOD_EVENT_CALLBACKTYPEoccurs.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_EVENT_CALLBACK(
FMOD_EVENT*event,
FMOD_EVENT_CALLBACKTYPEtype,
void*param1,
void*param2,
void*userdata
);
Parameters
event
Eventhandleinquestion.
type
Typeofcallbackbeingissued.SeeFMOD_EVENT_CALLBACKTYPEforthedifferentreasonsFMODwillgenerateacallbackforanevent.
param1
Parameter1fortheeventcallback.SeeFMOD_EVENT_CALLBACKTYPEfordifferentusesofparam1.
param2
Parameter2fortheeventcallback.SeeFMOD_EVENT_CALLBACKTYPEfordifferentusesofparam2.
userdata
UserspecifiedvaluesetwhencallingEvent::setCallback.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
C++Users.CastFMOD_EVENT*toFMOD::Event*insidethecallbackanduseasnormal.
Toavoidneedingtoprocessallmessagessimplyswitchonthemessagesyouareinterestedin.
Whentheeventcallbackiscalled'param1'and'param2'meandifferentthingsdependingonthetypeofcallback.SeeFMOD_EVENT_CALLBACKTYPEfordetails.
SeeAlso
FMOD_EVENT_CALLBACKTYPEFMOD_EVENT_PROPERTYEvent::setCallback
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MUSIC_CALLBACKMusiccallbackthatiscalledwhenoneoftheeventslistedinFMOD_MUSIC_CALLBACKTYPEoccurs.
C/C++Syntax
FMOD_RESULTF_CALLBACKFMOD_MUSIC_CALLBACK(
FMOD_MUSIC_CALLBACKTYPEtype,
void*param1,
void*param2,
void*userdata
);
Parameters
type
Typeofcallbackbeingissued.seeFMOD_MUSIC_CALLBACKTYPEforthedifferentreasonsFMODwillgenerateacallbackforthemusicsystem.
param1
Parameter1fortheeventcallback.Seeremarksfordifferentusesofparam1.
param2
Parameter2fortheeventcallback.Seeremarksfordifferentusesofparam2.
userdata
UserspecifiedvaluesetwhencallingMusicSystem::setCallback.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.Ifthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedinthe
FMOD_RESULTenumeration.
Remarks
Toavoidneedingtoprocessallmessagessimplyuseaswitchstatementtoselectthemessagesyouareinterestedin.
'param1'and'param2'meandifferentthingsdependingonthetypeofcallback.Thecontentsofparam1andparam2arelistedbelow.Theparametersarevoid*,butshouldbecasttothelistedCtypetogetthecorrectvalue.
FMOD_MUSIC_CALLBACKTYPE_CHANNEL_CREATEDparam1:(FMOD_MUSIC_SEGMENT_INFO*)infoaboutthesegmentthatisbeingplayed.param2:(FMOD::Channel*)thechannelthatwascreated.Thiscallbackisfiredwhenasegmentisscheduledtoplay,justafterthechanneliscreatedforthesegment.FMOD_MUSIC_CALLBACKTYPE_CHANNEL_DESTROYEDparam1:(FMOD_MUSIC_SEGMENT_INFO*)infoaboutthesegmentthatwasbeingplayed.param2:(FMOD::Channel*)thechannelthatwasdestroyed.Thiscallbackisfiredwhenasegmentchannelisbeingdestroyed,afterthesegmenthasfinishedplaying.FMOD_MUSIC_CALLBACKTYPE_SEGMENT_STARTparam1:(unsignedint)IDofsegmentbeingstarted.param2:Unused.FMOD_MUSIC_CALLBACKTYPE_SEGMENT_ENDparam1:(unsignedint)IDofsegmentbeingstopped.param2:Unused.FMOD_MUSIC_CALLBACKTYPE_SAMPLE_CREATEparam1:(FMOD_MUSIC_SAMPLE_INFO*)Infoaboutsamplebeingcreated.param2[out]:(FMOD::Sound**)pointertoavalidlowlevelFMODSoundhandle.ThesoundmustbecreatedwithFMOD_SOFTWAREset.ItisalsorecommendedtosetFMOD_2D|FMOD_NONBLOCKING|FMOD_CREATESTREAM.
FMOD_MUSIC_CALLBACKTYPE_SAMPLE_RELEASEparam1:(FMOD_MUSIC_SAMPLE_INFO*)Infoaboutsamplebeingreleased.param2:(FMOD::Sound*)thelowlevelFMODSoundhandlethatwaspreviouslyreturnedbyFMOD_MUSIC_CALLBACKTYPE_SAMPLE_CREATE.FMOD_MUSIC_CALLBACKTYPE_RESETparam1:Unused.param2:Unused.FMOD_MUSIC_CALLBACKTYPE_BEATparam1:(int)barnumber(startingat1).param2:(int)beatnumber(startingat1).
SeeAlso
FMOD_MUSIC_CALLBACKTYPEFMOD_MUSIC_SAMPLE_INFOFMOD_MUSIC_SEGMENT_INFOMusicSystem::setCallback
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
StructuresFMOD_EVENT_INFOFMOD_EVENT_LOADINFOFMOD_EVENT_PROJECTINFOFMOD_EVENT_SOUNDDEFINFOFMOD_EVENT_SYSTEMINFOFMOD_EVENT_WAVEBANKINFOFMOD_MUSIC_ENTITYFMOD_MUSIC_INFOFMOD_MUSIC_ITERATORFMOD_MUSIC_SAMPLE_INFOFMOD_MUSIC_SEGMENT_INFO
FirelightTechnologiesFMODEx
FMOD_EVENT_INFOStructurecontainingextendedinformationaboutanevent.
Structure
typedefstruct{
intmemoryused;
intpositionms;
intlengthms;
intchannelsplaying;
intinstancesactive;
intmaxwavebanks;
FMOD_EVENT_WAVEBANKINFO*wavebankinfo;
unsignedintprojectid;
unsignedintsystemid;
floataudibility;
intnuminstances;
FMOD_EVENT**instances;
FMOD_GUID*guid;
}FMOD_EVENT_INFO;
Members
memoryused
Thismemberhasbeendeprecated.
positionms
[out]Timepassedinplaybackofthiseventinstanceinmilliseconds.
lengthms
[out]Lengthinmillisecondsofthisevent.Note:lengthmswillbe-1ifthelengthoftheeventcan'tbedeterminedi.e.ifithasloopingsounds.
channelsplaying
[out]Numberofchannelscurrentlyplayinginthiseventinstance.
instancesactive
[out]Numberofeventinstancescurrentlyinuse.
maxwavebanks
[in/out]Out,numberofwavebanksreferedtobythisevent.In.Maximumsizeofarrayofwavebankinfostructuressuppliedbyuser.Optional.
wavebankinfo
[in]PointertoarrayFMOD_EVENT_WAVEBANKINFOstructures(maxsizedefinedbymaxwavebanks).FMODwillfilltheseinwithdetailedinformationoneachwavebank.Optional.
projectid
[out]Theruntime'EventProject'wideuniqueidentifierforthisevent.
systemid
[out]Theruntime'EventSystem'wideuniqueidentifierforthisevent.Thisiscalculatedwhensingleormultipleprojectsareloaded.
audibility
[out]currentaudibilityofevent.
numinstances
[in/out]Onentry,maximumnumberofentriesininstancesarray.Onexit,actualnumberofentriesininstancesarray,orifinstancesisnull,thenitisjustthenumberofinstancesofthisevent.Optional.
instances
[in/out]Pointertoanarraythatwillbefilledwiththecurrentreference-countedeventhandlesofallinstancesofthisevent.Optional.Specify0ifnotneeded.Mustbeusedinconjunctionwithnuminstances.Note:Duetoreferencecounting,theeventinstancehandlesreturnedheremaybedifferentbetweensubsequentcallstothisfunction.Ifyouusetheseeventhandles,makesureyour
codeispreparedforthemtobeinvalid!
guid
[out]Pointertoastructurethatwillbefilledwiththeevent'sGUID.Optional.Specify0ifnotneeded.
Remarks
Thisstructureisoptional!Specify0orNULLinEvent::getInfoifyoudon'tneedit!ThisstructurehasmembersthatneedtobeinitializedbeforeEvent::getInfoiscalled.AlwaysinitializethisstructurebeforecallingEvent::getInfo!
SeeAlso
Event::getInfoFMOD_GUID
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_LOADINFOUsethisstructurewithEventSystem::loadwhenmorecontrolisneededoverloading.
Structure
typedefstruct{
unsignedintsize;
char*encryptionkey;
floatsounddefentrylimit;
unsignedintloadfrommemory_length;
FMOD_BOOLoverride_category_vals;
unsignedintsizeof_instancepool_simple;
}FMOD_EVENT_LOADINFO;
Members
size
[in]Sizeofthisstructure.ThisisusedsothestructurecanbeexpandedinthefutureandstillworkonolderversionsofFMODEx.
encryptionkey
[in]Optional.Specify0toignore.Key,or'password'todecryptabank.Asounddesignermayhaveencryptedtheaudiodatatoprotecttheirsounddatafrom'rippers'.
sounddefentrylimit
[in]Optional.Specify0toignore.Avaluebetween0->1thatismultipliedwiththenumberofsounddefinitionentriesineachsounddefinitionintheprojectbeingloadedinordertoprogrammaticallyreducethenumberofsounddefinitionentriesusedatruntime.
loadfrommemory_length
[in]Optional.Specify0toignore.Lengthofmemorybufferpointedtoby
name_or_dataparameterpassedtoEventSystem::load.Ifthisfieldisnon-zerothenthename_or_dataparameterpassedtoEventSystem::loadwillbeinterpretedasapointertoamemorybuffercontainingthe.fevdatatoload.Ifthisfieldiszerothename_or_dataparameterisinterpretedasthefilenameofthe.fevfiletoload.
override_category_vals
[in]Optional.Ifthismemberissettotrue,newly-loadedcategorieswillimparttheirproperties(volume,pitchetc.)toexistingcategoriesofthesamename.
sizeof_instancepool_simple
[in]Optional.Specify0toignore.Ifthisvalueisnon-zero,FMODwillcreateaninstancepoolforsimpleeventswith"sizeof_instancepool_simple"entries.Note:Eventinstancepoolscurrentlyworkforsimpleeventsonly.Complexeventswillbehaveasnormalandnotbepooled.
Remarks
Thisstructureisoptional!Specify0orNULLinEventSystem::loadifyoudon'tneedit!
Membersmarkedwith[in]meantheusersetsthevaluebeforepassingittothefunction.Membersmarkedwith[out]meanFMODsetsthevaluetobeusedafterthefunctionexits.Usesounddefentrylimittolimitthenumberofsounddefinitionentries-andthereforetheamountofwavedata-loadedforeachsounddefinition.Thisfeatureallowstheprogrammertoimplementa"lowdetail"settingatruntimewithoutneedingaseperate"lowdetail"setofassets.
SeeAlso
EventSystem::load
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_PROJECTINFOStructurecontainingrealtimeinformationaboutaneventproject.
Structure
typedefstruct{
intindex;
charname[256];
intnumevents;
intnuminstances;
intmaxwavebanks;
FMOD_EVENT_WAVEBANKINFO*wavebankinfo;
intnumplayingevents;
FMOD_EVENT**playingevents;
}FMOD_EVENT_PROJECTINFO;
Members
index
[out]Indexoftheproject.
name
[out]Nameoftheproject.
numevents
[out]Totalnumberofeventsinalleventgroupsinthiseventproject.
numinstances
[out]Totalnumberofeventinstancesinalleventgroupsinthiseventproject.
maxwavebanks
[in/out]Out,numberofwavebanksloadedbytheEventProject.In.Maximumsizeofarrayofwavebankinfostructuressuppliedbyuser.Optional.
wavebankinfo
[in]PointertoarrayFMOD_EVENT_WAVEBANKINFOstructures(maxsizedefinedbymaxwavebanks).FMODwillfilltheseinwithdetailedinformationoneachwavebank.Optional.
numplayingevents
[in/out]Onentry,maximumnumberofentriesinplayingeventsarray.Onexit,actualnumberofentriesinplayingeventsarray,orifplayingeventsisnull,thenitisjustthenumberofcurrentlyplayingevents.Optional.
playingevents
[in/out]Pointertoanarraythatwillbefilledwiththeeventhandlesofallplayingevents.Optional.Specify0ifnotneeded.Mustbeusedinconjunctionwithnumplayingevents.
Remarks
Onentry,numplayingeventsshouldbesettothenumberofelementsintheplayingeventsarray.Iftheactualnumberofplayingeventsisgreaterthannumplayingeventsthentheplayingeventsarraywillbefilledwithnumplayingeventsentriesandnumplayingeventswillbesettotheactualnumberofplayingeventsonexit.Inshort,ifnumplayingeventsonexit>numplayingeventsonentrythentheplayingeventsarraywasn'tlargeenoughandsomeeventswereunabletobeaddedtothearray.
SeeAlso
EventProject::getInfoEventSystem::getInfoFMOD_EVENT_WAVEBANKINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_SOUNDDEFINFOStructurecontaininginformationaboutasounddefinition.
Structure
typedefstruct{
char*name;
intnumentries;
constchar**entrynames;
FMOD_EVENT_SOUNDDEF_ENTRYTYPE*entrytypes;
}FMOD_EVENT_SOUNDDEFINFO;
Members
name
Thenameofthesounddefinition.
numentries
Thenumberofentriesinthesounddefinition.
entrynames
Thenamesoftheentriesinthesounddefinition(anarrayofsizenumentries).Notethatentrynames[i]willbenullifentrytypes[i]isnotFMOD_EVENT_SOUNDDEF_ENTRYTYPE_WAVETABLE.
entrytypes
Thetypesoftheentriesinthesounddefinition(anarrayofsizenumentries).
Remarks
Thisstructureispassedastheparam1argumentofallFMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEXcallbacks
ifFMOD_EVENT_INIT_DETAILED_SOUNDDEF_INFOwaspassedtoEventSystem::init.
SeeAlso
FMOD_EVENT_CALLBACKFMOD_EVENT_CALLBACKTYPEEventSystem::initFMOD_EVENT_INITFLAGSFMOD_EVENT_SOUNDDEF_ENTRYTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_SYSTEMINFOStructurecontainingrealtimeinformationaboutaneventsystem.
Structure
typedefstruct{
intnumevents;
intnuminstances;
intmaxwavebanks;
FMOD_EVENT_WAVEBANKINFO*wavebankinfo;
intnumplayingevents;
FMOD_EVENT**playingevents;
intnumloadsqueued[FMOD_EVENT_NONBLOCKING_THREAD_MAX];
}FMOD_EVENT_SYSTEMINFO;
Members
numevents
[out]Totalnumberofeventsinalleventgroupsinthiseventsystem.
numinstances
[out]Totalnumberofeventinstancesinalleventgroupsinthiseventsystem.
maxwavebanks
[in/out]Out,numberofwavebanksloadedbytheEventSystem.In.Maximumsizeofarrayofwavebankinfostructuressuppliedbyuser.Optional.
wavebankinfo
[in]PointertoarrayFMOD_EVENT_WAVEBANKINFOstructures(maxsizedefinedbymaxwavebanks).FMODwillfilltheseinwithdetailedinformationoneachwavebank.Optional.
numplayingevents
[in/out]Onentry,maximumnumberofentriesinplayingeventsarray.Onexit,
actualnumberofentriesinplayingeventsarray,orifplayingeventsisnull,thenitisjustthenumberofcurrentlyplayingevents.Optional.
playingevents
[in/out]Pointertoanarraythatwillbefilledwiththeeventhandlesofallplayingevents.Optional.Specify0ifnotneeded.Mustbeusedinconjunctionwithnumplayingevents.
numloadsqueued
[out]CurrentnumberofsoundbanksqueuedforloadingduetousingFMOD_EVENT_NONBLOCKINGflag.NotetherearemultplepossibleloadingthreadsdependingonwhattheprogrammerspecifiedwithEventGroup::loadEventData/getEvent/getEventByIndex.Addallqueuevaluestogetherfortotal.
Remarks
Onentry,numplayingeventsshouldbesettothenumberofelementsintheplayingeventsarray.Iftheactualnumberofplayingeventsisgreaterthannumplayingeventsthentheplayingeventsarraywillbefilledwithnumplayingeventsentriesandnumplayingeventswillbesettotheactualnumberofplayingeventsonexit.Inshort,ifnumplayingeventsonexit>numplayingeventsonentrythentheplayingeventsarraywasn'tlargeenoughandsomeeventswereunabletobeaddedtothearray.
SeeAlso
EventSystem::getInfoEventProject::getInfoFMOD_EVENT_WAVEBANKINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_WAVEBANKINFOStructurecontainingrealtimeinformationaboutawavebank.
Structure
typedefstruct{
charname[256];
intstreamrefcnt;
intsamplerefcnt;
intnumstreams;
intmaxstreams;
intstreamsinuse;
unsignedintstreammemory;
unsignedintsamplememory;
inttype;
}FMOD_EVENT_WAVEBANKINFO;
Members
name
[out]Nameofthiswavebank.
streamrefcnt
[out]Numberofstreamreferencestothiswavebankmadebyeventsinthiseventsystem.
samplerefcnt
[out]Numberofsamplereferencestothiswavebankmadebyeventsinthiseventsystem.
numstreams
[out]Numberoftimesthiswavebankhasbeenopenedforstreaming.
maxstreams
[out]Maximumnumberoftimesthiswavebankwillbeopenedforstreaming.
streamsinuse
[out]Numberofstreamscurrentlyinuse.
streammemory
[out]Amountofmemory(inbytes)usedbystreams.
samplememory
[out]Amountofmemory(inbytes)usedbysamples.
type
[out]0=streamfromdisk,1=loadintomemory,2=decompressintomemory.
SeeAlso
EventSystem::getInfoFMOD_EVENT_SYSTEMINFO
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MUSIC_ENTITYStructureusedtoholdinformationaboutmusicsystementites.
Structure
typedefstruct{
constchar*name;
FMOD_MUSIC_IDid;
}FMOD_MUSIC_ENTITY;
Members
*name
Thenameofthemusicentityasanullterminatedstring.
id
TheIDofthemusicentity.
SeeAlso
FMOD_MUSIC_ITERATOR
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MUSIC_INFOStructurecontainingrealtimeinformationaboutthemusicsystem.
Structure
typedefstruct{
FMOD_BOOLstarving;
FMOD_BOOLall_samples_loaded;
}FMOD_MUSIC_INFO;
Members
starving
[out]Trueifanystreamsinthemusicsystemarestarving.
all_samples_loaded
[out]Trueifallnon-streamingsamplesinthemusicsystemareloaded,falseotherwise.
SeeAlso
MusicSystem::getInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MUSIC_ITERATORStructureusedtoenumerateentitiesinthemusicsystem.
Structure
typedefstruct{
constFMOD_MUSIC_ENTITY*value;
constchar*filter;
}FMOD_MUSIC_ITERATOR;
Members
*value
Themusicentitytheiteratorpointsto.Anullvalueindicatesaninvaliditerator.
*filter
Thestringusedtofiltermusicentities.
Remarks
Themusicsystemprovidesmethodstoinitializeandadvanceiterators.Iteratormembersshouldneverneedtobesetmanually.
SeeAlso
FMOD_MUSIC_ENTITYMusicSystem::getCuesMusicSystem::getParameters
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MUSIC_SAMPLE_INFOStructurecontaininginformationaboutamusicsample,forusewithFMOD_MUSIC_CALLBACKTYPE_SEGMENT_CREATEandFMOD_MUSIC_CALLBACKTYPE_SEGMENT_RELEASE.
Structure
typedefstruct{
unsignedintsegment_id;
unsignedintindex;
constchar*filename;
}FMOD_MUSIC_SAMPLE_INFO;
Members
segment_id
TheIDoftheparentsegment.
index
Theindexofthesamplewithintheparentsegment.
filename
Thefilenameofthesample.Note:IfthesamplewasbuiltbyaversionofFMODDesignerbefore4.29.09,thisfieldwillbe0.
SeeAlso
FMOD_MUSIC_CALLBACKFMOD_MUSIC_CALLBACKTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MUSIC_SEGMENT_INFOStructurecontaininginformationaboutamusicsegment,forusewithFMOD_MUSIC_CALLBACKTYPE_CHANNEL_CREATEDandFMOD_MUSIC_CALLBACKTYPE_CHANNEL_DESTROYED.
Structure
typedefstruct{
unsignedintsegment_id;
unsignedinttheme_id;
}FMOD_MUSIC_SEGMENT_INFO;
Members
segment_id
TheIDofthesegment.
theme_id
TheIDoftheparenttheme.
SeeAlso
FMOD_MUSIC_CALLBACKFMOD_MUSIC_CALLBACKTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
DefinesEVENT_INITFLAGSEVENT_MEMBITSEVENT_MODEEVENT_STATE
FirelightTechnologiesFMODEx
FMOD_EVENT_INITFLAGSInitializationflags.UsethemwithEventSystem::initintheeventflagsparametertochangevariousbehaviour.
Definition
#defineFMOD_EVENT_INIT_NORMAL0x00000000
#defineFMOD_EVENT_INIT_USER_ASSETMANAGER0x00000001
#defineFMOD_EVENT_INIT_FAIL_ON_MAXSTREAMS0x00000002
#defineFMOD_EVENT_INIT_DONTUSENAMES0x00000004
#defineFMOD_EVENT_INIT_UPPERCASE_FILENAMES0x00000008
#defineFMOD_EVENT_INIT_LOWERCASE_FILENAMES0x00000080
#defineFMOD_EVENT_INIT_SEARCH_PLUGINS0x00000010
#defineFMOD_EVENT_INIT_USE_GUIDS0x00000020
#defineFMOD_EVENT_INIT_DETAILED_SOUNDDEF_INFO0x00000040
#defineFMOD_EVENT_INIT_RESETPARAMSTOMINIMUM0x00000100
#defineFMOD_EVENT_INIT_ELEVATION_AFFECTS_LISTENER_ANGLE0x00000200
#defineFMOD_EVENT_INIT_DONTUSELOWMEM0x00000400
Values
FMOD_EVENT_INIT_NORMAL
Allplatforms-Initializenormally
FMOD_EVENT_INIT_USER_ASSETMANAGER
Allplatforms-Allwavedataloading/freeingwillbereferredbacktotheprogrammerthroughtheFMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE/FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASEcallback
FMOD_EVENT_INIT_FAIL_ON_MAXSTREAMS
Allplatforms-Eventswillfailif"Maxstreams"wasreachedwhenplayingstreamedbanks,insteadofgoingvirtual.
FMOD_EVENT_INIT_DONTUSENAMES
Allplatforms-Allevent/eventgroup/eventparameter/eventcategory/eventreverbnameswillbediscardedonload.UsegetXXXByIndextoaccessthem.Thismaypotentiallysavealotofmemoryatruntime.
FMOD_EVENT_INIT_UPPERCASE_FILENAMES
Allplatforms-AllFSBfilenameswillbetranslatedtouppercasebeforebeingused.
FMOD_EVENT_INIT_LOWERCASE_FILENAMES
Allplatforms-AllFSBfilenameswillbetranslatedtolowercasebeforebeingused.
FMOD_EVENT_INIT_SEARCH_PLUGINS
Allplatforms-Searchthecurrentdirectoryfordsp/codecpluginsonEventSystem::init.
FMOD_EVENT_INIT_USE_GUIDS
Allplatforms-BuildaneventGUIDtablewhenloadingFEVssothatEventSystem::getEventByGUIDcanbeused.
FMOD_EVENT_INIT_DETAILED_SOUNDDEF_INFO
Allplatforms-PassanFMOD_EVENT_SOUNDDEFINFOstructtoFMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEXcallbacksratherthanjustthesounddefinitionname(usesmorememoryforsounddefinitionwaveformnames).
FMOD_EVENT_INIT_RESETPARAMSTOMINIMUM
Allplatforms-ResetparameterstominimumvaluewhengettinganeventinstanceinsteadofusingtheINFO_ONLYevent'svalues.
FMOD_EVENT_INIT_ELEVATION_AFFECTS_LISTENER_ANGLE
Allplatforms-Thelistenerangleeventparameterswillbeaffectedbyelevation,andnotjusthorizontalcomponents.
FMOD_EVENT_INIT_DONTUSELOWMEM
Allplatforms-InstructtheeventsystemtoNOTuseFMOD_LOWMEMwhenitopens.FSBfiles.Specifythisflagifyouneedaccesstothenamesofindividualsubsoundsinloaded.FSBfiles.Specifyingthisflagwillmaketheeventsystemusemorememory.
SeeAlso
EventSystem::initEventSystem::getEventByGUIDFMOD_EVENT_SOUNDDEFINFOFMOD_EVENT_CALLBACKTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_MEMBITSBitfieldusedtorequestspecificmemoryusageinformationfromthegetMemoryInfofunctionofeverypublicFMODEventSystemclass.Usewiththe"event_memorybits"parameterofgetMemoryInfotogetinformationonFMODEventSystemmemoryusage.EverypublicFMODEventSystemclasshasagetMemoryInfofunctionwhichcanbeusedtogetdetailedinformationonwhatmemoryresourcesareassociatedwiththeobjectinquestion.TheFMOD_EVENT_MEMBITSdefinescanbeOR'dtogethertospecifypreciselywhatmemoryusageyou'dliketogetinformationon.SeeEventSystem::getMemoryInfoforanexample.
Definition
#defineFMOD_EVENT_MEMBITS_EVENTSYSTEM0x00000001
#defineFMOD_EVENT_MEMBITS_MUSICSYSTEM0x00000002
#defineFMOD_EVENT_MEMBITS_FEV0x00000004
#defineFMOD_EVENT_MEMBITS_MEMORYFSB0x00000008
#defineFMOD_EVENT_MEMBITS_EVENTPROJECT0x00000010
#defineFMOD_EVENT_MEMBITS_EVENTGROUPI0x00000020
#defineFMOD_EVENT_MEMBITS_SOUNDBANKCLASS0x00000040
#defineFMOD_EVENT_MEMBITS_SOUNDBANKLIST0x00000080
#defineFMOD_EVENT_MEMBITS_STREAMINSTANCE0x00000100
#defineFMOD_EVENT_MEMBITS_SOUNDDEFCLASS0x00000200
#defineFMOD_EVENT_MEMBITS_SOUNDDEFDEFCLASS0x00000400
#defineFMOD_EVENT_MEMBITS_SOUNDDEFPOOL0x00000800
#defineFMOD_EVENT_MEMBITS_REVERBDEF0x00001000
#defineFMOD_EVENT_MEMBITS_EVENTREVERB0x00002000
#defineFMOD_EVENT_MEMBITS_USERPROPERTY0x00004000
#defineFMOD_EVENT_MEMBITS_EVENTINSTANCE0x00008000
#defineFMOD_EVENT_MEMBITS_EVENTINSTANCE_COMPLEX0x00010000
#defineFMOD_EVENT_MEMBITS_EVENTINSTANCE_SIMPLE0x00020000
#defineFMOD_EVENT_MEMBITS_EVENTINSTANCE_LAYER0x00040000
#defineFMOD_EVENT_MEMBITS_EVENTINSTANCE_SOUND0x00080000
#defineFMOD_EVENT_MEMBITS_EVENTENVELOPE0x00100000
#defineFMOD_EVENT_MEMBITS_EVENTENVELOPEDEF0x00200000
#defineFMOD_EVENT_MEMBITS_EVENTPARAMETER0x00400000
#defineFMOD_EVENT_MEMBITS_EVENTCATEGORY0x00800000
#defineFMOD_EVENT_MEMBITS_EVENTENVELOPEPOINT0x01000000
#defineFMOD_EVENT_MEMBITS_EVENTINSTANCEPOOL0x02000000
#defineFMOD_EVENT_MEMBITS_ALL0xffffffff
#defineFMOD_EVENT_MEMBITS_EVENTINSTANCE_GROUP(FMOD_EVENT_MEMBITS_EVENTINSTANCE|FMOD_EVENT_MEMBITS_EVENTINSTANCE_COMPLEX|FMOD_EVENT_MEMBITS_EVENTINSTANCE_SIMPLE|FMOD_EVENT_MEMBITS_EVENTINSTANCE_LAYER|FMOD_EVENT_MEMBITS_EVENTINSTANCE_SOUND)
#defineFMOD_EVENT_MEMBITS_SOUNDDEF_GROUP(FMOD_EVENT_MEMBITS_SOUNDDEFCLASS|FMOD_EVENT_MEMBITS_SOUNDDEFDEFCLASS|FMOD_EVENT_MEMBITS_SOUNDDEFPOOL)
Values
FMOD_EVENT_MEMBITS_EVENTSYSTEM
EventSystemandvariousinternals
FMOD_EVENT_MEMBITS_MUSICSYSTEM
MusicSystemandvariousinternals
FMOD_EVENT_MEMBITS_FEV
Definitionofobjectscontainedinallloadedprojectse.g.events,groups,categories
FMOD_EVENT_MEMBITS_MEMORYFSB
DataloadedwithpreloadFSB
FMOD_EVENT_MEMBITS_EVENTPROJECT
EventProjectobjectsandinternals
FMOD_EVENT_MEMBITS_EVENTGROUPI
EventGroupobjectsandinternals
FMOD_EVENT_MEMBITS_SOUNDBANKCLASS
Objectsusedtomanagewavebanks
FMOD_EVENT_MEMBITS_SOUNDBANKLIST
Datausedtomanagelistsofwavebankusage
FMOD_EVENT_MEMBITS_STREAMINSTANCE
Streamobjectsandinternals
FMOD_EVENT_MEMBITS_SOUNDDEFCLASS
Sounddefinitionobjects
FMOD_EVENT_MEMBITS_SOUNDDEFDEFCLASS
Sounddefinitionstaticdataobjects
FMOD_EVENT_MEMBITS_SOUNDDEFPOOL
Sounddefinitionpooldata
FMOD_EVENT_MEMBITS_REVERBDEF
Reverbdefinitionobjects
FMOD_EVENT_MEMBITS_EVENTREVERB
Reverbobjects
FMOD_EVENT_MEMBITS_USERPROPERTY
Userpropertyobjects
FMOD_EVENT_MEMBITS_EVENTINSTANCE
Eventinstancebaseobjects
FMOD_EVENT_MEMBITS_EVENTINSTANCE_COMPLEX
Complexeventinstanceobjects
FMOD_EVENT_MEMBITS_EVENTINSTANCE_SIMPLE
Simpleeventinstanceobjects
FMOD_EVENT_MEMBITS_EVENTINSTANCE_LAYER
Eventlayerinstanceobjects
FMOD_EVENT_MEMBITS_EVENTINSTANCE_SOUND
Eventsoundinstanceobjects
FMOD_EVENT_MEMBITS_EVENTENVELOPE
Eventenvelopeobjects
FMOD_EVENT_MEMBITS_EVENTENVELOPEDEF
Eventenvelopedefinitionobjects
FMOD_EVENT_MEMBITS_EVENTPARAMETER
Eventparameterobjects
FMOD_EVENT_MEMBITS_EVENTCATEGORY
Eventcategoryobjects
FMOD_EVENT_MEMBITS_EVENTENVELOPEPOINT
Eventenvelopepointobject+s
FMOD_EVENT_MEMBITS_EVENTINSTANCEPOOL
Eventinstancepooldata
FMOD_EVENT_MEMBITS_ALL
AllmemoryusedbyFMODEventSystem
FMOD_EVENT_MEMBITS_EVENTINSTANCE_GROUP
FMOD_EVENT_MEMBITS_SOUNDDEF_GROUP
SeeAlso
FMOD_MEMBITSSystem::getMemoryInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_MODEEventdataloadingbitfields.BitwiseORthemtogetherforcontrollinghoweventdataisloaded.FMOD_EVENT_NONBLOCKING_THREAD0-4.ThisflagextendsFMOD_EVENT_NONBLOCKINGtoallowmultipleasynchronousloadstohappenondifferentthreadsatthesametime.FMOD_EVENT_NONBLOCKINGbyitselfwillalwaysexecuteonthread0bydefault.Upto5simultaneousthreadsforloadingatoncearesupported.Only1flagshouldbespecifiedatatime.IfmultipleflagsarespecifiedanFMOD_ERR_INVALID_PARAMerrorwillbereturned.FMOD_EVENT_NONBLOCKING_THREAD0-4canbespecifiedwithouttheFMOD_EVENT_NONBLOCKINGflagbeingused(itautomaticallyincludesit)
Definition
#defineFMOD_EVENT_DEFAULT0x00000000
#defineFMOD_EVENT_NONBLOCKING0x00000001
#defineFMOD_EVENT_ERROR_ON_DISKACCESS0x00000002
#defineFMOD_EVENT_INFOONLY0x00000004
#defineFMOD_EVENT_USERDSP0x00000008
#defineFMOD_EVENT_NONBLOCKING_THREAD0(FMOD_EVENT_NONBLOCKING)
#defineFMOD_EVENT_NONBLOCKING_THREAD1(FMOD_EVENT_NONBLOCKING|0x00010000)
#defineFMOD_EVENT_NONBLOCKING_THREAD2(FMOD_EVENT_NONBLOCKING|0x00020000)
#defineFMOD_EVENT_NONBLOCKING_THREAD3(FMOD_EVENT_NONBLOCKING|0x00040000)
#defineFMOD_EVENT_NONBLOCKING_THREAD4(FMOD_EVENT_NONBLOCKING|0x00080000)
#defineFMOD_EVENT_NONBLOCKING_THREAD_MAX5
Values
FMOD_EVENT_DEFAULT
FMOD_EVENT_DEFAULTspecifiesdefaultloadingbehaviouri.e.eventdataforthewholegroupisNOTcachedandthefunctionthatinitiatedtheloadingprocesswillblockuntilloadingiscomplete.
FMOD_EVENT_NONBLOCKING
Forloadingeventdataasynchronously.FMODwilluseathreadtoloadthedata.UseEvent::getStatetofindoutwhenloadingiscomplete.
FMOD_EVENT_ERROR_ON_DISKACCESS
ForEventGroup::getEvent/EventGroup::getEventByIndex.IfEventGroup::loadEventDatahasaccidentlybeenforgottenthisflagwillreturnanFMOD_ERR_FILE_UNWANTEDifthegetEventfunctiontriestoloaddata.
FMOD_EVENT_INFOONLY
ForEventGroup::getEvent/EventGroup::getEventByIndex.Don'tallocateinstancesorloaddata,justgetahandletoallowusertogetinformationfromtheevent.
FMOD_EVENT_USERDSP
ForEventGroup::getEvent/EventGroup::getEventByIndex.TellsFMODthatyouplantoaddyourownDSPeffectstothisevent'sChannelGroupatruntime.Omittingthisflagwillyieldasmallmemorygain.
FMOD_EVENT_NONBLOCKING_THREAD0
FMOD_EVENT_NONBLOCKING,executeonthread0.Seeremarks.(default)
FMOD_EVENT_NONBLOCKING_THREAD1
FMOD_EVENT_NONBLOCKING,executeonthread1.Seeremarks.
FMOD_EVENT_NONBLOCKING_THREAD2
FMOD_EVENT_NONBLOCKING,executeonthread2.Seeremarks.
FMOD_EVENT_NONBLOCKING_THREAD3
FMOD_EVENT_NONBLOCKING,executeonthread3.Seeremarks.
FMOD_EVENT_NONBLOCKING_THREAD4
FMOD_EVENT_NONBLOCKING,executeonthread4.Seeremarks.
FMOD_EVENT_NONBLOCKING_THREAD_MAX
SeeAlso
EventGroup::loadEventDataEventGroup::getEventEventGroup::getEventByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_STATEThesevaluesdescribewhatstateaneventisin.Theflagsbelowcanbecombinedtosetmultiplestatesatonce.UsebitwiseANDoperationstotestforthese.AnexampleofacombinedflagsetwouldbeFMOD_EVENT_STATE_READY|FMOD_EVENT_STATE_PLAYING.
Definition
#defineFMOD_EVENT_STATE_READY0x00000001
#defineFMOD_EVENT_STATE_LOADING0x00000002
#defineFMOD_EVENT_STATE_ERROR0x00000004
#defineFMOD_EVENT_STATE_PLAYING0x00000008
#defineFMOD_EVENT_STATE_CHANNELSACTIVE0x00000010
#defineFMOD_EVENT_STATE_INFOONLY0x00000020
#defineFMOD_EVENT_STATE_STARVING0x00000040
#defineFMOD_EVENT_STATE_NEEDSTOLOAD0x00000080
Values
FMOD_EVENT_STATE_READY
Eventisreadytoplay.
FMOD_EVENT_STATE_LOADING
Loadinginprogress.
FMOD_EVENT_STATE_ERROR
Failedtoopen-filenotfound,outofmemoryetc.SeereturnvalueofEvent::getStateforwhathappened.
FMOD_EVENT_STATE_PLAYING
Eventhasbeenstarted.Thiswillstillbetrueeveniftherearenosoundsactive.Event::stopmustbecalledortheeventmuststopitselfusinga'oneshotandstopevent'parametermode.
FMOD_EVENT_STATE_CHANNELSACTIVE
Eventhasactivevoices.Usethisifyouwanttodetectifsoundsareplayingintheeventornot.
FMOD_EVENT_STATE_INFOONLY
EventwasloadedwiththeFMOD_EVENT_INFOONLYflag.
FMOD_EVENT_STATE_STARVING
Eventisstreamingbutnotbeingfeddataintime,somaybestuttering.
FMOD_EVENT_STATE_NEEDSTOLOAD
Eventstillneedstoloadwavebankdata.
SeeAlso
Event::getStateFMOD_EVENT_MODE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
EnumerationsFMOD_EVENTQUEUE_CALLBACKTYPEFMOD_EVENT_CALLBACKTYPEFMOD_EVENT_PITCHUNITSFMOD_EVENT_PROPERTYFMOD_EVENT_RESOURCEFMOD_EVENT_SOUNDDEF_ENTRYTYPEFMOD_MUSIC_CALLBACKTYPE
FirelightTechnologiesFMODEx
FMOD_EVENTPROPERTY_TYPEEventpropertytypes.
Enumeration
typedefenum{
FMOD_EVENTPROPERTY_TYPE_INT,
FMOD_EVENTPROPERTY_TYPE_FLOAT,
FMOD_EVENTPROPERTY_TYPE_STRING
}FMOD_EVENTPROPERTY_TYPE;
Values
FMOD_EVENTPROPERTY_TYPE_INT
Propertyisanint,unsignedintorothertypeofequivalentsizeee.g.FMOD_MODE.
FMOD_EVENTPROPERTY_TYPE_FLOAT
Propertyisafloat.
FMOD_EVENTPROPERTY_TYPE_STRING
Propertyisachar*.
SeeAlso
Event::getPropertyByIndexEvent::getPropertyInfo
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENTQUEUE_CALLBACKTYPEThesecallbacktypesareusedwithFMOD_EVENTQUEUE_CALLBACK.
Enumeration
typedefenum{
FMOD_EVENTQUEUE_CALLBACKTYPE_PREPARE,
FMOD_EVENTQUEUE_CALLBACKTYPE_ABOUTTOPLAY,
FMOD_EVENTQUEUE_CALLBACKTYPE_FINISHED,
FMOD_EVENTQUEUE_CALLBACKTYPE_EXPIRED
}FMOD_EVENTQUEUE_CALLBACKTYPE;
Values
FMOD_EVENTQUEUE_CALLBACKTYPE_PREPARE
Calledwhenanentryisbeingpreparedforplayback
FMOD_EVENTQUEUE_CALLBACKTYPE_ABOUTTOPLAY
Calledwhenanentryisabouttoplay
FMOD_EVENTQUEUE_CALLBACKTYPE_FINISHED
Calledwhenanentryhasfinishedplaying
FMOD_EVENTQUEUE_CALLBACKTYPE_EXPIRED
Calledwhenanentryhasexpiredbeforebeingplayed.SeeEventQueueEntry::setExpiryTime
Remarks
Note!CurrentlytheusermustcallEventSystem::updateforthesecallbackstotrigger!
SeeAlso
EventQueue::setCallbackFMOD_EVENTQUEUE_CALLBACKEventSystem::update
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_CALLBACKTYPEThesecallbacktypesareusedwithFMOD_EVENT_CALLBACK.
Enumeration
typedefenum{
FMOD_EVENT_CALLBACKTYPE_SYNCPOINT,
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START,
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END,
FMOD_EVENT_CALLBACKTYPE_STOLEN,
FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED,
FMOD_EVENT_CALLBACKTYPE_NET_MODIFIED,
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE,
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE,
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO,
FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED,
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEX,
FMOD_EVENT_CALLBACKTYPE_OCCLUSION
}FMOD_EVENT_CALLBACKTYPE;
Values
FMOD_EVENT_CALLBACKTYPE_SYNCPOINT
Calledwhenasyncpointisencountered.Canbefromwavfilemarkers.
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START
Calledwhenasounddefinitioninsideaneventistriggered.
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
Calledwhenasounddefinitioninsideaneventendsorisstopped.
FMOD_EVENT_CALLBACKTYPE_STOLEN
CalledwhenagetEventXXXcallstealsaneventinstancethatisinuse.
FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED
Calledwhenaneventisstoppedforanyreason.
FMOD_EVENT_CALLBACKTYPE_NET_MODIFIED
Calledwhenapropertyoftheeventhasbeenmodifiedbyanetwork-connectedhost.
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE
Calledwhenaprogrammersounddefinitionentryisloaded.
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE
Calledwhenaprogrammersounddefinitionentryisunloaded.
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO
Calledwhenasounddefinitionentryisloaded.
FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED
Calledwhenaneventisstarted.
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEX
Calledwhenasounddefinitionentryneedstobechosenfroma"ProgrammerSelected"sounddefinition.
FMOD_EVENT_CALLBACKTYPE_OCCLUSION
Calledwhenanevent'schannelisoccludedwiththegeometryengine.
Remarks
Note!CurrentlytheusermustcallEventSystem::updateforthesecallbackstotrigger!
Whentheeventcallbackiscalled,'param1'and'param2'meandifferentthingsdependingonthetypeofcallback.Hereisanexplanationofwhatthese
parametersmeaninwhatcontext:
FMOD_EVENT_CALLBACKTYPE_SYNCPOINT
param1=(char*)nameofsyncpointparam2=(unsignedint)PCMoffsetofsyncpoint.
AnFMOD_EVENT_CALLBACKTYPE_SYNCPOINTcallbackisgeneratedfrom'markers'embeddedin.wavfiles.Thesecanbecreatedbyplacing'markers'intheoriginalsourcewavsusingatoolsuchasSoundForgeorCooledit.Thewavsarethencompiledinto.FSBfileswhencompilingtheaudiodatausingtheFMODdesignertool.Callbackswillbeautomaticallygeneratedatthecorrectplaceinthetimelinewhenthesemarkersareencounteredwhichmakesitusefulforsynchronization,lipsyncingetc.
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START
param1=(char*)nameofsounddefinitionbeingstartedparam2=(int)indexofwavebeingstartedinsidesounddefinition(ieformultiwavesounddefinitions)
AnFMOD_EVENT_CALLBACKTYPE_SOUNDDEF_STARTcallbackisgeneratedeachtimeasounddefinitionisplayedinanevent.Thishappenseverytimeasounddefinitionstartsduetotheeventparameterenteringtheregionspecifiedinthelayercreatedbythesounddesigner.ThisalsohappenswhensoundsarerandomlyrespawnedusingtherandomrespawnfeatureinthesounddefinitionpropertiesinFMODdesigner.
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
param1=(char*)nameofsounddefinitionbeingstoppedparam2=(int)indexofwavebeingstoppedinsidesounddefinition(ieformultiwavesounddefinitions)
AnFMOD_EVENT_CALLBACKTYPE_SOUNDDEF_ENDcallbackisgeneratedwhenaone-shotsounddefinitioninsideaneventends,orwhenaloopingsounddefinitionstopsduetotheeventparameterleavingtheregionspecifiedinthelayercreatedbythesounddesigner.
FMOD_EVENT_CALLBACKTYPE_STOLEN
param1=0param2=0
AnFMOD_EVENT_CALLBACKTYPE_STOLENcallbackisgeneratedwhenagetEventXXXcallneedstostealaneventinstancethatisinusebecausetheevent's"Maxplaybacks"hasbeenexceeded.Thiscallbackiscalledbeforetheeventisstolenandbeforetheeventisstopped(ifitisplaying).AnFMOD_EVENT_CALLBACKTYPE_EVENTFINISHEDcallbackwillbegeneratedwhenthestoleneventisstoppedi.e.aftertheFMOD_EVENT_CALLBACKTYPE_STOLEN.IfthecallbackfunctionreturnsFMOD_ERR_EVENT_FAILED,theeventwillnotbestolen,andthereturnedvaluewillbepassedbackasthereturnvalueofthegetEventXXXcallthattriggeredthestealattempt.
FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED
param1=0param2=0
AnFMOD_EVENT_CALLBACKTYPE_EVENTFINISHEDcallbackisgeneratedwheneveraneventisstoppedforanyreasonincludingwhentheusercallsEvent::stop().
FMOD_EVENT_CALLBACKTYPE_NET_MODIFIED
param1=(FMOD_EVENT_PROPERTY)whichpropertywasmodifiedparam2=(float)thenewpropertyvalue
AnFMOD_EVENT_CALLBACKTYPE_NET_MODIFIEDcallbackisgeneratedwhensomeonehasconnectedtoyourrunningapplicationwithFMODDesignerandchangedapropertywithinthisevent,forexamplevolumeorpitch.
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE
param1=(char*)nameofsounddefinitionparam2[in]=(int*)pointertoindexofsounddefinitionentryparam2[out]=(FMOD::Sound**)pointertoavalidlowerlevelAPIFMODSoundhandle
AnFMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATEcallbackisgeneratedwhena"programmer"soundneedstobeloaded.
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE
param1=(char*)nameofsounddefinitionparam2=(FMOD::Sound*)theFMODsoundhandlethatwaspreviouslycreatedinFMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE
AnFMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASEcallbackisgeneratedwhena"programmer"soundneedstobeunloaded.
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO
param1=(char*)nameofsounddefinitionparam2=(FMOD::Sound*)theFMODsoundhandlethatFMODwilluseforthissounddefinition
AnFMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFOcallbackisgeneratedwhenasounddefinitionisloaded.Itcanbeusedtofindinformationaboutthespecificsoundthatwillbeplayed.
FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED
param1=0param2=0
AnFMOD_EVENT_CALLBACKTYPE_EVENTSTARTEDcallbackisgeneratedwheneveraneventisstarted.Thiscallbackwillbecalledbeforeanysoundsintheeventhavebeguntoplay.
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEX
param1=(char*)nameofsounddefinitionifFMOD_EVENT_INIT_DETAILED_SOUNDDEF_INFOwasnotspecifiedparam1=(FMOD_EVENT_SOUNDDEFINFO*)sounddefinitioninfostructifFMOD_EVENT_INIT_DETAILED_SOUNDDEF_INFOwasspecifiedparam2[in]=(int*)pointertonumberofentriesinthissounddefinition*param2[out]=(int)indexofsounddefinitionentrytoselect
AnFMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEXcallbackisgeneratedwhenasounddefinitionentryneedstobechosenfroma"ProgrammerSelected"sounddefinition.
FMOD_EVENT_CALLBACKTYPE_OCCLUSION
param1=(float*)pointertoafloatingpointdirectvaluethatcanbereadandmodifiedafterthegeometryenginehascalculateditforthisevent'schannel.param2=(float*)pointertoafloatingpointreverbvaluethatcanbereadandmodifiedafterthegeometryenginehascalculateditforthisevent'schannel.
AnFMOD_EVENT_CALLBACKTYPE_OCCLUSIONcallbackisgeneratedwheneveranchannelhasitsocclusionupdatedviathegeometrysystem.
SeeAlso
Event::setCallbackFMOD_EVENT_CALLBACKFMOD_EVENT_SOUNDDEFINFOFMOD_EVENT_INITFLAGSEventSystem::update
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_PITCHUNITSPitchunitsforEvent::setPitchandEventCategory::setPitch.
Enumeration
typedefenum{
FMOD_EVENT_PITCHUNITS_RAW,
FMOD_EVENT_PITCHUNITS_OCTAVES,
FMOD_EVENT_PITCHUNITS_SEMITONES,
FMOD_EVENT_PITCHUNITS_TONES
}FMOD_EVENT_PITCHUNITS;
Values
FMOD_EVENT_PITCHUNITS_RAW
Pitchisspecifiedinrawunderlyingunits.
FMOD_EVENT_PITCHUNITS_OCTAVES
Pitchisspecifiedinunitsofoctaves.
FMOD_EVENT_PITCHUNITS_SEMITONES
Pitchisspecifiedinunitsofsemitones.
FMOD_EVENT_PITCHUNITS_TONES
Pitchisspecifiedinunitsoftones.
SeeAlso
Event::setPitchEventCategory::setPitch
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_PROPERTYPropertyindicesforEvent::getPropertyByIndex.
Enumeration
typedefenum{
FMOD_EVENTPROPERTY_NAME,
FMOD_EVENTPROPERTY_VOLUME,
FMOD_EVENTPROPERTY_VOLUMERANDOMIZATION,
FMOD_EVENTPROPERTY_PITCH,
FMOD_EVENTPROPERTY_PITCH_OCTAVES,
FMOD_EVENTPROPERTY_PITCH_SEMITONES,
FMOD_EVENTPROPERTY_PITCH_TONES,
FMOD_EVENTPROPERTY_PITCHRANDOMIZATION,
FMOD_EVENTPROPERTY_PITCHRANDOMIZATION_OCTAVES,
FMOD_EVENTPROPERTY_PITCHRANDOMIZATION_SEMITONES,
FMOD_EVENTPROPERTY_PITCHRANDOMIZATION_TONES,
FMOD_EVENTPROPERTY_PRIORITY,
FMOD_EVENTPROPERTY_MAX_PLAYBACKS,
FMOD_EVENTPROPERTY_MAX_PLAYBACKS_BEHAVIOR,
FMOD_EVENTPROPERTY_MODE,
FMOD_EVENTPROPERTY_3D_IGNORE_GEOMETRY,
FMOD_EVENTPROPERTY_3D_ROLLOFF,
FMOD_EVENTPROPERTY_3D_MINDISTANCE,
FMOD_EVENTPROPERTY_3D_MAXDISTANCE,
FMOD_EVENTPROPERTY_3D_POSITION,
FMOD_EVENTPROPERTY_3D_CONEINSIDEANGLE,
FMOD_EVENTPROPERTY_3D_CONEOUTSIDEANGLE,
FMOD_EVENTPROPERTY_3D_CONEOUTSIDEVOLUME,
FMOD_EVENTPROPERTY_3D_DOPPLERSCALE,
FMOD_EVENTPROPERTY_3D_SPEAKERSPREAD,
FMOD_EVENTPROPERTY_3D_PANLEVEL,
FMOD_EVENTPROPERTY_SPEAKER_L,
FMOD_EVENTPROPERTY_SPEAKER_C,
FMOD_EVENTPROPERTY_SPEAKER_R,
FMOD_EVENTPROPERTY_SPEAKER_LS,
FMOD_EVENTPROPERTY_SPEAKER_RS,
FMOD_EVENTPROPERTY_SPEAKER_LR,
FMOD_EVENTPROPERTY_SPEAKER_RR,
FMOD_EVENTPROPERTY_SPEAKER_LFE,
FMOD_EVENTPROPERTY_REVERBWETLEVEL,
FMOD_EVENTPROPERTY_ONESHOT,
FMOD_EVENTPROPERTY_FADEIN,
FMOD_EVENTPROPERTY_FADEOUT,
FMOD_EVENTPROPERTY_REVERBDRYLEVEL,
FMOD_EVENTPROPERTY_TIMEOFFSET,
FMOD_EVENTPROPERTY_SPAWNINTENSITY,
FMOD_EVENTPROPERTY_SPAWNINTENSITY_RANDOMIZATION,
FMOD_EVENTPROPERTY_WII_CONTROLLERSPEAKERS,
FMOD_EVENTPROPERTY_3D_POSRANDOMIZATION_MIN,
FMOD_EVENTPROPERTY_3D_POSRANDOMIZATION_MAX,
FMOD_EVENTPROPERTY_EVENTTYPE,
FMOD_EVENTPROPERTY_STEAL_PRIORITY,
FMOD_EVENTPROPERTY_EFFECTS_AFFECT_REVERB,
FMOD_EVENTPROPERTY_WILL_TERMINATE,
FMOD_EVENTPROPERTY_DSPCLOCKSTART_HI,
FMOD_EVENTPROPERTY_DSPCLOCKSTART_LO,
FMOD_EVENTPROPERTY_3D_AUTO_DISTANCE_FILTERING,
FMOD_EVENTPROPERTY_3D_AUTO_DISTANCE_CENTER_FREQ,
FMOD_EVENTPROPERTY_USER_BASE
}FMOD_EVENT_PROPERTY;
Values
FMOD_EVENTPROPERTY_NAME
Type:char*-(Readonly)Nameofevent.
FMOD_EVENTPROPERTY_VOLUME
Type:float-Relativevolumeofevent.
FMOD_EVENTPROPERTY_VOLUMERANDOMIZATION
Type:float-Randomdeviationinvolumeofevent.
FMOD_EVENTPROPERTY_PITCH
Type:float-Relativepitchofeventinrawunderlyingunits.
FMOD_EVENTPROPERTY_PITCH_OCTAVES
Type:float-Relativepitchofeventinoctaves.
FMOD_EVENTPROPERTY_PITCH_SEMITONES
Type:float-Relativepitchofeventinsemitones.
FMOD_EVENTPROPERTY_PITCH_TONES
Type:float-Relativepitchofeventintones.
FMOD_EVENTPROPERTY_PITCHRANDOMIZATION
Type:float-Randomdeviationinpitchofeventinrawunderlyingunits.
FMOD_EVENTPROPERTY_PITCHRANDOMIZATION_OCTAVES
Type:float-Randomdeviationinpitchofeventinoctaves.
FMOD_EVENTPROPERTY_PITCHRANDOMIZATION_SEMITONES
Type:float-Randomdeviationinpitchofeventinsemitones.
FMOD_EVENTPROPERTY_PITCHRANDOMIZATION_TONES
Type:float-Randomdeviationinpitchofeventintones.
FMOD_EVENTPROPERTY_PRIORITY
Type:int-Playbackpriorityofevent.
FMOD_EVENTPROPERTY_MAX_PLAYBACKS
Type:int-(Readonly)Maximumsimultaneousplaybacksofevent.
FMOD_EVENTPROPERTY_MAX_PLAYBACKS_BEHAVIOR
Type:int-1=stealoldest,2=stealnewest,3=stealquietest,4=justfail,5=justfailifquietest.
FMOD_EVENTPROPERTY_MODE
Type:FMOD_MODE-EitherFMOD_3DorFMOD_2D.
FMOD_EVENTPROPERTY_3D_IGNORE_GEOMETRY
Type:int-Ignoregeometryforthatevent.1=yes,0=no.
FMOD_EVENTPROPERTY_3D_ROLLOFF
Type:FMOD_MODE-EitherFMOD_3D_INVERSEROLLOFF,FMOD_3D_LINEARROLLOFF,FMOD_3D_LINEARSQUAREROLLOFF,ornoneforcustomrolloff.
FMOD_EVENTPROPERTY_3D_MINDISTANCE
Type:float-Minimum3ddistanceofevent.
FMOD_EVENTPROPERTY_3D_MAXDISTANCE
Type:float-Maximum3ddistanceofevent.MeansdifferentthingsdependingonEVENTPROPERTY_3D_ROLLOFF.Ifeventhascustomrolloff,settingFMOD_EVENTPROPERTY_3D_MAXDISTANCEwillscaletherangeofalldistanceparametersinthisevente.g.setthispropertyto2.0todoubletherangeofalldistanceparameters,setitto0.5tohalvetherangeofalldistanceparameters.
FMOD_EVENTPROPERTY_3D_POSITION
Type:FMOD_MODE-EitherFMOD_3D_HEADRELATIVEorFMOD_3D_WORLDRELATIVE.
FMOD_EVENTPROPERTY_3D_CONEINSIDEANGLE
Type:float-Eventconeinsideangle.0to360.
FMOD_EVENTPROPERTY_3D_CONEOUTSIDEANGLE
Type:float-Eventconeoutsideangle.0to360.
FMOD_EVENTPROPERTY_3D_CONEOUTSIDEVOLUME
Type:float-Eventconeoutsidevolume.0to1.0.
FMOD_EVENTPROPERTY_3D_DOPPLERSCALE
Type:float-Dopplerscalewhere0=nodoppler,1.0=normaldoppler,2.0=doubledoppleretc.
FMOD_EVENTPROPERTY_3D_SPEAKERSPREAD
Type:float-Angleofspreadforstereo/mutlichannelsource.0to360.
FMOD_EVENTPROPERTY_3D_PANLEVEL
Type:float-0=soundpansaccordingtospeakerlevels,1=soundpansaccordingto3Dposition.
FMOD_EVENTPROPERTY_SPEAKER_L
Type:float-2Deventvolumeforfrontleftspeaker.
FMOD_EVENTPROPERTY_SPEAKER_C
Type:float-2Deventvolumeforfrontcenterspeaker.
FMOD_EVENTPROPERTY_SPEAKER_R
Type:float-2Deventvolumeforfrontrightspeaker.
FMOD_EVENTPROPERTY_SPEAKER_LS
Type:float-2Deventvolumeforsideleftspeaker.
FMOD_EVENTPROPERTY_SPEAKER_RS
Type:float-2Deventvolumeforsiderightspeaker.
FMOD_EVENTPROPERTY_SPEAKER_LR
Type:float-2Deventvolumeforbackleftspeaker.
FMOD_EVENTPROPERTY_SPEAKER_RR
Type:float-2Deventvolumeforbackrightspeaker.
FMOD_EVENTPROPERTY_SPEAKER_LFE
Type:float-2Deventvolumeforlowfrequencyspeaker.
FMOD_EVENTPROPERTY_REVERBWETLEVEL
Type:float-Reverbgainforthiseventwhere0=fullreverb,-60=noreverb.
FMOD_EVENTPROPERTY_ONESHOT
Type:int-Oneshotevent-stopswhennochannelsplaying.1=yes,it'saoneshot0=no.it'snotaoneshot.
FMOD_EVENTPROPERTY_FADEIN
Type:int-Timeinmillisecondsoverwhichtofadethiseventinwhenprogrammerstartsit.0=nofadein.Cannotbesetwhiletheeventisplaying.
FMOD_EVENTPROPERTY_FADEOUT
Type:int-Timeinmillisecondsoverwhichtofadethiseventoutwhenprogrammerstopsit.0=nofadeout.Cannotbesetwhiletheeventisplaying.
FMOD_EVENTPROPERTY_REVERBDRYLEVEL
Type:float-Dryreverbgainforthiseventwhere0=fulldry,-60=nodry.
FMOD_EVENTPROPERTY_TIMEOFFSET
Type:float-Timeoffsetofsoundstartinseconds.
FMOD_EVENTPROPERTY_SPAWNINTENSITY
Type:float-Multiplierforspawnfrequencyofallsoundsinthisevent.
FMOD_EVENTPROPERTY_SPAWNINTENSITY_RANDOMIZATION
Type:float-Randomdeviationinspawnintensityofevent.
FMOD_EVENTPROPERTY_WII_CONTROLLERSPEAKERS
Type:int-Wii/WiiUonly.UseFMOD_WII_CONTROLLERfromfmodwii.horFMOD_WIIU_CONTROLLERfromfmodwiiu.htosetwhichWiiControllerSpeaker(s)toplaythiseventon.
FMOD_EVENTPROPERTY_3D_POSRANDOMIZATION_MIN
Type:unsignedint-Minimumradiusofrandomdeviationinthe3Dpositionofevent.
FMOD_EVENTPROPERTY_3D_POSRANDOMIZATION_MAX
Type:unsignedint-Maximumradiusofrandomdeviationinthe3Dpositionofevent.
FMOD_EVENTPROPERTY_EVENTTYPE
Type:int-(Readonly)0=simpleevent,1=complexevent
FMOD_EVENTPROPERTY_STEAL_PRIORITY
Type:int-0to10000.Howimportantthiseventisinrelationtoothereventsintheproject.Thiseventwillneverstealaneventwithahigherstealprioritythanthis.
FMOD_EVENTPROPERTY_EFFECTS_AFFECT_REVERB
Type:int-0=default(no),1=yes.Alternateroutingforreverbpathofaneventsoitgoesfromthelayerdspunitinsteadofthechannel.
FMOD_EVENTPROPERTY_WILL_TERMINATE
Type:int-(Readonly)0=no,1=yes,2=unknown(currenteventstateistoocomplex).Whetherthiseventwillterminate(stopplaying)byitself.Ifcalledonaneventinstancewiththis_instance=true,thepredictionisbasedonthecurrentstateofthatinstance.Thismeansparametervalues,keyoffsetc.comeintoplay.
FMOD_EVENTPROPERTY_DSPCLOCKSTART_HI
Type:unsignedint-High32bitsofa64bitDSPclockvalue,forastarttimeforanysoundinthisevent.
FMOD_EVENTPROPERTY_DSPCLOCKSTART_LO
Type:unsignedint-Low32bitsofa64bitDSPclockvalue,forastarttimeforanysoundinthisevent.
FMOD_EVENTPROPERTY_3D_AUTO_DISTANCE_FILTERING
Type:int-0=default(no),1=yes.Whethertoautomaicallyapplythedistanceeffecttosoundsinthisevent.
FMOD_EVENTPROPERTY_3D_AUTO_DISTANCE_CENTER_FREQ
Type:float-10to22050.Thecenterfrequencyforthedistanceeffect.
FMOD_EVENTPROPERTY_USER_BASE
Usercreatedeventsstartfromhereonwards.
SeeAlso
Event::getPropertyByIndex
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_RESOURCEFlagstopasstoEventGroup::loadEventDatatodeterminewhattoloadatthetimeofcalling.
Enumeration
typedefenum{
FMOD_EVENT_RESOURCE_STREAMS_AND_SAMPLES,
FMOD_EVENT_RESOURCE_STREAMS,
FMOD_EVENT_RESOURCE_SAMPLES
}FMOD_EVENT_RESOURCE;
Values
FMOD_EVENT_RESOURCE_STREAMS_AND_SAMPLES
Openallstreamsandloadallbanksintomemory,underthisgroup(recursive)
FMOD_EVENT_RESOURCE_STREAMS
Openallstreamsunderthisgroup(recursive).Nosamplesareloaded.
FMOD_EVENT_RESOURCE_SAMPLES
Loadallbanksintomemory,underthisgroup(recursive).Nostreamsareopened.
SeeAlso
EventGroup::loadEventData
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_EVENT_SOUNDDEF_ENTRYTYPESounddefinitionentrytypesforFMOD_EVENT_SOUNDDEFINFO.
Enumeration
typedefenum{
FMOD_EVENT_SOUNDDEF_ENTRYTYPE_WAVETABLE,
FMOD_EVENT_SOUNDDEF_ENTRYTYPE_OSCILLATOR,
FMOD_EVENT_SOUNDDEF_ENTRYTYPE_NULL,
FMOD_EVENT_SOUNDDEF_ENTRYTYPE_PROGRAMMER
}FMOD_EVENT_SOUNDDEF_ENTRYTYPE;
Values
FMOD_EVENT_SOUNDDEF_ENTRYTYPE_WAVETABLE
Waveform.
FMOD_EVENT_SOUNDDEF_ENTRYTYPE_OSCILLATOR
Oscillator.
FMOD_EVENT_SOUNDDEF_ENTRYTYPE_NULL
"Don'tplay"entry.
FMOD_EVENT_SOUNDDEF_ENTRYTYPE_PROGRAMMER
Programmersound.
SeeAlso
FMOD_EVENT_SOUNDDEFINFOFMOD_EVENT_CALLBACKFMOD_EVENT_CALLBACKTYPE
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
FMOD_MUSIC_CALLBACKTYPEThesecallbacktypesareusedwithFMOD_MUSIC_CALLBACK.
Enumeration
typedefenum{
FMOD_MUSIC_CALLBACKTYPE_SEGMENT_START,
FMOD_MUSIC_CALLBACKTYPE_SEGMENT_END,
FMOD_MUSIC_CALLBACKTYPE_SAMPLE_CREATE,
FMOD_MUSIC_CALLBACKTYPE_SAMPLE_RELEASE,
FMOD_MUSIC_CALLBACKTYPE_CHANNEL_CREATED,
FMOD_MUSIC_CALLBACKTYPE_CHANNEL_DESTROYED,
FMOD_MUSIC_CALLBACKTYPE_RESET,
FMOD_MUSIC_CALLBACKTYPE_BEAT
}FMOD_MUSIC_CALLBACKTYPE;
Values
FMOD_MUSIC_CALLBACKTYPE_SEGMENT_START
Calledwhenasegmentisstarted.
FMOD_MUSIC_CALLBACKTYPE_SEGMENT_END
Calledwhenasegmentends.
FMOD_MUSIC_CALLBACKTYPE_SAMPLE_CREATE
Calledwhenasegmentneedsasoundcreated.
FMOD_MUSIC_CALLBACKTYPE_SAMPLE_RELEASE
Calledwhenasegmentisfinishedwithasound.
FMOD_MUSIC_CALLBACKTYPE_CHANNEL_CREATED
Calledwhenachanneliscreatedtoplayasegment.
FMOD_MUSIC_CALLBACKTYPE_CHANNEL_DESTROYED
Calledwhenasegmentchannelisdestroyed.
FMOD_MUSIC_CALLBACKTYPE_RESET
Calledwhenthesystemisreset
FMOD_MUSIC_CALLBACKTYPE_BEAT
Calledeachtimeabeatispassed(basedonsegmenttempoandtimesignature)
Remarks
Note!CurrentlytheusermustcallEventSystem::updateforthesecallbackstotrigger!
SeeAlso
MusicSystem::setCallbackFMOD_MUSIC_CALLBACKEventSystem::update
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
C++ReferenceFunctions
FirelightTechnologiesFMODEx
FunctionsNetEventSystem_GetVersionNetEventSystem_InitNetEventSystem_ShutdownNetEventSystem_Update
FirelightTechnologiesFMODEx
NetEventSystem_GetVersionGettheNetEventSystemversionnumber.
C++Syntax
FMOD_RESULTNetEventSystem_GetVersion(
unsignedint*version
);
CSyntax
FMOD_RESULTFMOD_NetEventSystem_GetVersion(
unsignedint*version
);
Parameters
version
Apointertoanintegertoreceivetheversionnumber
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
SeeAlso
NetEventSystem_Init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
NetEventSystem_InitThisfunctioninitializestheNetEventSystemandpreparesittoacceptincomingconnections.NOTE:ThisfunctionmustbecalledbeforeanyotherNetEventSystemfunctions.
C++Syntax
FMOD_RESULTNetEventSystem_Init(
EventSystem*eventsystem,
unsignedshortport
);
CSyntax
FMOD_RESULTFMOD_NetEventSystem_Init(
FMOD_EVENTSYSTEM*eventsystem,
unsignedshortport
);
Parameters
eventsystem
Apointertoauser-createdEventSystemobject.
port
TheTCPportthattheNetEventSystemwillusetoacceptincomingconnections.0=usedefaultportwhichis17997.
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
Specify0fortheportunlessyouhaveagoodreasonnotto.Makesurethatwhateverportyouspecifyisnotblocked.
SeeAlso
NetEventSystem_UpdateNetEventSystem_ShutdownNetEventSystem_GetVersion
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
NetEventSystem_ShutdownShutdowntheNetEventSystem.
C++Syntax
FMOD_RESULTNetEventSystem_Shutdown();
CSyntax
FMOD_RESULTFMOD_NetEventSystem_Shutdown();
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
CallthisfunctionafteryoucallEventSystem::release.
SeeAlso
NetEventSystem_Init
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
NetEventSystem_UpdateUpdatetheNetEventSystem.
C++Syntax
FMOD_RESULTNetEventSystem_Update();
CSyntax
FMOD_RESULTFMOD_NetEventSystem_Update();
Parameters
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.
Remarks
YoumustcallthisfunctiononceaframejustafteryoucallEventSystem::update.
SeeAlso
NetEventSystem_InitNetEventSystem_Shutdown
Version4.44.07BuiltonFeb11,2013
FirelightTechnologiesFMODEx
PSP::changeOutputModeThisfunctionallowsyoutoswitchbetweenFMOD_PSP_OUTPUTMODE_SIMPLEAUDIOandFMOD_PSP_OUTPUTMODE_LIBWAVEonthefly.Thisallowseasierco-existencewithmovieplayers.SimpleAudioisthemostCPUefficientoutputmode,howeveritisexclusivesotwoAPI'scan'tuseitatonce.WhenplayingamoviethoughanotherAPI,youcanusethisfunctiontoswitchtolibWavewhilethemovieisplaying,andthenbacktoSimpleAudioagainwhenthemovieisfinished.
C++Syntax
FMOD_RESULTPSP::changeOutputMode(
intlibwave_channel
);
CSyntax
FMOD_RESULTFMOD_PSP_ChangeOutputMode(
PSP*psp,
intlibwave_channel
);
Parameters
libwave_channel
-UsedwhenswitchingtolibWave.SetsthelibWavechannelnumberusedforaudiooutput(0-2).
ReturnValues
IfthefunctionsucceedsthenthereturnvalueisFMOD_OK.IfthefunctionfailsthenthereturnvaluewillbeoneofthevaluesdefinedintheFMOD_RESULTenumeration.FMOD_OK
Remarks
WhenswitchingtolibWave,itisassumedthattheuserhastakencareofinitializinglibWave.(viasceWaveInit).
Version4.44.07BuiltonFeb11,2013