Home Computer Audio Asylum

Music servers and other computer based digital audio technologies.

RE: Linux Build?

Supposed to be getting gapless working, but got sidetracked on memory types and usage. Have settled on using virtualalloc to allocate the memory as it aligns it to page size - 4096k, I then hard coded the periods so that the buffers would align with the pagesize, also means they are 128bit aligned. Sounds pretty good.

The final render loop looks like this eg for 16/44.1


WaitForSingleObject(hNeedDataEvent, INFINITE);
hr = pAudioRenderClient->ReleaseBuffer(256, 0);
hr = pAudioRenderClient->GetBuffer(256, &pData);
A_memcpy (pData, sound_buffer += 1024, 1024);

goto loop1644;

Makes quite a difference to the sound having the buffer and frame sizes hard coded rather than being variables. Goto also sounds better than anything else I have tried. an exception is thrown when it reads past the end of the buffer and the program quits.


This post is made possible by the generous support of people like you and our sponsors:
  Kimber Kable  

Follow Ups Full Thread
Follow Ups


Post a Message!

Forgot Password?
Moniker (Username):
Password (Optional):
  Remember my Moniker & Password  (What's this?)    Eat Me
E-Mail (Optional):
Message:   (Posts are subject to Content Rules)
Optional Link URL:
Optional Link Title:
Optional Image URL:
Upload Image:
E-mail Replies:  Automagically notify you when someone responds.