From 5212ff88d4d4f21ff7b7ee87f68a3db2e5e07eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Tue, 24 Apr 2018 22:47:34 -0300 Subject: [PATCH] Fixed mp3 seeking. Updated dr_flac. --HG-- branch : dev --- src/eepp/audio/soundfilereadermp3.cpp | 2 +- src/thirdparty/dr_libs/dr_flac.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/eepp/audio/soundfilereadermp3.cpp b/src/eepp/audio/soundfilereadermp3.cpp index 49da03b06..e48583395 100644 --- a/src/eepp/audio/soundfilereadermp3.cpp +++ b/src/eepp/audio/soundfilereadermp3.cpp @@ -61,7 +61,7 @@ bool SoundFileReaderMp3::open(IOStream& stream, Info& info) { void SoundFileReaderMp3::seek(Uint64 sampleOffset) { if ( mMp3 ) { - drmp3_seek_to_frame( mMp3, sampleOffset ); + drmp3_seek_to_frame( mMp3, sampleOffset / mChannelCount ); } } diff --git a/src/thirdparty/dr_libs/dr_flac.h b/src/thirdparty/dr_libs/dr_flac.h index ff23bdd1a..32609d252 100644 --- a/src/thirdparty/dr_libs/dr_flac.h +++ b/src/thirdparty/dr_libs/dr_flac.h @@ -1,5 +1,5 @@ // FLAC audio decoder. Public domain. See "unlicense" statement at the end of this file. -// dr_flac - v0.8g - 2018-04-19 +// dr_flac - v0.9 - 2018-04-24 // // David Reid - mackron@gmail.com @@ -1742,7 +1742,7 @@ static DRFLAC_INLINE drflac_bool32 drflac__is_lzcnt_supported() static DRFLAC_INLINE drflac_uint32 drflac__clz_lzcnt(drflac_cache_t x) { -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(__clang__) #ifdef DRFLAC_64BIT return (drflac_uint32)__lzcnt64(x); #else @@ -5524,6 +5524,10 @@ const char* drflac_next_vorbis_comment(drflac_vorbis_comment_iterator* pIter, dr // REVISION HISTORY // +// v0.9 - 2018-04-24 +// - Fix Clang build. +// - Start using major.minor.revision versioning. +// // v0.8g - 2018-04-19 // - Fix build on non-x86/x64 architectures. //