Page 159 of 299

Re: lekt player

Posted: Fri Aug 01, 2014 8:57 am
by goon-heaven
buffer size: 133
wasapi buffer pointer1: 0x0000004A6C255F80
buffer size: 133
wasapi buffer pointer1: 0x000000A313AE5F80

buffer size: 160
wasapi buffer pointer1: 0x0000004835905F80
buffer size: 160
wasapi buffer pointer1: 0x000000D1E4E95F80

buffer size: 244
wasapi buffer pointer1: 0x0000007BB7F45F80
buffer size: 244
wasapi buffer pointer1: 0x00000019A7925F80

buffer size: 256
wasapi buffer pointer1: 0x000000C9AEA85F80
buffer size: 256
wasapi buffer pointer1: 0x00000097E0E15F80

buffer size: 288
wasapi buffer pointer1: 0x0000003967B35F80
buffer size: 288
wasapi buffer pointer1: 0x000000B0D19C5F80

Re: lekt player

Posted: Fri Aug 01, 2014 10:01 am
by lekt
OK, stable, system don't changed low base address.
my size 256 give 0x...0C00, size 512 give 0x...0000, very good with lekt's method. SQ much better. in code only need assign =1; =2; ...;=255; no need calculation by XOR. maybe try set system RAM 4GB, not sure. maybe coz OS version. think your is win8.1?

v2.97 160 shared for me, you and JC. can make special version for your 0x...5F80 coz your system have stability, always 5F80.

Re: lekt player

Posted: Fri Aug 01, 2014 10:09 am
by goon-heaven
OS: Server 2012 R2

5F80 version - Yes please!

Re: lekt player

Posted: Fri Aug 01, 2014 12:19 pm
by jesuscheung
lekt wrote: my size 256 give 0x...0C00, size 512 give 0x...0000, very good with lekt's method. SQ much better. in code only need assign =1; =2; ...;=255; no need calculation by XOR. maybe try set system RAM 4GB, not sure...
i have set set system to 4GB (msconfig -> 4GB)

buffer size: 288
wasapi buffer pointer1: 0x000000F80C3C6240

same...

what other things might change pointer address?

Re: lekt player

Posted: Fri Aug 01, 2014 12:19 pm
by sbgk
lekt wrote:
sbgk wrote:I can't get it to work without getbuffer and releasebuffer, how is the event getting reset if you don't use these ?
unsigned char i=0;
getbuffer(...,160,&d);
releasebuffer(...,160,2);
d+=640;
AvSetMmThreadCharacteristicsA(...);
Start(...)

loop:
WaitForSingleObject(h,0xFFFFFFFF);
loaddata(d,...);
i^=1;
if(i>0)d-=640;else d+=640;
goto loop;

works for my laptop onboard souncard, but don't work for JC. will try fix, maybe bug in code. v2.97 use normally procedure (with getbuffer and releasebuffer in render loop).
is this better ? get's rid of the if then else. Also use waitforsingleobjectex.

x=-640

loop:
WaitForSingleObject(h,0xFFFFFFFF);
loaddata(d,...);

d+=x;
x=x*-1;
goto loop

Re: lekt player

Posted: Fri Aug 01, 2014 12:52 pm
by jesuscheung
does ? : sound better than if then else?

Re: lekt player

Posted: Fri Aug 01, 2014 1:08 pm
by sbgk
jesuscheung wrote:does ? : sound better than if then else?
cpu doesn't like branches, especially one where 50% it is one way and 50% the other, so depends on what sound your looking for.

Re: lekt player

Posted: Fri Aug 01, 2014 1:42 pm
by jesuscheung
sbgk wrote:
jesuscheung wrote:does ? : sound better than if then else?
cpu doesn't like branches, especially one where 50% it is one way and 50% the other, so depends on what sound your looking for.
oh ic!
if(i>0)d-=640;else d+=640;
how about this:
d += ((i<0) - (i>0)) * 640;

Re: lekt player

Posted: Fri Aug 01, 2014 1:46 pm
by jesuscheung
i see why assembly code is needed for audio... getting sign of a number is complex already

Re: lekt player

Posted: Fri Aug 01, 2014 2:11 pm
by sbgk
jesuscheung wrote:i see why assembly code is needed for audio... getting sign of a number is complex already
you don't need to work out the sign, just multiply x by -1 each loop and add to d

loop1 d=0, x=640
loop2 d=640, x=-640
loop3 d=0, x=640

etc