- simple bugfix for file xfer's
- added openal call to try to work around an openal bug on some platforms
This commit is contained in:
parent
c54174061f
commit
6eab8f905e
|
@ -55,9 +55,9 @@ FTPServerThread::FTPServerThread(std::pair<string,string> mapsPath,
|
||||||
this->mapsPath = mapsPath;
|
this->mapsPath = mapsPath;
|
||||||
this->tilesetsPath = tilesetsPath;
|
this->tilesetsPath = tilesetsPath;
|
||||||
this->techtreesPath = techtreesPath;
|
this->techtreesPath = techtreesPath;
|
||||||
setInternetEnabled(internetEnabledFlag,true);
|
|
||||||
this->allowInternetTilesetFileTransfers = allowInternetTilesetFileTransfers;
|
this->allowInternetTilesetFileTransfers = allowInternetTilesetFileTransfers;
|
||||||
this->allowInternetTechtreeFileTransfers = allowInternetTechtreeFileTransfers;
|
this->allowInternetTechtreeFileTransfers = allowInternetTechtreeFileTransfers;
|
||||||
|
setInternetEnabled(internetEnabledFlag,true);
|
||||||
this->portNumber = portNumber;
|
this->portNumber = portNumber;
|
||||||
this->maxPlayers = maxPlayers;
|
this->maxPlayers = maxPlayers;
|
||||||
this->ftpValidationIntf = ftpValidationIntf;
|
this->ftpValidationIntf = ftpValidationIntf;
|
||||||
|
|
|
@ -48,13 +48,21 @@ bool SoundSource::playing()
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoundSource::unQueueBuffers() {
|
void SoundSource::unQueueBuffers() {
|
||||||
int queued;
|
int processed;
|
||||||
alGetSourcei(source, AL_BUFFERS_QUEUED, &queued);
|
alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
|
||||||
while(queued--) {
|
SoundPlayerOpenAL::checkAlError("Problem unqueuing buffers (alGetSourcei AL_BUFFERS_PROCESSED) in audio source: ");
|
||||||
ALuint buffer;
|
|
||||||
alSourceUnqueueBuffers(source, 1, &buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
int queued;
|
||||||
|
alGetSourcei(source, AL_BUFFERS_QUEUED, &queued);
|
||||||
|
SoundPlayerOpenAL::checkAlError("Problem unqueuing buffers (alGetSourcei AL_BUFFERS_QUEUED) in audio source: ");
|
||||||
|
|
||||||
|
//if(processed < queued) {
|
||||||
|
while(queued--) {
|
||||||
|
ALuint buffer;
|
||||||
|
alSourceUnqueueBuffers(source, 1, &buffer);
|
||||||
|
SoundPlayerOpenAL::checkAlError("Problem unqueuing buffers (alSourceUnqueueBuffers) in audio source: ");
|
||||||
|
}
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoundSource::stop()
|
void SoundSource::stop()
|
||||||
|
@ -63,14 +71,12 @@ void SoundSource::stop()
|
||||||
|
|
||||||
alSourceStop(source);
|
alSourceStop(source);
|
||||||
|
|
||||||
SoundPlayerOpenAL::checkAlError("Problem stopping audio source: ");
|
SoundPlayerOpenAL::checkAlError("Problem stopping audio source (alSourceStop): ");
|
||||||
|
|
||||||
//SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
//SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
unQueueBuffers();
|
unQueueBuffers();
|
||||||
|
|
||||||
SoundPlayerOpenAL::checkAlError("Problem unqueuing buffers in audio source: ");
|
|
||||||
|
|
||||||
alSourcei(source, AL_BUFFER, AL_NONE);
|
alSourcei(source, AL_BUFFER, AL_NONE);
|
||||||
|
|
||||||
//SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
//SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user