Fixed left/right stereo channels -- they were reversed by default.

This commit is contained in:
Bart Trzynadlowski 2012-02-09 17:12:13 +00:00
parent c5d0cb0d97
commit 09f9bd81fd
2 changed files with 14 additions and 3 deletions

View file

@ -201,16 +201,16 @@ static void MixChannels(unsigned numSamples, INT16 *leftBuffer, INT16 *rightBuff
{
for (unsigned i = 0; i < numSamples; i++)
{
*p++ = rightBuffer[i];
*p++ = leftBuffer[i];
*p++ = rightBuffer[i];
}
}
else // stereo as God intended!
{
for (unsigned i = 0; i < numSamples; i++)
{
*p++ = leftBuffer[i];
*p++ = rightBuffer[i];
*p++ = leftBuffer[i];
}
}
#endif // NUM_CHANNELS

View file

@ -24,6 +24,11 @@
*
* Main program driver for the SDL port.
*
* To Do Before Next Release
* -------------------------
* - Add UI keys for balance setting?
* - 5.1 audio support?
*
* Compile-Time Options
* --------------------
* - SUPERMODEL_WIN32: Define this if compiling on Windows.
@ -201,7 +206,13 @@ static bool CreateGLScreen(const char *caption, unsigned *xOffsetPtr, unsigned *
glLoadIdentity();
gluPerspective(90.0,(GLfloat)xRes/(GLfloat)yRes,0.1,1e5);
glMatrixMode(GL_MODELVIEW);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); // clear at least once to ensure black border
// Clear the screen to ensure black border
for (int i = 0; i < 2; i++)
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
SDL_GL_SwapBuffers();
}
// Write back resolution parameters
*xResPtr = (unsigned) xRes;