From 12cef8fa80ee55a87bd566f97a2b90982583b8ba Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sun, 22 Jun 2014 14:23:06 +0200 Subject: [PATCH] Oops, buildfixes --- Core/HW/SimpleAudioDec.cpp | 4 ++-- Core/HW/SimpleAudioDec.h | 3 +-- UI/NativeApp.cpp | 4 ++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Core/HW/SimpleAudioDec.cpp b/Core/HW/SimpleAudioDec.cpp index 918347a2a7..843257f612 100644 --- a/Core/HW/SimpleAudioDec.cpp +++ b/Core/HW/SimpleAudioDec.cpp @@ -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)); diff --git a/Core/HW/SimpleAudioDec.h b/Core/HW/SimpleAudioDec.h index 1c5514ddf8..0df5252cb6 100644 --- a/Core/HW/SimpleAudioDec.h +++ b/Core/HW/SimpleAudioDec.h @@ -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 }; diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 5ae48069e4..d7393f7a5b 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -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();