am interested in what you've been doing with conversion of getbuffer and releasebuffer to c, would you be prepared to share some info ? Is there anything from MQn you'd be interested in in exchange - hirez formats, assembly code etc ?
how many tricks i've used in C native code for lekt.exe, now C code is going to near limited SQ. need make player by assembly or embed assembly into C. tried embed some testing simple assembly code but can not compile to .exe, hehe... my knowledge about MASM ~zero now. need time to learning it.
i think my C code now easy transfer to assembly, all things used by integer numbers, no object, no C interface. already to assembly, even all needed wasapi manipulations.
"...what you've been doing with conversion of getbuffer and releasebuffer to c"
i can share to you some ideas, maybe usefull for mqn code:
from CoCreateInstance(...) to last wasapi ReleaseBuffer(...) function: need working with (and only) function pointers, i use unsigned __int64 or unsigned long long. no C++/C object and its interface coz they slowly run and make sound not clean. one month i've manually searching their memory pointer/address, like as hacker, as JC said about me. haha...
OK, we with you will do some interested exchange. i will send message to you. thanks, sbgk.
ok, that's good news. I thought you'd broken the getbuffer and releasebuffer function down to the code below. MQn handles the pointers by storing them in registers, so there are no variables in memory.
existing many tricks with code. im thinking how intergrate to release version idea as follow:
in each working session of windows almost wasapi function pointers are constants, fixed 64bit integer number. try test them by printf(), sbgk.
after windows restaring these numbers have changed, but low part of pointer still constant, think for 4gb, 8gb, 16gb RAM they are different but constants for each laptop/PC. not sure, in my case always constant. so then i builded for me version with function calls by only constant pointers. very interesting, of course SQ much better. try make own mqn for you.
how intergrate this idea to release version for people. maybe store them into binary file or windows registry and get them once time but result will be variable. can get benefit but not much. hmm...
here is the render assembly code, all function pointers, immediates, etc are held in registers, suppose [imp_WaitForSingleObjectEx] should also be in a register.
can't see any point in hardcoding the pointer values, they still need to go into a register at some stage. The thing to avoid is having the pointer in memory. For the buffer register I just add or subtract 1024 to it depending on which buffer is current.
ie
sub r12, rbx ; 400010D9 _ 4C: 2B. E3
neg rbx ; 400010E3 _ 48: F7. DB
not easy understand algorithm that's you posted, but i think your assembly render loop already OK, MQn always give perfect vibration comparing with other players writen by C code.
i feel soundstage/weight... and some factors maybe still have little issues. maybe read file method, get wasapi COM function pointers method still affect to sound. what code do you perform these tasks? assembly or C++, C ?
will transfer my code working with wasapi to more understandly and share to you later, maybe interested. now variables named only one letter a,b,c x,y,z... in code. even difficult read for me.
my laptop onboard sound card works with render loop without getbuffer and releasebuffer in loop, but JC can't use this version. will try again for his.
big result, much reduced latency. prefer this trick, but only i can use. why doesn't work in PCIe soundcard, not sure.
lekt wrote:not easy understand algorithm that's you posted, but i think your assembly render loop already OK, MQn always give perfect vibration comparing with other players writen by C code.
i feel soundstage/weight... and some factors maybe still have little issues. maybe read file method, get wasapi COM function pointers method still affect to sound. what code do you perform these tasks? assembly or C++, C ?
will transfer my code working with wasapi to more understandly and share to you later, maybe interested. now variables named only one letter a,b,c x,y,z... in code. even difficult read for me.
my laptop onboard sound card works with render loop without getbuffer and releasebuffer in loop, but JC can't use this version. will try again for his.
big result, much reduced latency. prefer this trick, but only i can use. why doesn't work in PCIe soundcard, not sure.
removing getbuffer and release would be good, do you replace them with something else ? I found some code that someone had written to replace these on osx so it could run windows, can send a link if I can find it.
do you massage the data ? Is that what the fibonacci comment is about ?
the player has no file read code, the control starts the player, the player allocates memory and the control gets the address of the memory then loads it with data and then hands off to the player. communication by reading bytes in the allocated memory ie when =1 then the data is loaded and the playback can start. it's c++, but with minimised winmaincrtstartup and no dll linking. when I had the file code in the player I did convert it to c functions, but never compiled the whole thing as c, would be interested to know how to do that.
2.96.2 nos is actually goood
near zero earaches...
most relax and casual of all lekt, i think
can play jazz, relaxing happy music
cannot play rock... weight not enough
add this my new favorite
Last edited by jesuscheung on Fri Jul 18, 2014 11:15 am, edited 1 time in total.