|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
#include "mss_private.h"#include <dttr_log.h>#include <SDL3/SDL.h>#include <SDL3_mixer/SDL_mixer.h>#include <limits.h>#include <stdbool.h>#include <stdint.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | mss_sample |
Variables | |
| static const uint32_t | SAMPLE_MAGIC = 0x4453414d |
| static mss_sample | samples [DTTR_MSS_DEFAULT_MIXER_CHANNELS] |
|
static |
Definition at line 37 of file mss_sample.c.
References mss_sample::base_rate, mss_sample::current_rate, DTTR_LOG_ERROR, dttr_mss_track_frequency_ratio(), mss_sample::rendered_rate, and mss_sample::track.
Referenced by apply_sample_track(), and dttr_mss_ail_set_sample_playback_rate().
|
static |
Definition at line 91 of file mss_sample.c.
References dttr_mss_core_master_gain(), dttr_mss_core_sample_headroom_gain(), dttr_mss_track_gain(), mss_sample::track, and mss_sample::volume.
Referenced by apply_sample_track(), dttr_mss_ail_set_sample_volume(), and dttr_mss_sample_apply_master_gain().
|
static |
Definition at line 191 of file mss_sample.c.
References apply_rate(), apply_sample_gain(), mss_sample::audio, dttr_mss_track_apply_pan(), mss_sample::pan, and mss_sample::track.
Referenced by dttr_mss_ail_set_sample_file(), and dttr_mss_ail_start_sample().
|
static |
Definition at line 120 of file mss_sample.c.
References dttr_mss_wave_free(), NULL, mss_sample::pcm_frame_count, mss_sample::pcm_frames, and mss_sample::wave.
Referenced by free_sample_audio().
|
static |
Definition at line 106 of file mss_sample.c.
References mss_sample::audio, NULL, mss_sample::paused_by_rate, mss_sample::rendered_rate, and mss_sample::track.
Referenced by free_sample_audio(), and render_sample_audio().
Definition at line 339 of file mss_sample.c.
References DTTR_LOG_TRACE, dttr_mss_core_ensure_mixer(), DTTR_MSS_DEFAULT_MIXER_CHANNELS, NULL, reset_sample_slot(), and samples.
Definition at line 546 of file mss_sample.c.
References dttr_mss_ail_stop_sample().
Definition at line 379 of file mss_sample.c.
References DTTR_LOG_TRACE, free_sample_audio(), require_sample(), reset_sample_defaults(), and sample_slot().
Definition at line 363 of file mss_sample.c.
References DTTR_LOG_TRACE, free_sample_audio(), require_sample(), and sample_slot().
| int dttr_mss_ail_sample_playback_rate | ( | void * | sample_ptr | ) |
Definition at line 646 of file mss_sample.c.
References mss_sample::current_rate, DTTR_MSS_DEFAULT_RATE, and is_sample().
| int dttr_mss_ail_sample_status | ( | void * | sample_ptr | ) |
Definition at line 550 of file mss_sample.c.
References DTTR_MSS_STATUS_DONE, dttr_mss_track_status(), is_sample(), mss_sample::status, and mss_sample::track.
Definition at line 391 of file mss_sample.c.
References apply_sample_track(), mss_sample::audio, mss_sample::base_rate, mss_wave_info::bits_per_sample, mss_wave_info::channels, mss_sample::current_rate, mss_wave_info::data_size, DTTR_LOG_ERROR, DTTR_LOG_TRACE, dttr_mss_core_ensure_mixer(), dttr_mss_core_mixer(), dttr_mss_wave_parse(), dttr_mss_wave_rate(), dttr_mss_wave_riff_size(), mss_wave_info::format_tag, free_sample_audio(), is_sample(), load_sample_audio_from_memory(), load_sample_frames(), mss_sample::pcm_frame_count, mss_sample::pcm_frames, mss_sample::rate_overridden, mss_wave_info::sample_rate, sample_slot(), size, and mss_sample::track.
Definition at line 560 of file mss_sample.c.
References dttr_mss_loops_to_sdl(), mss_sample::loops, require_sample(), and mss_sample::track.
Definition at line 582 of file mss_sample.c.
References dttr_mss_track_apply_pan(), mss_sample::pan, require_sample(), and mss_sample::track.
Definition at line 592 of file mss_sample.c.
References apply_rate(), mss_sample::base_rate, mss_sample::current_rate, DTTR_LOG_TRACE, dttr_mss_sample_rate_pauses_playback(), DTTR_MSS_STATUS_PLAYING, mss_sample::paused_by_rate, mss_sample::pcm_frames, mss_sample::rate_overridden, render_sample_audio(), mss_sample::rendered_rate, require_sample(), sample_slot(), mss_sample::status, and mss_sample::track.
Definition at line 572 of file mss_sample.c.
References apply_sample_gain(), require_sample(), and mss_sample::volume.
Definition at line 483 of file mss_sample.c.
References apply_sample_track(), mss_sample::audio, mss_sample::current_rate, DTTR_LOG_ERROR, DTTR_LOG_TRACE, dttr_mss_loops_to_sdl(), DTTR_MSS_STATUS_PLAYING, dttr_mss_track_play(), mss_sample::loops, mss_sample::pan, mss_sample::paused_by_rate, mss_sample::pcm_frames, render_sample_audio(), require_sample(), sample_slot(), mss_sample::status, mss_sample::track, and mss_sample::volume.
Definition at line 530 of file mss_sample.c.
References DTTR_LOG_TRACE, require_sample(), sample_slot(), mss_sample::status, stop_sample(), and mss_sample::track.
Referenced by dttr_mss_ail_end_sample().
| void dttr_mss_sample_apply_master_gain | ( | ) |
Definition at line 329 of file mss_sample.c.
References apply_sample_gain(), DTTR_MSS_DEFAULT_MIXER_CHANNELS, and samples.
Referenced by dttr_mss_ail_set_digital_master_volume().
| void dttr_mss_sample_shutdown_all | ( | ) |
Definition at line 312 of file mss_sample.c.
References DTTR_MSS_DEFAULT_MIXER_CHANNELS, free_sample_audio(), and samples.
Referenced by dttr_mss_sdl_shutdown().
| void dttr_mss_sample_stop_all | ( | ) |
Definition at line 319 of file mss_sample.c.
References DTTR_MSS_DEFAULT_MIXER_CHANNELS, samples, and stop_sample().
Referenced by run_guarded_audio_hook().
|
static |
Definition at line 127 of file mss_sample.c.
References clear_sample_wave(), destroy_sample_audio_object(), NULL, and mss_sample::track.
Referenced by dttr_mss_ail_init_sample(), dttr_mss_ail_release_sample_handle(), dttr_mss_ail_set_sample_file(), and dttr_mss_sample_shutdown_all().
|
static |
Definition at line 72 of file mss_sample.c.
References mss_sample::allocated, DTTR_MSS_DEFAULT_MIXER_CHANNELS, mss_sample::magic, SAMPLE_MAGIC, and samples.
Referenced by dttr_mss_ail_sample_playback_rate(), dttr_mss_ail_sample_status(), dttr_mss_ail_set_sample_file(), and require_sample().
|
static |
Definition at line 170 of file mss_sample.c.
References mss_sample::audio, mss_sample::base_rate, DTTR_LOG_ERROR, dttr_mss_core_mixer(), mss_sample::rendered_rate, and size.
Referenced by dttr_mss_ail_set_sample_file().
|
static |
Definition at line 147 of file mss_sample.c.
References dttr_mss_wave_decode_f32(), dttr_mss_wave_free(), mss_wave_info::frame_count, NULL, mss_sample::pcm_frame_count, mss_sample::pcm_frames, size, and mss_sample::wave.
Referenced by dttr_mss_ail_set_sample_file().
|
static |
Definition at line 211 of file mss_sample.c.
References mss_sample::audio, mss_wave_info::channels, mss_sample::current_rate, destroy_sample_audio_object(), DTTR_LOG_ERROR, dttr_mss_core_mixer(), dttr_mss_core_mixer_spec(), dttr_mss_core_sample_preemphasis(), DTTR_MSS_MIXER_RATE, free, mixer_spec, mss_sample::pcm_frame_count, mss_sample::pcm_frames, mss_sample::rendered_rate, mss_sample::track, and mss_sample::wave.
Referenced by dttr_mss_ail_set_sample_playback_rate(), and dttr_mss_ail_start_sample().
|
static |
Definition at line 83 of file mss_sample.c.
References is_sample(), and NULL.
Referenced by dttr_mss_ail_init_sample(), dttr_mss_ail_release_sample_handle(), dttr_mss_ail_set_sample_loop_count(), dttr_mss_ail_set_sample_pan(), dttr_mss_ail_set_sample_playback_rate(), dttr_mss_ail_set_sample_volume(), dttr_mss_ail_start_sample(), and dttr_mss_ail_stop_sample().
|
static |
Definition at line 57 of file mss_sample.c.
References mss_sample::base_rate, mss_sample::current_rate, dttr_mss_core_ensure_preferences(), dttr_mss_core_get_preference(), DTTR_MSS_DEFAULT_LOOP_COUNT, DTTR_MSS_DEFAULT_PAN, DTTR_MSS_DEFAULT_RATE, DTTR_MSS_DEFAULT_VOLUME, DTTR_MSS_PREF_DIG_DEFAULT_VOLUME, DTTR_MSS_STATUS_DONE, mss_sample::loops, mss_sample::pan, mss_sample::paused_by_rate, mss_sample::rate_overridden, mss_sample::status, and mss_sample::volume.
Referenced by dttr_mss_ail_init_sample(), and reset_sample_slot().
|
static |
Definition at line 137 of file mss_sample.c.
References mss_sample::allocated, mss_sample::magic, reset_sample_defaults(), and SAMPLE_MAGIC.
Referenced by dttr_mss_ail_allocate_sample_handle().
|
static |
Definition at line 79 of file mss_sample.c.
References samples.
Referenced by dttr_mss_ail_init_sample(), dttr_mss_ail_release_sample_handle(), dttr_mss_ail_set_sample_file(), dttr_mss_ail_set_sample_playback_rate(), dttr_mss_ail_start_sample(), and dttr_mss_ail_stop_sample().
|
static |
Definition at line 202 of file mss_sample.c.
References DTTR_MSS_STATUS_STOPPED, mss_sample::paused_by_rate, mss_sample::status, and mss_sample::track.
Referenced by dttr_mss_ail_stop_sample(), and dttr_mss_sample_stop_all().
|
static |
Definition at line 33 of file mss_sample.c.
Referenced by is_sample(), and reset_sample_slot().
|
static |
Definition at line 35 of file mss_sample.c.
Referenced by create_msaa_fbo(), dttr_mss_ail_allocate_sample_handle(), dttr_mss_sample_apply_master_gain(), dttr_mss_sample_shutdown_all(), dttr_mss_sample_stop_all(), is_sample(), and sample_slot().