Commit fb267330 authored by Gerhard Stein's avatar Gerhard Stein

Cleanups, IMF Player improvements

parent b891f56d
......@@ -70,7 +70,7 @@ Audio::~Audio()
bool Audio::init()
{
gLogging.ftextOut("Starting the sound driver...<br>");
SDL_AudioSpec obtained;
//SDL_AudioSpec obtained;
// now start up the SDL sound system
mAudioSpec.silence = 0;
......@@ -79,7 +79,7 @@ bool Audio::init()
{
case 11025: mAudioSpec.samples = 256; break;
case 22050: mAudioSpec.samples = 512; break;
default: mAudioSpec.samples = 1024; break;
default: mAudioSpec.samples = 1024; break;
}
mAudioSpec.callback = CCallback;
mAudioSpec.userdata = nullptr;
......@@ -134,7 +134,7 @@ bool Audio::init()
<< (audio_channels>1?"stereo":"mono")
<< ", " << mAudioSpec.size << " bytes audio buffer.\n";
const unsigned int channels = 64;
const unsigned int channels = 32;
Mix_AllocateChannels(channels);
......
......@@ -161,7 +161,7 @@ void CIMFPlayer::OPLUpdate(byte *buffer, const unsigned int length)
for (unsigned int j=0; j<audioSpec.channels; j++)
{
*buffer = mix + audioSpec.silence;
*buffer = static_cast<byte>(mix + audioSpec.silence);
buffer++;
}
}
......@@ -202,7 +202,7 @@ void CIMFPlayer::readBuffer(Uint8* buffer,
if(m_numreadysamples < sampleslen)
{
// Every time a tune has been played call this.
//OPLUpdate( buffer, m_numreadysamples );
OPLUpdate( buffer, m_numreadysamples );
buffer += m_numreadysamples*sample_mult;
sampleslen -= m_numreadysamples;
m_IMFDelay = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment