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

#include <audio.h>

Public Member Functions

 ~Stream ()
 Stream (const Stream &)=delete
Stream & operator= (const Stream &)=delete
void Feed (const std::function< void(std::span< float >, std::span< float >)> &fill)
void SetVolume (float volume)
 From nothing to full.

Static Public Member Functions

static std::unique_ptr< Stream > Open (const AudioDevice &device)

Detailed Description

Sound we make as it plays, two channels a buffer at a time, for what goes on and on, such as the rain.

Definition at line 115 of file audio.h.

Constructor & Destructor Documentation

◆ ~Stream()

nanommo::Stream::~Stream ( )

Definition at line 150 of file audio.cc.

◆ Stream()

nanommo::Stream::Stream ( const Stream & )
delete

Member Function Documentation

◆ Feed()

void nanommo::Stream::Feed ( const std::function< void(std::span< float >, std::span< float >)> & fill)

Asks for more, into the left and the right, for each buffer that's played out. raylib needs this each frame, as a track's Update.

Definition at line 152 of file audio.cc.

◆ Open()

std::unique_ptr< Stream > nanommo::Stream::Open ( const AudioDevice & device)
static

Definition at line 140 of file audio.cc.

◆ operator=()

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

◆ SetVolume()

void nanommo::Stream::SetVolume ( float volume)

From nothing to full.

Definition at line 167 of file audio.cc.


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