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:
parent
093b6dd888
commit
5855eb3da0
8
adsr.h
8
adsr.h
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user