The methods of the CScriptBindSound class are listed here.
|
|
Name |
Description |
|
Syntax: Sound.ActivateAudioDevice() Activates audio device. | |
|
Syntax: Sound.AddMusicMoodEvent(pszMood [, fTimeout]) Adds an event for the specified music mood. | |
|
Syntax: Sound.AddSoundFlags() | |
|
Syntax: Sound.CreateListener() Creates a new Listener | |
|
Syntax: Sound.DeactivateAudioDevice() Deactivates the audio device. | |
|
Syntax: Sound.EndMusicTheme([nThemeFadeType [, nForceEndLimitInSec [, bEndEverything]]]) | |
|
Syntax: Sound.FXEnable( pSound, nEffectNumber ) Enables the specified effect number. | |
|
Syntax: Sound.GetDirectionalAttenuationMaxScale() Gets the maximum scale of the directional attenuation. | |
![]() |
This is GetMemoryUsage, a member of class CScriptBindSound. | |
|
Syntax: Sound.GetMusicMoods(pszTheme) Gets the music moods for the specified music theme. | |
|
Syntax: Sound.GetMusicStatus() Gets the music status and logs the value to the console. | |
|
Syntax: Sound.GetMusicThemes() Gets the music themes. | |
|
Syntax: Sound.GetSoundLength(pSound) Gets the sound length in seconds. | |
|
Syntax: Sound.GetSoundMoodFade(sSoundMoodName) Gets the fade value for the specified sound mood. ! Get the SoundMood fade value | |
|
Syntax: Sound.GetSoundVolume(sound) Gets sound volume. | |
|
Syntax: Sound.IsEvent() Checks if the sound is an event. Checks for EVENT flag. ! Determine if a sound has the event flag @param nID ID of the sound @return nil or not nil | |
|
Syntax: Sound.IsInMusicMood(pszMood) Checks if we are currently playing the specified music mood. | |
|
Syntax: Sound.IsInMusicTheme(pszTheme) Checks if we are currently playing the specified music theme. | |
|
Syntax: Sound.IsPlaying() Checks if the sound is playing. | |
|
Syntax: Sound.IsSoundLooped(sound) will return false also if the given soundid does not exist ! obtain the looping status of a sound @param nID ID of the sound | |
|
Syntax: Sound.IsVoice() Checks if the sound is a voice. Checks for VOICE flag. ! Determine if a sound has the voice flag @param nID ID of the sound @return nil or not nil | |
|
Syntax: Sound.LoadSound(sound [,flags [,volume [, min [, clipDistance [, priority [, group]]]]]]) Loads a 3D sound. | |
|
Syntax: Sound.LoadMusic(pszFilename) | |
|
Syntax: Sound.LoadSound(sound, flags) Loads the specified sound. | |
|
Syntax: Sound.LoadStreamSound(sound, flags) Loads a stream sound. | |
|
Syntax: Sound.Play( sGroupAndSoundName, vPos, nSoundFlags ) Uses the sound definition of the Handle to play a sound at the position vPos . It returns a unique SoundID that is valid as long as the sound is played. | |
|
Syntax: Sound.PlayEx( sGroupAndSoundName, nSoundFlags, fVolume, pos, minRadius, maxRadius ) Play sound file. | |
|
Syntax: Sound.PlayPattern(pszPattern, bStopPrevious, bPlaySynched) Play the named pattern | |
|
Syntax: Sound.PlaySound(sound, volumeScale) Plays a sound. ! Load a streaming sound @param sSound filename of the sound @return nil or sound ID in case of success int CScriptBindSound::LoadStreamSoundLocalized(IFunctionHandler *pH) { if (pH->GetParamCount()<1 || pH->GetParamCount()>2) { m_pSS->RaiseError("System.LoadStreamSound wrong number of arguments"); return pH->EndFunction(); }; const char *sSound; // int nID; ISound *pSound; pH->GetParam(1,sSound); int nFlags=0; if (pH->GetParamCount()>1) pH->GetParam(2, nFlags); string szPath; ICVar *g_language = gEnv->pConsole->GetCVar("g_language"); assert(g_language); szPath = "LANGUAGES/"; szPath += g_language->GetString(); szPath += "/"; szPath += sSound; pSound = m_pSoundSystem->LoadSound(szPath.c_str(),FLAG_SOUND_STREAM | nFlags); if (pSound) { pSound->AddRef(); return pH->EndFunction(ScriptHandle(pSound)); } return pH->EndFunction(); } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ! Start playing a sound, loops... more | |
|
Syntax: Sound.PlayStinger() Plays stinger. | |
|
Syntax: Sound.Precache( sGroupAndSoundName, nPrecacheFlags ) Precaches the sound data used by a sound definition Depending on additional flags and current settings may load the sound data into the memory for later usage. Precaching is optional, sound system can also play not cached sounds, but it can cause small delay before sound playing starts. | |
|
Syntax: Sound.RegisterSoundMood(sSoundMoodName) Registers the specified sound mood. | |
|
Syntax: Sound.RegisterWeightedEaxEnvironment( sPresetName, nFullEffectWhenInside, nFlags ) Registers a weighted EAX (Environmental Audio Extension) environment. ! Registers an EAX Preset Area with as being active //! morphing of several EAX Preset Areas is done internally //! Registering the same Preset multiple time will only overwrite the old one @param nPreset one of the presets | |
|
Syntax: Sound.RemoveListener(nListenerID) Removes a Listener | |
|
Syntax: Sound.SerializeMusicInternal([bSave]) Serializes the music internal. | |
|
Syntax: Sound.SetDefaultMusicMood(pszMood) Sets the specified music mood as the default mood. | |
|
Syntax: Sound.SetDirectionalAttenuation( vPos, vDir, fConeInRadians ) Sets a directional attenuation of the sounds. | |
|
Syntax: Sound.SetFadeTime(sound, fadeGoal, fadeTimeInMS) Sets the fade time for the sound. | |
|
Syntax: Sound.SetFXSetParamEQ( pSound, fCenter, fBandwidth, fGain ) Sets some parameters to the sound effect. | |
|
Syntax: Sound.SetListener(nListenerID, vPos, vForward, vTop, bActive, fRecord, vVel) Sets attributes to a Listener | |
|
Syntax: Sound.SetMasterMusicEffectsVolume(newMusicVol) Set the master volume for music effects. | |
|
Syntax: Sound.SetMasterVolumeScale(scale) Sets the master volume scale. | |
|
Syntax: Sound.SetMenuMusic( bPlayMenuMusic, pszTheme, pszMood ) Play (or don't) the specified music on the menu screen. | |
|
Syntax: Sound.SetMinMaxDistance(sound, minDist, maxDist) Sets the minimum and the maximum distances for the sound. ! Set distance attenuation of a sound @param iSoundID ID of the sound @param fMinDist Minimum distance, normally 0 @param fMaxDist Maximum distance at which the sound can be heard | |
|
Syntax: Sound.SetMusicMood(pszMood [, bPlayFromStart [, bForceChange]]) Sets the specified music mood. | |
|
Syntax: Sound.SetMusicTheme(pszTheme [, bForceChange [, bKeepMood [, nDelayInSec]]]) Sets the music theme. | |
|
Syntax: Sound.SetObstructionOffset(fOffsetInMeters) Sets the audio obstruction offset in meters in regards to the origin (sound emitter). | |
|
Syntax: Sound.SetParameterValue( SoundID, sParameterName, fParameterValue ) Changes a parameter value of a specific sound (if supported) | |
|
Syntax: Sound.SetPauseAllPlaying( bPause ) Sets/unsets pause for all the playing sounds. | |
|
Syntax: Sound.SetSoundFrequency(sound, frequency) Sets the sound frequency. ! Changes the pitch of a sound sound @param nID ID of the sound @param nFrequency Frequency, value range is between 0 and 1000 | |
|
Syntax: Sound.SetSoundLoop(sound) Sets the loop flag to a sound. ! Change the looping status of a looped sound @param nID ID of the sound @param nFlag 1/0 to enable/disable looping | |
|
Syntax: Sound.SetSoundPaused(sound, paused) Pauses/resumes the sound. ! Sets the Pause state of a sound @param nID ID of the sound @param bPaused State of Pause Mode | |
|
Syntax: Sound.SetSoundPitching(sound, pitching) Sets the sound pitching. | |
|
Syntax: Sound.SetSoundPosition(sound, pos) Sets the position of the sound. nSoundHandle can be SoundID or Ptr. ! Change the position of a 3D sound @param nID ID of the sound @param v3d Three component vector containing the position @see CScriptBindSound::Load3DSound | |
|
Syntax: Sound.SetSoundRatio(pSound, fRatio) Sets the sound ratio. | |
|
Syntax: Sound.SetSoundRelative(sound, isRelative) Sets/unsets the RELATIVE Flag. If unset, a new valid position has to be set, or the sound stays at the last listener position. ! int CScriptBindSound::SetLoopPoints(IFunctionHandler *pH) { SCRIPT_CHECK_PARAMETERS(3); int nID = 0, iLoopPt1, iLoopPt2; int nCookie=0; _smart_ptrpSound = GetSoundPtr(pH,1); pH->GetParam(2, iLoopPt1); pH->GetParam(3, iLoopPt2); if (pSound) pSound->SetLoopPoints(iLoopPt1, iLoopPt2); return pH->EndFunction(); } ! int CScriptBindSound::AddSoundFlags(IFunctionHandler *pH) { int iFlags; int nCookie=0; ISound *pISound = NULL; SCRIPT_CHECK_PARAMETERS(2); pH->GetParamUDVal(1,(int &)pISound,nCookie); pH->GetParam(2, iFlags); if (pISound && (nCookie==USER_DATA_SOUND)) pISound->AddFlags(iFlags); return pH->EndFunction(); | |
|
Syntax: Sound.SetSoundVolume(sound, volume) Sets sound volume. ! Change the volume of a sound @param nID ID of the sound @param fVolume volume between 0 and 1 | |
|
Syntax: Sound.SetWeatherCondition(fWeatherTemperatureInCelsius, fWeatherHumidityAsPercent, fWeatherInversion) Sets the weather condition. | |
|
Syntax: Sound.Silence() Silences the sound. | |
|
Syntax: Sound.StopSound(sound) Stops the sound. nSoundHandle can be SoundID or Ptr. ! Stop playing a sound @param nID ID of the sound | |
|
Syntax: Sound.UnloadMusic() Unloads the music. | |
|
Syntax: Sound.UnloadProjects() Unloads the projects. | |
|
Syntax: Sound.UnregisterSoundMood(sSoundMoodName) Unregisters the specified sound mood. | |
|
Syntax: Sound.UnregisterWeightedEaxEnvironment( sPresetName, entityId ) Unregisters a weighted EAX (Environmental Audio Extension) environment. ! Unregisters an active EAX Preset Area | |
|
Syntax: Sound.RegisterSoundMood(sSoundMoodName, fFade [, nFadeTimeInMS]) Updates the specified sound mood. | |
|
Syntax: Sound.UpdateWeightedEaxEnvironment( sPresetName, fWeight ) Updates a weighted EAX (Environmental Audio Extension) environment. ! Updates an EAX Preset Area with the current blending ratio (0-1) |
|
Copyright (c) 2012. All rights reserved.
|