Echo 1.5
Posted: Sun Jul 23, 2017 6:37 am
Here comes another upgrade ( ゚-゚) (amusingly, the blob is smaller than 1.4)
https://github.com/sikthehedgehog/echo
WARNING IF YOU WERE USING ECHO 1.4: the ABI for Echo_SetVolumeEx has been changed to expect 16 bytes instead of 13. Currently the extra bytes are ignored anyway, but you should consider updating your code (just fill the extra bytes with zeroes).
And now for the updates:
Pausing music
It only took seven years! :v
Echo_PauseBGM will pause the BGM stream, Echo_ResumeBGM will resume it (d'oh). And this time it works. Note that only BGM is affected: the SFX and direct streams will keep playing as usual.
Synchronization flags
New to Echo 1.5 are flags that can be used to synchronize between the 68000 and music (since timing isn't 100% precise and it's just better to insert clues into music instead of hardcoding them). Two new events ($FAxx and $FBxx) are used to change the flags from the Z80 side, while three new functions (Echo_GetFlags, Echo_SetFlags, Echo_ClearFlags) are used to manipulate them from the 68000 side.
Looping SFXs
Now sound effects can loop. Dunno, it was requested. If you play such a sound effect then you need to stop it manually (either directly with Echo_StopSFX or indirectly by calling Echo_PlaySFX again).
Another command slot
Now the 68000 can send up to two commands (instead of one) before having to wait for Echo to process them. Probably useful for when you want to send a BGM and a SFX command at the same time, though it's up to you. Note that direct streams have their own mechanism so they aren't affected by any of this.
https://github.com/sikthehedgehog/echo
WARNING IF YOU WERE USING ECHO 1.4: the ABI for Echo_SetVolumeEx has been changed to expect 16 bytes instead of 13. Currently the extra bytes are ignored anyway, but you should consider updating your code (just fill the extra bytes with zeroes).
And now for the updates:
Pausing music
It only took seven years! :v
Echo_PauseBGM will pause the BGM stream, Echo_ResumeBGM will resume it (d'oh). And this time it works. Note that only BGM is affected: the SFX and direct streams will keep playing as usual.
Synchronization flags
New to Echo 1.5 are flags that can be used to synchronize between the 68000 and music (since timing isn't 100% precise and it's just better to insert clues into music instead of hardcoding them). Two new events ($FAxx and $FBxx) are used to change the flags from the Z80 side, while three new functions (Echo_GetFlags, Echo_SetFlags, Echo_ClearFlags) are used to manipulate them from the 68000 side.
Looping SFXs
Now sound effects can loop. Dunno, it was requested. If you play such a sound effect then you need to stop it manually (either directly with Echo_StopSFX or indirectly by calling Echo_PlaySFX again).
Another command slot
Now the 68000 can send up to two commands (instead of one) before having to wait for Echo to process them. Probably useful for when you want to send a BGM and a SFX command at the same time, though it's up to you. Note that direct streams have their own mechanism so they aren't affected by any of this.