summaryrefslogtreecommitdiff
path: root/src/code/audio_playback.c
AgeCommit message (Collapse)Author
2023-07-06Reorganize Audio Files & Name Remaining Audio Files (#1494)engineer124
* reorganize audio files * audio code files * split audio and libaudio * audio_init_params to audio_configuration * simplify file names * move aisetnextbuf to libaudio * move src/audio -> src/code/audio * adjust makefile comment * reorganize again into internal/external * adjust comment * restructure again
2022-10-07rename audio context (#1388)engineer124
2022-08-28Document the Haas Effect (#1302)engineer124
* Document Haas Effect * More docs * cleanup * add comments * Adjust comment * More cleanup * Fix * Add description of the Haas Effect * roman suggestion
2022-07-04Audio Misc Cleanup 2 (#1303)engineer124
* Misc cleanup * PR Suggestions
2022-07-04Introduce Mutebehavior Flags (#1304)engineer124
* Add muteBehavior flags * touchup * Adjust comment
2022-06-24Document File-Select Audio Settings: Sound Modes (#1281)engineer124
* Round 1 * Cleanup * Cleanup * Space * More spacing * Apply -> Set (consistency) * round 1 pr * Revert some names
2022-06-21audio_seqplayer.c cleanup (#1274)engineer124
* Audio Seqplayer Cleanup * More * Edit description * PR Suggestions * while true * Cleanup function declarations * Extra space, oops * Small fix * PR Suggestions * tatums per beat * Edit comment
2022-06-20Synthetic Waves Documentation (#1256)engineer124
* Synthetic wave documentation * Better docs * harmonicIndex * More * typo * Complete the abi buffer docs * Small change * Revert change * PR suggestions * Missed one * PR Feedback * Better documents * Well that was a silly copy-pasta mistake * Typo * Another comment * Plural * Make it more block-like * Capitalization * Add comments for gWaveSamples[8] * Adjust comment * More PR Suggestions * PR Suggestions * missed a phrasing * PR Suggestions * Update include/z64audio.h Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-06-19Restructuring SoundFont Structs (#1277)engineer124
* Document fontData relocation * Fix * More cleanup * typo * sample -> sampleHeader * Revert name * Just a little more * Another comment change * Fix Drum * fix * K0BASE * Update relocs * consistency * clearer phrasing * Fix * PR/Discord Suggestions * typo * Revert Sound Font Sample Struct for another PR * Missed a function * Organize structs, tuned samples * New sound effects struct * fix func name * wave samples * consistency * Fix * More suggestions * PR Suggestions * sample bank reloc * Revert header description * better text * SoundFount Relocation: some cleanup (#6) * `fontDataStartAddr` for relocation, `fontData` for reading data (`AudioLoad_RelocateFont`) * Comment "cleanup" in `AudioLoad_RelocateFont` * Comment "cleanup" in `AudioLoad_RelocateSample` * Cleanup cast and compares to 0 (offsets) / NULL (pointers) * Cleanup * soundFont info * Revert waveSamples * cleanup * Plural * PR suggestions * A few name changes and suggestions * small changes * Drop Info on SoundFont * Missed some * One more function change Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-06-12Document SoundFont Relocation (#1237)engineer124
* Document fontData relocation * Fix * More cleanup * typo * sample -> sampleHeader * Revert name * Just a little more * Another comment change * Fix Drum * fix * K0BASE * Update relocs * consistency * clearer phrasing * Fix * PR/Discord Suggestions * typo * Revert Sound Font Sample Struct for another PR * Missed a function * PR Suggestions * sample bank reloc * Revert header description * better text * SoundFount Relocation: some cleanup (#6) * `fontDataStartAddr` for relocation, `fontData` for reading data (`AudioLoad_RelocateFont`) * Comment "cleanup" in `AudioLoad_RelocateFont` * Comment "cleanup" in `AudioLoad_RelocateSample` * Cleanup cast and compares to 0 (offsets) / NULL (pointers) * Cleanup * Edit comments * phrasing Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-06-04Cleanup NotePlaybackState (#1255)engineer124
* Audio Cleanup * more * missed one * Audio docs imported from MM * Suggestions from Discord * Small fix * Fix sizes in z64audio.h * numSamples * Cleanup comments * Revert overlap with soundFont PR * revert Audio_AdsrUpdate cleanup (move to different PR) * PR Suggestion * Mainly typos * PR suggestion, vol -> volume * Better description * Name sampling frequency * A good number of PR suggestions * Missed a suggestion * More PR Suggestions * Cleanup NotePlaybackState * one more * Add comments for new variable names * Reverb samplePosInt * Missed one * Remove `Always set to 0`
2022-06-03Audio Misc Docs and Cleanup (#1221)engineer124
* Audio Cleanup * more * missed one * Audio docs imported from MM * Suggestions from Discord * Small fix * Fix sizes in z64audio.h * numSamples * Cleanup comments * Revert overlap with soundFont PR * revert Audio_AdsrUpdate cleanup (move to different PR) * PR Suggestion * Mainly typos * PR suggestion, vol -> volume * Better description * Name sampling frequency * A good number of PR suggestions * Missed a suggestion * More PR Suggestions Co-authored-by: fig02 <fig02srl@gmail.com>
2022-05-29Audio Docs: Adsr Decay Rate (#1238)engineer124
* Init adsr decay docs * cleanup * cleanup * Revert some docs * Cleaner docs * count hex to dec * scaled updates per frame * Consistency * Oops, fix meaning * Avoid `decayRate` conflict with reverb `decayRate` * PR suggestion
2021-11-07Document parts of audio (#1000)zelda2774
* Minor labelling * progress * play percentage -> delay * duration -> gatetime * more * more * more * seqIdx -> playerIdx * more * more * more * more * format * fix comment * filters * more * media * confusion * Sync load is actually slow load * AudioHeap prefix * more * more * reformat * more * more * AudioLoad * more * more * seq banks * more consistent * more * name last function in audio_load * More audio_synthesis * clean up audio tables * minor * slow/fast load ramAddr * format * remove unused * Remove union * remove padding * audio bank -> sound font * seqLayer -> layer * stuff * seqChannel -> channel * ChannelLayer -> Layer * remove define, add bug comment * format * more * cache enum * more * AudioSeq function prefix * naming * bankIdx -> bankId * more * format * review * more * fixes * avoid hardcoded sfxid's * SE -> Sfx Co-authored-by: zelda2774 <zelda2774@invalid>
2021-11-01Clean up some float literals (#972)petrie911
* floats are fun * more cleanup * one more bit * format * merge kankyo * Update src/overlays/actors/ovl_En_Horse/z_en_horse.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Mm/z_en_mm.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2021-10-02Fix/cleanup/rephrase miscellaneous stuff (#983)Dragorn421
* Add parens around params usage in VEC_SET macro * Remove unnecessary space character in a xml * Use defines instead of magic values in head/tail magic comments * Use `OS_USEC_TO_CYCLES` to make a time look better in `Graph_TaskSet00` * `0x25800` -> `sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH])` * `0x803DA800` -> `0x80400000 - frame buffer size` * Use `OS_VI_` defines instead of hex * Add empty line after some variable declarations * Remove unused `extern CutsceneData` in `z_bg_dy_yoseizo.c` * `Matrix_MtxFToYXZRotS` does not use `MTXMODE_` * Use `MTXMODE_` more * Remove `ASCII_TO_U32`, use `'IS64'` * Add explicit `!= NULL` in some ternaries * Use `INV_CONTENT`, `AMMO` macros more * Use `PLAYER_AP_` enum more to compare to `Player#heldItemActionParam` * Get rid of lowercase hex (outside libultra) * `gWindMill*` -> `gWindmill*` * Format and small fix enums in `z_boss_mo.h` * Use `CHECK_BTN_ANY` more * Fix xz/xy mistake in comment in tektite * Rephrase comments mentioning "the devs" in a more neutral way * Clean-up some objectively useless parens * Fix some negative values written as u16 instead of s16 in ichains * `SKJ_ACTON_` -> `SKJ_ACTION_` * Run formatter * Fix unk_ offset of `TransformUpdateIndex#unk_10` -> `unk_0E` * Remove comments using in-game text * Remove `U` suffix from integer literals * Revert "Remove `ASCII_TO_U32`, use `'IS64'`" This reverts commit c801337dde9fe5e8b7a7ecf85ad3629bf5b87aaf. * Use `PLAYER_STR_*` to compare to `CUR_UPG_VALUE(UPG_STRENGTH)` * Add empty line after decl x2 * Revert "Use `PLAYER_STR_*` to compare to `CUR_UPG_VALUE(UPG_STRENGTH)`" This reverts commit d80bdb32da449edc74e02b8ab3f5a2c532e74bdb. * Make `CUR_UPG_VALUE(UPG_STRENGTH)` compare to integers (eventually needs its own enum) * Only use `PLAYER_SHIELD_` enum with `Player#currentShield` * Only use `PLAYER_TUNIC_` enum with `Player#currentTunic`
2021-08-31audio_synthesis OK + partially documented (#920)zelda2774
* Match func_800DDB64 * Match func_800DC910 * remove stack comments * Move nop padding to ucode_disas * Partially label audio_synthesis To some extent copied from sm64. * cleanup * Reverb and ReverbBits have nothing to do with reverbs * review * naming * Undo changes to permuter_settings.toml Co-authored-by: zelda2774 <zelda2774@invalid>
2021-07-27Audio WIP (#836)krimtonz
* being code_800EC960 * wip * wip * more audio progress * migrate data in code_800E11F0 * wip * make ok * remove asm * wip * move some variables outside of gAudioContext to the AudioContext structure due to the size used in func_800E3094 * more progress * wip * wip * split code_800E11F0 * migrate rodata in code_800E11F0 * match functions that couldn't because of data issues * move code_800E4FE0 asm files * wip * more wip * fix global functions, and forward declarations * wip * wip * wip * ocarina wip * match a couple functions * some progress * separate some bss * match func_800EDA3C * some matching * more matches * migrate audio rodata * some matches * more matchess * start on synthesis * work on synthesis * fix function declaration * Merge branch 'master' into audio * match a few more functions * wip * wip * more matching, rename Audio_SetBGM to Audio_QueueSeqCmd * name several audio functions, and audiocontext members * more naming, rename code_800E11F0 to audio_load, code_800DAAC0 to audio_synthesis * audio wip * match a few more functions. * wip * add missing NON_MATCHING directive * wip * some matching, data reogranization * match cursed function * wip * wip * formatting * remove prefix from struct memebers * missed function rename * review Co-authored-by: fig02 <fig02srl@gmail.com>
2021-02-13Fix most compiler warnings in the boot and code segments (#674)Tharo
* Less warnings in boot & code segments * few more warnings gone * Ran formatter * z_view warning gone * -> 1 * f31 -> 31 * Remove function casts * Few more small improvements * Separate declaration and assignment in func_80091738 and Item_Give Co-authored-by: Thar0 <maximilianc64@gmail.com>
2020-10-03libultra cleanup (#215)Random
* cleanup libultra * fixes - use quotes instead of <> for includes - add macros for zelda specific thread priorities - fix Makefile - properly format the remaining pfs structs * fix button macros + add CHECK_BTN_ANY/CHECK_BTN_ALL * remove ULTRA_ABS * fix includes * update z_player.c/z_lib.c + run format.sh * merge upstream/master * fix include in En_Goroiwa * fix includes
2020-09-20audio_heap: 1 non-matching (#381)zelda2774
* Audio_AllocDmaMemory * Audio_AllocDmaMemoryZeroed * func_800DE238 * Audio_SessionPoolsInit * func_800DE2B0 * func_800DE258 * Audio_DiscardSequence * Audio_DiscardBank * func_800DE12C * Audio_ResetLoadStatus * func_800DDE3C * func_800DDE20 * Audio_InitMainPools * Audio_SoundAllocPoolInit * Audio_PersistentPoolClear * Audio_TemporaryPoolClear * func_800DE4A0 * Audio_PersistentPoolsInit * Audio_TemporaryPoolsInit * Formatting * Audio_SeqAndBankPoolInit * Audio_Alloc * Audio_AllocZeroed * func_800DE4B0 * func_800DF0CC * func_800DF074 * func_800DF1D8 * func_800DF688 * func_800DF5DC, func_800DF630 * func_800DF7BC * func_800DF7C4 * func_800DF888 * Fix AudioBufferParameters * Audio_ResetStep * Struct work * oops * structsss * wip on func_800DFBF8 * func_800E04E8 * func_800E0540 * func_800E0964 * func_800E1148 * func_800DF5AC * func_800E0E6C * func_800E0E90 * func_800E0BF8 * func_800E0634 * func_800E05C4 * func_800E0CBC * func_800E0C80 * naming * func_800E0BB4 * func_800E0AD8 * func_800E0E0C * func_800E0EB4 * func_800E06CC * Audio_AllocBankOrSeq * Use true/false macros * fixup * Format * comments * review * unk instrument -> sfx * Reword comment * Change AVOID_UB to a comment Co-authored-by: zelda2774 <zelda2774@invalid>
2020-09-01audio_seqplayer, the easy half (#369)zelda2774
* func_800E9340 * Audio_SequenceChannelDisable * Audio_SeqChannelLayerFree * Audio_SeqChannelLayerDisable * Rename functions * Audio_SeqChannelSetLayer * Move gSequenceChannelNone into gAudioContext * Audio_SequenceChannelInit * Name functions * Audio_M64ReadU8 * Audio_M64ReadS16 * Audio_M64ReadCompressedU16 * Audio_AudioListPopBack * Audio_AudioListPushBack * Audio_InitLayerFreelist * Audio_SequencePlayerDisableAsFinished * incomplete Audio_SequencePlayerDisable * Audio_SequenceChannelEnable * Audio_SequencePlayerDisableChannels * Audio_SequencePlayerInitChannels * struct fixes * func_800E9ED8 * Name more functions * Audio_SequenceChannelSetVolume * Audio_SetInstrument * Audio_GetInstrument * confirm structs * Audio_ResetSequencePlayer * Audio_InitSequencePlayer * Audio_InitSequencePlayers * func_800EC734 * Find the right Audio_SoundAlloc * Prune functions.h * Move global vars into gAudioContext * func_800EAEF4 * Audio_SeqChannelLayerProcessScript * Audio_HandleScriptFlowControl * func_800E9F64 * func_800EA0C0 * func_800EA440 * func_800EAAE0 * unbreak audio_effects * Audio_ProcessSequence * Audio_ProcessSequences * Some audio_heap struct work and function naming * Audio_SequencePlayerDisable * ? instead of ! in z64audio.h * Revert makefile change * Formatting, player -> seqPlayerIndex * Index -> Idx Co-authored-by: zelda2774 <zelda2774@invalid>
2020-08-15audio_playback, audio_effects OK (#313)zelda2774
* audio_playback.c * format.sh * rename functions * Audio_SequenceChannelProcessSound * Audio_SequencePlayerProcessSound * Audio_GetPortamentoFreqScale * Audio_GetVibratoPitchChange * Audio_GetVibratoFreqScale * Audio_NoteVibratoInit, Audio_NoteVibratoUpdate * Audio_NotePortamentoInit * Audio_AdsrInit * Audio_AdsrUpdate * Common bitfield formatting * format.sh * review Co-authored-by: zelda2774 <zelda2774@invalid>
2020-06-13Fix various non matching issues and introduce #ifdef NON_EQUIVALENT instead ↵Roman971
of #if 0 (#207)
2020-05-19Improve and fix some non matchings (#148)Roman971
2020-05-14Match Audio_NoteSetVelPanReverb (#132)Synray
2020-04-28rename Matrix_TranslateThenRotateZYX to Matrix_RotateRPYf (#96)krimtonz
* rename Matrix_TranslateThenRotateZYX to Matrix_RotateRPYf * rename Matrix_RotateRPYf to Matrix_JointPosition * rename Matrix_RotateZYX to Matrix_RotateRPY
2020-04-21Decompile playback.c (#82)JoshDuMan
* Decompile playback.c * Remove rename_sym.sh * Fixed for loop in pop_node_... * Address krim's other issues * Remove rename_sym again * Address Roman's comments. * Fix build and remove rename_sym another time.