coastline 0.0.4
Loading...
Searching...
No Matches
soundsource.h File Reference
#include "common/render.h"
Include dependency graph for soundsource.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SoundSourceTracking
 The nearest sound of the track this frame and the last. More...

Functions

void ResetSoundSourceTracking (void)
 Forget the nearest sound of the track found the last frame.
void ResetAllSoundState (void)
 Stop the sounds of the track and forget their sources.
void UpdateAirplaneSound (s32 instance, Vec3f *position, CameraFrame *camera)
 Offer the sound of the airplane as the nearest sound of the track, on the tracks that have one.
void UpdateWaterfallSound (s32 instance, Vec3f *position, CameraFrame *camera)
 Offer the sound of a waterfall as the nearest sound of the track, on the tracks that have one.
f32 ComputeDopplerFactor (Vec3f *source, Vec3f *previousSource, Vec3f *listener, Vec3f *previousListener)
 The factor the Doppler effect raises a sound by, from the motion of the source and the listener along the line between them over the frame.
void UpdateClosestSoundSource (s32 source, s32 sound, s32 volume, f32 frequency, Vec3f *position, CameraFrame *listener)
 Offer a sound of the track as the nearest this frame; the nearest plays.

Variables

SoundSourceTracking g_ClosestSoundSource
 The nearest sound of the track.

Function Documentation

◆ ResetSoundSourceTracking()

void ResetSoundSourceTracking ( void )

Forget the nearest sound of the track found the last frame.

Ghidra address:
USA: 0x8022b404
Ghidra address:
Asia: 0x8022AF54
Ghidra address:
EUR: 0x8022c914
Ghidra address:
JPN: 0x8022c0cc
Ghidra address:
BRD3D: 0x10067da0
Ghidra address:
BRGlide: 0x10060e10

◆ ResetAllSoundState()

void ResetAllSoundState ( void )

Stop the sounds of the track and forget their sources.

Ghidra address:
USA: 0x8022b428
Ghidra address:
Asia: 0x8022AF78
Ghidra address:
EUR: 0x8022c938
Ghidra address:
JPN: 0x8022c0f0
Ghidra address:
BRD3D: 0x10067dc0
Ghidra address:
BRGlide: 0x10060e30

◆ UpdateAirplaneSound()

void UpdateAirplaneSound ( s32 instance,
Vec3f * position,
CameraFrame * camera )

Offer the sound of the airplane as the nearest sound of the track, on the tracks that have one.

Parameters
instanceThe placed model of the airplane.
positionIts position.
cameraThe camera that hears it.
Ghidra address:
USA: 0x8022b954
Ghidra address:
Asia: 0x8022B4A4
Ghidra address:
EUR: 0x8022ce64
Ghidra address:
JPN: 0x8022c61c
Ghidra address:
BRD3D: 0x10068180
Ghidra address:
BRGlide: 0x100611f0

◆ UpdateWaterfallSound()

void UpdateWaterfallSound ( s32 instance,
Vec3f * position,
CameraFrame * camera )

Offer the sound of a waterfall as the nearest sound of the track, on the tracks that have one.

Parameters
instanceThe source the sound is kept under.
positionThe position of the waterfall.
cameraThe camera that hears it.
Ghidra address:
USA: 0x8022ba10
Ghidra address:
Asia: 0x8022B560
Ghidra address:
EUR: 0x8022cf20
Ghidra address:
JPN: 0x8022c6d8
Ghidra address:
BRD3D: 0x10068210
Ghidra address:
BRGlide: 0x10061280

◆ ComputeDopplerFactor()

f32 ComputeDopplerFactor ( Vec3f * source,
Vec3f * previousSource,
Vec3f * listener,
Vec3f * previousListener )

The factor the Doppler effect raises a sound by, from the motion of the source and the listener along the line between them over the frame.

Parameters
sourceThe source.
previousSourceWhere the source was.
listenerThe listener.
previousListenerWhere the listener was.
Returns
The factor.
Ghidra address:
USA: 0x8022b0f8
Ghidra address:
Asia: 0x8022AC48
Ghidra address:
EUR: 0x8022c608
Ghidra address:
JPN: 0x8022bdc0
Ghidra address:
BRD3D: 0x10067ae0
Ghidra address:
BRGlide: 0x10060b50

◆ UpdateClosestSoundSource()

void UpdateClosestSoundSource ( s32 source,
s32 sound,
s32 volume,
f32 frequency,
Vec3f * position,
CameraFrame * listener )

Offer a sound of the track as the nearest this frame; the nearest plays.

Parameters
sourceThe source the sound is kept under.
soundThe sound effect.
volumeThe volume, out of 256.
frequencyThe frequency, in hertz, negative for a source that does not move.
positionThe position of the source.
listenerThe camera that hears it.
Ghidra address:
USA: 0x8022b494
Ghidra address:
Asia: 0x8022AFE4
Ghidra address:
EUR: 0x8022c9a4
Ghidra address:
JPN: 0x8022c15c
Ghidra address:
BRD3D: 0x10067e50
Ghidra address:
BRGlide: 0x10060ec0

Variable Documentation

◆ g_ClosestSoundSource

SoundSourceTracking g_ClosestSoundSource
extern

The nearest sound of the track.

Ghidra address:
USA: 0x8028b7a0
Ghidra address:
Asia: 0x8028B2F0
Ghidra address:
EUR: 0x8028da50
Ghidra address:
JPN: 0x8028d480
Ghidra address:
BRD3D: 0x10af9b58
Ghidra address:
BRGlide: 0x10b1ceb8