Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void audioChangeSrc(int ch, const signed char *src, unsigned int len, unsigned int loop_end, unsigned int loop_len)
- {
- if (loop_len >= 4) /* 2 is the same as no loop on Amiga */
- {
- if (v[ch].index > (signed)loop_end)
- {
- v[ch].index -= loop_len;
- }
- v[ch].loop_end = loop_end;
- v[ch].loop_len = loop_len;
- }
- else
- {
- if (v[ch].index > (signed)len)
- {
- v[ch].index = 0;
- }
- v[ch].loop_end = 0;
- v[ch].loop_len = 0;
- }
- v[ch].data = src;
- v[ch].len = len;
- if (v[ch].frac > v[ch].rate)
- {
- v[ch].frac = v[ch].rate;
- }
- return;
- }
- void audioSetSource(int ch, const signed char *src, unsigned int len, unsigned int loop_end, unsigned int loop_len)
- {
- v[ch].data = src;
- v[ch].len = len;
- v[ch].index = 0;
- v[ch].frac = 0;
- v[ch].loop_end = loop_end;
- v[ch].loop_len = loop_len;
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement