|
coastline 0.0.4
|
The hand-written routines of audiomix.s: copies of 64-bit words and the sample mixers, and the channel records they read. More...
#include "common/types.h"

Go to the source code of this file.
Classes | |
| struct | MixerChannel |
| A channel of a mixer. More... | |
| struct | SdlMixerState |
| Mixer channels and write position for one SDL audio context. More... | |
Macros | |
| #define | AUDIO_RING_BYTES 0x4000 |
| The bytes of the stereo ring buffer the mixers write. | |
| #define | MIXER_CHANNELS 16 |
| The channels of the music mixer. | |
| #define | SOUND_EFFECT_CHANNELS 6 |
| The channels of the sound effect mixer. | |
| #define | g_wAudioBufferWritePos (GetSdlMixerState()->writePosition) |
| #define | g_aMixerChannels (GetSdlMixerState()->musicChannels) |
| #define | g_qwSoundEffectSampleMask (GetSdlMixerState()->soundEffectSampleMask) |
| #define | g_aSoundEffectChannels (GetSdlMixerState()->soundEffectChannels) |
| #define | g_dwSoundEffectEchoOffset (GetSdlMixerState()->soundEffectEchoOffset) |
Functions | |
| SdlMixerState * | GetSdlMixerState (void) |
| void | CopyVec4 (void *dst, const void *src) |
| Copy 16 bytes between 8-byte aligned addresses. | |
| void | MemFill64Aligned (void *dst, u32 size, s32 value) |
| Fill a byte count rounded up to 64 with a 32-bit value. | |
| void | MixAudioSamples (s16 *ring, u32 bytes) |
| Mix six channels into the ring buffer, replacing what it held. | |
| void | MixAudioStereoSamples (s16 *ring, u32 bytes, u32 pairOffset) |
| Add a pair of channels to the ring buffer. | |
| void | MixSoundEffectChannels (s16 *ring, u32 bytes, u32 offset) |
| Add the sound effect channels to the ring buffer from an offset. | |
The hand-written routines of audiomix.s: copies of 64-bit words and the sample mixers, and the channel records they read.
| #define AUDIO_RING_BYTES 0x4000 |
The bytes of the stereo ring buffer the mixers write.
| #define MIXER_CHANNELS 16 |
The channels of the music mixer.
| #define SOUND_EFFECT_CHANNELS 6 |
The channels of the sound effect mixer.
| #define g_wAudioBufferWritePos (GetSdlMixerState()->writePosition) |
The byte offset of the next write within the stereo ring buffer.
| #define g_aMixerChannels (GetSdlMixerState()->musicChannels) |
The music mixer's sample channels.
| #define g_qwSoundEffectSampleMask (GetSdlMixerState()->soundEffectSampleMask) |
The mask that clears low bits during packed effect mixing.
| #define g_aSoundEffectChannels (GetSdlMixerState()->soundEffectChannels) |
The sound effect channels.
| #define g_dwSoundEffectEchoOffset (GetSdlMixerState()->soundEffectEchoOffset) |
The sample offset from channel zero to its echo, or zero.
| SdlMixerState * GetSdlMixerState | ( | void | ) |
| void CopyVec4 | ( | void * | dst, |
| const void * | src ) |
Copy 16 bytes between 8-byte aligned addresses.
| dst | The destination. |
| src | The source. |
Fill a byte count rounded up to 64 with a 32-bit value.
The address must be 8-byte aligned.
| dst | The start of the memory to fill. |
| size | The count of bytes to fill. |
| value | The value of each word. A value of -1 sets every bit, and a positive value leaves the upper halfword of each word clear. |
Mix six channels into the ring buffer, replacing what it held.
| ring | The start of the ring buffer. |
| bytes | The count of bytes to mix from the write position. |
Add a pair of channels to the ring buffer.
| ring | The start of the ring buffer. |
| bytes | The count of bytes to mix from the write position. |
| pairOffset | Offset of the pair's records from those of the first extra pair. |
Add the sound effect channels to the ring buffer from an offset.
| ring | The start of the ring buffer. |
| bytes | The count of bytes to mix. |
| offset | The offset in bytes into the ring buffer to start at. |