coastline 0.0.4
Loading...
Searching...
No Matches
coastline::N64MixerLock Class Reference

A lock of the mixers and the music player of the console against the audio thread that mixes them, for the life of the object. More...

#include <music.h>

Public Member Functions

 N64MixerLock ()
 Acquire the active mixer context's recursive mutex on the calling thread.
 ~N64MixerLock ()
 Release the mutex on the thread that acquired this lock.
 N64MixerLock (const N64MixerLock &)=delete
 Prevent copying a mutex acquisition.
N64MixerLock & operator= (const N64MixerLock &)=delete
 Prevent assignment of a mutex acquisition.

Detailed Description

A lock of the mixers and the music player of the console against the audio thread that mixes them, for the life of the object.

The game thread takes it around each change of a channel. It is recursive. The audio thread waits on it, and the game thread locks it for a few stores at most.

Constructor & Destructor Documentation

◆ N64MixerLock() [1/2]

coastline::N64MixerLock::N64MixerLock ( )

Acquire the active mixer context's recursive mutex on the calling thread.

◆ ~N64MixerLock()

coastline::N64MixerLock::~N64MixerLock ( )

Release the mutex on the thread that acquired this lock.

◆ N64MixerLock() [2/2]

coastline::N64MixerLock::N64MixerLock ( const N64MixerLock & )
delete

Prevent copying a mutex acquisition.

Member Function Documentation

◆ operator=()

N64MixerLock & coastline::N64MixerLock::operator= ( const N64MixerLock & )
delete

Prevent assignment of a mutex acquisition.


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