diff options
author | Takamichi Horikawa <takamichiho@gmail.com> | 2017-03-27 23:28:47 +0900 |
---|---|---|
committer | Takamichi Horikawa <takamichiho@gmail.com> | 2017-03-27 23:28:47 +0900 |
commit | c5a386c9e2cce061310f3660e4898218dabbec31 (patch) | |
tree | a031fb49765e3891a0f58427a051ea6ffeaabf2e /fmdriver/ppz8.h | |
parent | ed25c02966bf944aad480c11fefe34c0f46a728b (diff) |
PMD: add initial PPZ8 support
Diffstat (limited to 'fmdriver/ppz8.h')
-rw-r--r-- | fmdriver/ppz8.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fmdriver/ppz8.h b/fmdriver/ppz8.h index 6ced669..cb9a158 100644 --- a/fmdriver/ppz8.h +++ b/fmdriver/ppz8.h @@ -50,11 +50,18 @@ void ppz8_mix(struct ppz8 *ppz8, int16_t *buf, unsigned samples); bool ppz8_pvi_load(struct ppz8 *ppz8, uint8_t buf, const uint8_t *pvidata, uint32_t pvidatalen, int16_t *decodebuf); +bool ppz8_pzi_load(struct ppz8 *ppz8, uint8_t bnum, + const uint8_t *pzidata, uint32_t pzidatalen, + int16_t *decodebuf); static inline uint32_t ppz8_pvi_decodebuf_samples(uint32_t pvidatalen) { if (pvidatalen < 0x210) return 0; return (pvidatalen - 0x210) * 2; } +static inline uint32_t ppz8_pzi_decodebuf_samples(uint32_t pzidatalen) { + if (pzidatalen < 0x920) return 0; + return (pzidatalen - 0x920) * 2; +} struct ppz8_functbl { void (*channel_play)(struct ppz8 *ppz8, uint8_t channel, uint8_t voice); @@ -65,6 +72,8 @@ struct ppz8_functbl { uint32_t startoff, uint32_t endoff); void (*channel_pan)(struct ppz8 *ppz8, uint8_t channel, uint8_t pan); void (*total_volume)(struct ppz8 *ppz8, uint8_t vol); + void (*channel_loop_voice)(struct ppz8 *ppz8, uint8_t channel, uint8_t voice); + uint32_t (*voice_length)(struct ppz8 *ppz8, uint8_t voice); }; extern const struct ppz8_functbl ppz8_functbl; |