Mercurial > hg > dmlib
comparison jssmix.c @ 227:b7e23d91a8c2
Add jvmReset() function for reseting channel's position and pitch.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 08 Oct 2012 01:44:34 +0300 |
parents | dc22e3f77c9a |
children | 1e89cd081956 |
comparison
equal
deleted
inserted
replaced
226:725ac9d4962f | 227:b7e23d91a8c2 |
---|---|
493 mixer->channels[channel].chPlaying = FALSE; | 493 mixer->channels[channel].chPlaying = FALSE; |
494 JSS_UNLOCK(mixer); | 494 JSS_UNLOCK(mixer); |
495 } | 495 } |
496 | 496 |
497 | 497 |
498 void jvmReset(JSSMixer * mixer, const int channel) | |
499 { | |
500 JSSChannel *c; | |
501 | |
502 JSS_LOCK(mixer); | |
503 c = &mixer->channels[channel]; | |
504 | |
505 c->chDirection = TRUE; | |
506 c->chPos.dw = c->chDeltaO.dw = 0; | |
507 | |
508 JSS_UNLOCK(mixer); | |
509 } | |
510 | |
511 | |
498 void jvmSetSample(JSSMixer * mixer, const int channel, | 512 void jvmSetSample(JSSMixer * mixer, const int channel, |
499 void *data, const Sint32 size, const Sint32 loopS, | 513 void *data, const Sint32 size, const Sint32 loopS, |
500 const Sint32 loopE, const int flags) | 514 const Sint32 loopE, const int flags) |
501 { | 515 { |
502 JSSChannel *c; | 516 JSSChannel *c; |