Displaying 1 result from an estimated 1 matches for "audiostaletim".
Did you mean:
audiostaletime
2010 Aug 15
2
Beginner Hurdles
...turn the buffer time from the
last call, which was the start of the buffer
audiobuf_time = ((double) audiobuf_granulepos)/vi.rate;
audiobuf_granulepos += (*numBytes/2)/2; // a granule is a left/right
stereo pair, so the [size in bytes divided by 16 bits (2 bytes)
divided by stereo (2 chans)]
*audioStaleTime = audiobuf_time;
As far as I can tell, this results in proper syncing but I could be
off a frame and not know it...
5. player_example.c is much too complicated. Now that my code is
finished, this is my draw loop. Under the hood, I'm using an RGBA
texture in OpenGL and a buffered soun...