nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::Clip Class Reference

#include <audio.h>

Public Member Functions

 ~Clip ()
 Clip (const Clip &)=delete
Clip & operator= (const Clip &)=delete
void Play (float volume, float pan, float pitch)

Static Public Member Functions

static std::unique_ptr< Clip > Load (const AudioDevice &device, const Samples &samples, int voices)

Detailed Description

A sound we made, ready to play, on a few voices that share its samples, so that it can play again before it's over, as steps do.

Definition at line 90 of file audio.h.

Constructor & Destructor Documentation

◆ ~Clip()

nanommo::Clip::~Clip ( )

Definition at line 126 of file audio.cc.

◆ Clip()

nanommo::Clip::Clip ( const Clip & )
delete

Member Function Documentation

◆ Load()

std::unique_ptr< Clip > nanommo::Clip::Load ( const AudioDevice & device,
const Samples & samples,
int voices )
static

Definition at line 109 of file audio.cc.

◆ operator=()

Clip & nanommo::Clip::operator= ( const Clip & )
delete

◆ Play()

void nanommo::Clip::Play ( float volume,
float pan,
float pitch )

On the voice that started longest ago: at a volume from 0 to 1, a pan from -1 for the left to 1 for the right, and a pitch, where 2 is an octave up.

Definition at line 169 of file audio.cc.


The documentation for this class was generated from the following files: