Repository navigation
Add #import music / #import sound and lib/audio.s - #70
Merged
Merged
Conversation
Compile-time audio imports emit CHIP DATA_C fragments and aggregated music_table/sfx_table; validator treats labels as const IDs. HAS-ABI wrappers in audio.s wrap ptplayer; docs and regression example included. Co-authored-by: Piotr Rozentreter <rozensoftware@users.noreply.github.com>
vasm resolves incbin relative to the main source file, not INCLUDEd fragments, so relative paths from build/gen broke assembly. Also add an IFF 8SVX #import sound regression fixture. Co-authored-by: Piotr Rozentreter <rozensoftware@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes Amiga audio as convenient as graphics assets: compile-time
#import music/#import sound, plus HAS-ABI wrappers inlib/audio.sover ptplayer.Author experience
What landed
#import music— ProTracker.mod→ CHIPDATA_Cfragment + const track ID#import sound—.raw/.iff/.8svx(viatools/extract_8svx.py) → CHIP sample +sfx_tableentry; optionsperiod/vol/pri/channelmusic_table+sfx_tablewhenever any audio import is presentlib/audio.s—InitAudio,QuitAudio,PlayMusic,ChangeMusic,StopMusic,PauseMusic,ResumeMusic,PlaySound,SetMusicVolume(frame pointer preserved when usinga6=CUSTOM)audio.s→ptplayer.simport_audio_load_test.has,import_audio_iff_test.hasValidation
68000/68020) of audio import testsvasmm68k_motassemble of generated.s,lib/audio.s,lib/ptplayer.stests/test_import_directive.py— 30 passed#import soundpath verifiedNotes
aslabels are integer constants (table indices), not&pointersincbinpaths are absolute so vasm can find assets when fragments areINCLUDEd from another directory