Mercurial > hg > dmlib
diff jssmix.c @ 36:f3407a58e01e
Change DMFixedPoint types and appropriate JSS functions back to using signed
integers, easier than trying to get unsigned sizes etc. to work properly in
audio mixing.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 29 Sep 2012 20:41:36 +0300 |
parents | 7908061da010 |
children | 033c660c25f5 |
line wrap: on
line diff
--- a/jssmix.c Sat Sep 29 20:33:27 2012 +0300 +++ b/jssmix.c Sat Sep 29 20:41:36 2012 +0300 @@ -27,8 +27,8 @@ int mixerID; int outFormat; int outChannels; - int (*jvmMixChannel_FW)(JSSMixer *, JSSChannel *, Sint32 *, const int, const Uint32); - int (*jvmMixChannel_BW)(JSSMixer *, JSSChannel *, Sint32 *, const int, const Uint32); + int (*jvmMixChannel_FW)(JSSMixer *, JSSChannel *, Sint32 *, const int, const Sint32); + int (*jvmMixChannel_BW)(JSSMixer *, JSSChannel *, Sint32 *, const int, const Sint32); void (*jvmPostProcess)(Sint32 *, void *, const int); } JSSMixingRoutine; @@ -502,8 +502,8 @@ void jvmSetSample(JSSMixer * mixer, const int channel, - void *data, const Uint32 size, const Uint32 loopS, - const Uint32 loopE, const int flags) + void *data, const Sint32 size, const Sint32 loopS, + const Sint32 loopE, const int flags) { JSSChannel *c; @@ -577,7 +577,7 @@ } -void jvmSetPos(JSSMixer * mixer, const int channel, const Uint32 pos) +void jvmSetPos(JSSMixer * mixer, const int channel, const Sint32 pos) { JSS_LOCK(mixer); FP_SETH(mixer->channels[channel].chPos, pos); @@ -586,9 +586,9 @@ } -Uint32 jvmGetPos(JSSMixer * mixer, const int channel) +Sint32 jvmGetPos(JSSMixer * mixer, const int channel) { - Uint32 tmp; + Sint32 tmp; JSS_LOCK(mixer); tmp = FP_GETH(mixer->channels[channel].chPos);