QtCraft API C++ classes QML types Handbook

QcSoundCue Struct

A sound the client should play now: from a server SoundEvent or made by the client itself (the player's steps, jumps, mining strikes). More...

Header: #include <clientcore/sound/QcSoundCue.h>

Public Types

enum class Origin { Server, Local }

Public Variables

QString key
QcSoundCue::Origin origin
float pitch
QcVec3 position
quint64 tick
float volume

Detailed Description

Audio output and the control interface consume it.

Member Type Documentation

enum class QcSoundCue::Origin

Who made the sound.

ConstantValueDescription
QcSoundCue::Origin::Server0A SoundEvent of the server
QcSoundCue::Origin::Local1Made by the client itself

Member Variable Documentation

QString QcSoundCue::key

Sound key (a content sound name).

QcSoundCue::Origin QcSoundCue::origin

Who made the sound.

float QcSoundCue::pitch

Playback speed, 1 is the sound's own.

QcVec3 QcSoundCue::position

Where the sound comes from.

quint64 QcSoundCue::tick

Client tick in which the cue arrived.

float QcSoundCue::volume

Volume, 1 is the sound's own.