Oops, buildfixes

This commit is contained in:
Henrik Rydgard 2014-06-22 14:23:06 +02:00
parent dc3806b700
commit 12cef8fa80
3 changed files with 7 additions and 4 deletions

View File

@ -85,7 +85,7 @@ void SimpleAudio::Init() {
return;
}
// Find decoder
codec_ = avcodec_find_decoder(audioCodecId);
codec_ = avcodec_find_decoder((AVCodecID)audioCodecId);
if (!codec_) {
// Eh, we shouldn't even have managed to compile. But meh.
ERROR_LOG(ME, "This version of FFMPEG does not support AV_CODEC_ctx for audio (%s). Update your submodule.", GetCodecName(audioType));
@ -118,7 +118,7 @@ bool SimpleAudio::ResetCodecCtx(int channels, int samplerate){
avcodec_close(codecCtx_);
// Find decoder
codec_ = avcodec_find_decoder(audioCodecId);
codec_ = avcodec_find_decoder((AVCodecID)audioCodecId);
if (!codec_) {
// Eh, we shouldn't even have managed to compile. But meh.
ERROR_LOG(ME, "This version of FFMPEG does not support AV_CODEC_ctx for audio (%s). Update your submodule.", GetCodecName(audioType));

View File

@ -27,7 +27,6 @@ struct AVFrame;
struct AVCodec;
struct AVCodecContext;
struct SwrContext;
enum AVCodecID;
// Wraps FFMPEG for audio decoding in a nice interface.
// Decodes packet by packet - does NOT demux.
@ -79,7 +78,7 @@ private:
AVCodec *codec_;
AVCodecContext *codecCtx_;
SwrContext *swrCtx_;
AVCodecID audioCodecId; // AV_CODEC_ID_XXX
int audioCodecId; // AV_CODEC_ID_XXX
#endif // USE_FFMPEG
};

View File

@ -533,11 +533,15 @@ void NativeInitGraphics() {
glstate.viewport.set(0, 0, pixel_xres, pixel_yres);
#ifdef _WIN32
DSound::DSound_StartSound(MainWindow::GetHWND(), &Win32Mix);
#endif
}
void NativeShutdownGraphics() {
#ifdef _WIN32
DSound::DSound_StopSound();
#endif
screenManager->deviceLost();