|
coastline 0.0.4
|
The XM player and sample mixers of the Nintendo 64 release, streamed as native stereo PCM. More...
#include <music.h>
Public Member Functions | |
| N64Audio () | |
| Initialise channels in the active N64MixerContext, without opening an audio device. | |
| ~N64Audio () | |
| Destroy the playback stream before the mixer context is destroyed. | |
| N64Audio (const N64Audio &)=delete | |
| Prevent copying the playback stream and module storage. | |
| N64Audio & | operator= (const N64Audio &)=delete |
| Prevent assignment of the playback stream and module storage. | |
| bool | OpenDevice () |
| Open the default playback device. | |
| void | Play (std::span< const std::uint8_t > module) |
| Load a module and start it from its first order. | |
| void | Stop () |
| Stop the module and silence its channels. | |
| bool | Pause () |
| bool | Resume () |
| bool | UpdateVolumeProcessing () |
| Suspend the device while paused or while both enabled audio categories are silent. | |
| void | SetProcessingEnabled (bool music, bool soundEffects) |
| Enable each category independently of transient fades and playback pauses. | |
| void | SetMusicGain (float gain) |
| Scale the music of the modules, apart from the sound effects the player mixes with it. | |
| std::vector< std::int16_t > | Render (std::size_t frames) |
| Render stereo 16-bit frames without a device, as the device would receive them. | |
The XM player and sample mixers of the Nintendo 64 release, streamed as native stereo PCM.
Mixer controls advance every 10 milliseconds, with lookahead for notes and sound effects.
| coastline::N64Audio::N64Audio | ( | ) |
Initialise channels in the active N64MixerContext, without opening an audio device.
| coastline::N64Audio::~N64Audio | ( | ) |
Destroy the playback stream before the mixer context is destroyed.
|
delete |
Prevent copying the playback stream and module storage.
Prevent assignment of the playback stream and module storage.
| bool coastline::N64Audio::OpenDevice | ( | ) |
Open the default playback device.
| void coastline::N64Audio::Play | ( | std::span< const std::uint8_t > | module | ) |
Load a module and start it from its first order.
| module | A valid imported XM module, copied into player storage before playback. |
| void coastline::N64Audio::Stop | ( | ) |
Stop the module and silence its channels.
| bool coastline::N64Audio::Pause | ( | ) |
| bool coastline::N64Audio::Resume | ( | ) |
| bool coastline::N64Audio::UpdateVolumeProcessing | ( | ) |
Suspend the device while paused or while both enabled audio categories are silent.
| void coastline::N64Audio::SetProcessingEnabled | ( | bool | music, |
| bool | soundEffects ) |
Enable each category independently of transient fades and playback pauses.
| music | Whether to process music while its volume is nonzero. |
| soundEffects | Whether to process effects while their master volume is nonzero. |
| void coastline::N64Audio::SetMusicGain | ( | float | gain | ) |
Scale the music of the modules, apart from the sound effects the player mixes with it.
| gain | The finite scale, clamped to 0 through 8, with 1 for the console level. |
| std::vector< std::int16_t > coastline::N64Audio::Render | ( | std::size_t | frames | ) |
Render stereo 16-bit frames without a device, as the device would receive them.
The volumes of the game are published first.
| frames | The frames to render. |