Minetest  5.4.0
SimpleSoundSpec Struct Reference

#include <sound.h>

+ Collaboration diagram for SimpleSoundSpec:

Public Member Functions

 SimpleSoundSpec (const std::string &name="", float gain=1.0f, float fade=0.0f, float pitch=1.0f)
 
bool exists () const
 
void serialize (std::ostream &os, u8 cf_version) const
 
void deSerialize (std::istream &is, u8 cf_version)
 

Public Attributes

std::string name
 
float gain = 1.0f
 
float fade = 0.0f
 
float pitch = 1.0f
 

Constructor & Destructor Documentation

◆ SimpleSoundSpec()

SimpleSoundSpec::SimpleSoundSpec ( const std::string &  name = "",
float  gain = 1.0f,
float  fade = 0.0f,
float  pitch = 1.0f 
)
inline

Member Function Documentation

◆ deSerialize()

void SimpleSoundSpec::deSerialize ( std::istream &  is,
u8  cf_version 
)
inline

References deSerializeString16(), fade, gain, name, pitch, and readF32().

Referenced by ItemDefinition::deSerialize(), and ContentFeatures::deSerialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exists()

bool SimpleSoundSpec::exists ( ) const
inline

References name.

Referenced by Game::handleDigging(), and SoundMaker::playPlayerStep().

+ Here is the caller graph for this function:

◆ serialize()

void SimpleSoundSpec::serialize ( std::ostream &  os,
u8  cf_version 
) const
inline

References fade, gain, name, pitch, serializeString16(), and writeF32().

Referenced by ItemDefinition::serialize(), and ContentFeatures::serialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ fade

◆ gain

◆ name

◆ pitch


The documentation for this struct was generated from the following file: