Skip to content

Commit

Permalink
Updated sndfile
Browse files Browse the repository at this point in the history
  • Loading branch information
LAGonauta committed Nov 19, 2023
1 parent bf04c37 commit c8b0780
Show file tree
Hide file tree
Showing 22 changed files with 46 additions and 4,105 deletions.
14 changes: 11 additions & 3 deletions externals/libsndfile/cmake/SndFileConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(SndFile_VERSION 1.2.0)
set(SndFile_VERSION 1.2.2)
set(SndFile_VERSION_MAJOR 1)
set(SndFile_VERSION_MINOR 2)
set(SndFile_VERSION_PATCH 0)
set(SndFile_VERSION_PATCH 2)

set (SndFile_WITH_EXTERNAL_LIBS 1)
set (SndFile_WITH_MPEG 1)
Expand Down Expand Up @@ -34,6 +34,10 @@ endmacro()

include (CMakeFindDependencyMacro)

if (NOT TRUE)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
endif ()

if (SndFile_WITH_EXTERNAL_LIBS AND NOT TRUE)
find_dependency (Ogg 1.3)
find_dependency (Vorbis)
Expand All @@ -43,7 +47,11 @@ endif ()

if (SndFile_WITH_MPEG AND NOT TRUE)
find_dependency (mp3lame)
find_dependency (MPG123)
find_dependency (mpg123)
endif ()

if (NOT TRUE)
list (REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
endif ()

include (${CMAKE_CURRENT_LIST_DIR}/SndFileTargets.cmake)
Expand Down
11 changes: 3 additions & 8 deletions externals/libsndfile/cmake/SndFileConfigVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
# The variable CVF_VERSION must be set before calling configure_file().


set(PACKAGE_VERSION "1.2.0")
set(PACKAGE_VERSION "1.2.2")

if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()

if("1.2.0" MATCHES "^([0-9]+)\\.")
if("1.2.2" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
endif()
else()
set(CVF_VERSION_MAJOR "1.2.0")
set(CVF_VERSION_MAJOR "1.2.2")
endif()

if(PACKAGE_FIND_VERSION_RANGE)
Expand Down Expand Up @@ -52,11 +52,6 @@ else()
endif()


# if the installed project requested no architecture check, don't perform the check
if("FALSE")
return()
endif()

# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "4" STREQUAL "")
return()
Expand Down
2 changes: 1 addition & 1 deletion externals/libsndfile/cmake/SndFileTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.8.3...3.22)
cmake_policy(VERSION 2.8.3...3.24)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
Expand Down
32 changes: 31 additions & 1 deletion externals/libsndfile/include/sndfile.hh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ class SndfileHandle
SndfileHandle (const SndfileHandle &orig) ;
SndfileHandle & operator = (const SndfileHandle &rhs) ;

#if (__cplusplus >= 201100L)
SndfileHandle (SndfileHandle &&orig) noexcept ;
SndfileHandle & operator = (SndfileHandle &&rhs) noexcept ;
#endif

/* Mainly for debugging/testing. */
int refCount (void) const { return (p == SF_NULL) ? 0 : p->ref ; }

Expand Down Expand Up @@ -288,7 +293,32 @@ SndfileHandle::operator = (const SndfileHandle &rhs)
++ p->ref ;

return *this ;
} /* SndfileHandle assignment operator */
} /* SndfileHandle copy assignment */

#if (__cplusplus >= 201100L)

inline
SndfileHandle::SndfileHandle (SndfileHandle &&orig) noexcept
: p (orig.p)
{
orig.p = SF_NULL ;
} /* SndfileHandle move constructor */

inline SndfileHandle &
SndfileHandle::operator = (SndfileHandle &&rhs) noexcept
{
if (&rhs == this)
return *this ;
if (p != SF_NULL && -- p->ref == 0)
delete p ;

p = rhs.p ;
rhs.p = SF_NULL ;

return *this ;
} /* SndfileHandle move assignment */

#endif

inline int
SndfileHandle::error (void) const
Expand Down
Binary file added externals/libsndfile/lib/sndfile.dll
Binary file not shown.
Binary file modified externals/libsndfile/lib/sndfile.lib
Binary file not shown.
Loading

0 comments on commit c8b0780

Please sign in to comment.