X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=cl_video.c;h=4778c8189c4b57aed1c80c513ba8d7396185f03e;hb=105b92bbfd2a623a7bc6f59c4f7110c5b259c9b2;hp=58f367f4a60fcc2bb5a0c2403d062c8be5c7e9c1;hpb=a774e9a9b9adc5d230a1bb3ec8659593428b5366;p=xonotic%2Fdarkplaces.git diff --git a/cl_video.c b/cl_video.c index 58f367f4..4778c818 100644 --- a/cl_video.c +++ b/cl_video.c @@ -56,10 +56,10 @@ void CL_VideoFrame(void) } if (cl_videosoundrate && (samples = S_RawSamples_QueueWantsMore())) { - Con_Printf("%i = S_RawSamples_QueueWantsMore()\n", samples); + Con_DPrintf("%i = S_RawSamples_QueueWantsMore()\n", samples); // calculate how much source data we need to fill the output... - s = samples * cl_videosoundrate / shm->speed; + s = samples * cl_videosoundrate / S_RawSamples_SampleRate(); // reallocate processing buffer if needed if (cl_videosoundresamplelength < samples) @@ -116,7 +116,7 @@ void CL_DrawVideo(void) vertices[ 8] = x2;vertices[ 9] = y2;vertices[10] = 0;vertices[11] = 0; vertices[12] = x1;vertices[13] = y2;vertices[14] = 0;vertices[15] = 0; mesh.texture = cl_videotexture; - mesh.numindices = 6; + mesh.numtriangles = 2; mesh.numvertices = 4; mesh.indices = indices; mesh.vertices = vertices; @@ -159,7 +159,7 @@ void CL_VideoStart(char *filename) cl_videosoundresampledata = NULL; cl_videotexturepool = R_AllocTexturePool(); - cl_videotexture = R_LoadTexture(cl_videotexturepool, "videotexture", cl_videoimagewidth, cl_videoimageheight, NULL, TEXTYPE_RGBA, TEXF_FRAGMENT); + cl_videotexture = R_LoadTexture2D(cl_videotexturepool, "videotexture", cl_videoimagewidth, cl_videoimageheight, NULL, TEXTYPE_RGBA, TEXF_FRAGMENT, NULL); } void CL_VideoStop(void)