Copperfield Engine 0.1
C++ Game Engine
Loading...
Searching...
No Matches
AudioCmp Struct Reference

Component used for audio reproduction. More...

#include <default_components.hpp>

Public Member Functions

 AudioCmp (const std::string &name, const SoundBuffer &buffer, float gain=1.0f, float pitch=1.0f)
 Construct an audio component. More...
 

Public Attributes

SoundSource src
 Object used to reproduce the audio.
 

Detailed Description

Component used for audio reproduction.

Constructor & Destructor Documentation

◆ AudioCmp()

AudioCmp::AudioCmp ( const std::string &  name,
const SoundBuffer &  buffer,
float  gain = 1.0f,
float  pitch = 1.0f 
)
inline

Construct an audio component.

Parameters
nameThe name of the component used to identify the component.
bufferThe sound buffer you want to assign.
gainAmount of audio signal increased by an amplifier.
pitchThe vibrations of sound waves.