1
0
mirror of https://github.com/sjlongland/atinysynth.git synced 2025-09-13 10:03:15 +10:00

adsr: Add test for "ADSR done" event.

This commit is contained in:
Stuart Longland 2017-04-09 10:06:11 +10:00
parent 093b6dd888
commit 5855eb3da0
Signed by: stuartl
GPG Key ID: F954BBBB7948D546

8
adsr.h
View File

@ -104,6 +104,14 @@ static inline void adsr_config(struct adsr_env_gen_t* const adsr,
* Compute the ADSR amplitude
*/
uint8_t adsr_next(struct adsr_env_gen_t* const adsr);
/*!
* Test to see if the ADSR is done.
*/
static inline uint8_t adsr_is_done(struct adsr_env_gen_t* const adsr) {
return (adsr->state == ADSR_STATE_DONE);
}
#endif
/*
* vim: set sw=8 ts=8 noet si tw=72