In Reply to: RE: Linux Build? posted by SBGK on February 18, 2013 at 13:41:01:
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
loop1644:
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.
http://mqnplayer.blogspot.co.uk/
This post is made possible by the generous support of people like you and our sponsors:
Follow Ups
- RE: Linux Build? - SBGK 13:05:20 02/21/13 (41)
- RE: Linux Build? - SBGK 12:25:23 03/03/13 (40)
- RE: Linux Build? - SBGK 10:47:53 03/07/13 (30)
- RE: Linux Build? - SBGK 05:54:30 03/10/13 (29)
- RE: Linux Build? - SBGK 17:28:29 03/10/13 (28)
- RE: Linux Build? - SBGK 16:33:49 03/11/13 (27)
- RE: Linux Build? - SBGK 16:37:56 03/11/13 (26)
- RE: Linux Build? - SBGK 14:52:44 03/13/13 (25)
- RE: Linux Build? - SBGK 16:13:00 03/14/13 (24)
- RE: Linux Build? - SBGK 05:25:06 03/24/13 (23)
- RE: Linux Build? - SBGK 05:37:15 03/24/13 (22)
- Repost - jrling 10:56:32 03/24/13 (21)
- RE: Repost - SBGK 09:41:26 03/26/13 (19)
- RE: Repost - SBGK 11:03:40 03/26/13 (18)
- RE: Repost - SBGK 13:20:37 03/26/13 (17)
- RE: Repost - SBGK 00:15:21 03/28/13 (16)
- RE: Repost - jupabe 06:04:25 03/28/13 (15)
- RE: Repost - SBGK 06:29:24 03/30/13 (14)
- RE: Repost - jupabe 12:07:28 03/30/13 (13)
- RE: Repost - SBGK 23:01:20 04/01/13 (11)
- MQn v 14 / Flac play - SBGK 13:25:18 04/07/13 (10)
- RE: MQn v 14 / Flac play - SBGK 15:01:49 04/10/13 (9)
- RE: MQn v 14 / Flac play - SBGK 17:02:32 04/17/13 (8)
- RE: MQn v 14 / Flac play - SBGK 13:58:13 04/22/13 (7)
- RE: MQn v 14 / Flac play - SBGK 12:19:27 04/23/13 (6)
- MQn v 47 - SBGK 13:05:41 05/07/13 (5)
- RE: MQn v 47 - SBGK 13:35:05 05/21/13 (4)
- RE: MQn v 47 - SBGK 22:22:05 05/26/13 (3)
- RE: MQn v 79 - SBGK 12:13:39 05/28/13 (2)
- RE: MQn v 79 - jupabe 23:55:00 05/29/13 (1)
- RE: MQn v 80 - SBGK 15:14:03 05/30/13 (0)
- RE: Repost - SBGK 12:43:30 03/30/13 (0)
- RE: Repost - SBGK 16:10:11 03/25/13 (0)
- RE: Linux Build? - jupabe 02:59:45 03/04/13 (8)
- RE: Linux Build? - SBGK 13:16:39 03/04/13 (7)
- RE: Linux Build? - jupabe 13:59:00 03/04/13 (6)
- RE: Linux Build? - SBGK 14:46:51 03/04/13 (4)
- RE: Linux Build? - SBGK 15:04:44 03/04/13 (3)
- RE: Linux Build? - jupabe 23:19:08 03/04/13 (2)
- RE: Linux Build? - SBGK 00:24:41 03/05/13 (1)
- RE: Linux Build? - jupabe 06:40:43 03/05/13 (0)
- RE: Linux Build? - SBGK 14:22:01 03/04/13 (0)