Skip to content

Commit

Permalink
Revert "Revert "replace srconv with src_conv using new licence""
Browse files Browse the repository at this point in the history
This reverts commit c5ed7db.
  • Loading branch information
jpffitch committed Apr 12, 2018
1 parent 7c2924d commit e9e192b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,10 @@ SET(BUILD_SHARED_LIBS ON)
# First, required stuff
if (MSVC)
find_library(LIBSNDFILE_LIBRARY NAMES sndfile libsndfile-1 libsndfile)
find_library(LIBSAMPLERATE_LIBRARY NAMES samplerate libsamplerate-1 libsamplerate)
else()
find_library(LIBSNDFILE_LIBRARY sndfile libsndfile-1)
find_library(LIBSAMPLERATE_LIBRARY NAMES samplerate libsamplerate-1)
endif()


Expand Down Expand Up @@ -1208,7 +1210,7 @@ if(EMSCRIPTEN)
include_directories(emscripten/deps/libsndfile-1.0.25/src/)
endif()

set(libcsound_LIBS ${LIBSNDFILE_LIBRARY})
set(libcsound_LIBS ${LIBSNDFILE_LIBRARY} ${LIBSAMPLERATE_LIBRARY})
if(REQUIRE_PTHREADS AND PTHREAD_LIBRARY)
list(APPEND libcsound_LIBS ${PTHREAD_LIBRARY})
endif()
Expand Down
26 changes: 14 additions & 12 deletions util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(stdutil_SRCS
het_export.c het_import.c hetro.c lpanal.c
lpc_export.c lpc_import.c mixer.c pvanal.c
pv_export.c pv_import.c pvlook.c scale.c
sndinfo.c srconv.c std_util.c xtrct.c
sndinfo.c src_conv.c std_util.c xtrct.c
SDIF/sdif.c)

if(MSVC)
Expand All @@ -18,7 +18,9 @@ else()
make_plugin(stdutil "${stdutil_SRCS}" m ${LIBSNDFILE_LIBRARY})
endif()

find_library(LIBSAMPLERATE_LIBRARY NAMES samplerate libsamplerate-0)
add_dependency_to_framework(stdutil ${LIBSNDFILE_LIBRARY})
add_dependency_to_framework(stdutil ${LIBSAMPLERATE_LIBRARY})

if(BUILD_UTILITIES)
make_utility(atsa atsa_main.c)
Expand All @@ -43,20 +45,20 @@ if(BUILD_UTILITIES)
make_utility(pv_import pvi_main.c)
make_utility(scale scale_main.c)
make_utility(sndinfo sndinfo_main.c)
make_utility(srconv srconv_main.c)
make_utility(src_conv src_conv_main.c)


#find_library(LIBSNDFILE_LIBRARY sndfile libsndfile-1)
find_library(LIBSAMPLERATE_LIBRARY NAMES samplerate libsamplerate-0)

if(LIBSNDFILE_LIBRARY AND LIBSAMPLERATE_LIBRARY)
make_executable(src_conv new_srconv.c "${LIBSNDFILE_LIBRARY};${LIBSAMPLERATE_LIBRARY}")
if(MSVC)
target_link_libraries(src_conv ${LIBSNDFILE_SUPPORT_LIBS})
endif()
else()
message(STATUS "Not building src_conv (libsndfile or libsamplerate not found).")
endif()


# if(LIBSNDFILE_LIBRARY AND LIBSAMPLERATE_LIBRARY)
# make_executable(src_conv new_srconv.c "${LIBSNDFILE_LIBRARY};${LIBSAMPLERATE_LIBRARY}")
# if(MSVC)
# target_link_libraries(src_conv ${LIBSNDFILE_SUPPORT_LIBS})
# endif()
# else()
# message(STATUS "Not building src_conv (libsndfile or libsamplerate not found).")
# endif()

endif()
add_subdirectory(SDIF)
2 changes: 1 addition & 1 deletion util/std_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ PUBLIC int32_t csoundModuleCreate(CSOUND *csound)
err |= pvlook_init_(csound);
err |= scale_init_(csound);
err |= sndinfo_init_(csound);
err |= srconv_init_(csound);
err |= src_conv_init_(csound);
return err;
}

Expand Down
2 changes: 1 addition & 1 deletion util/std_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extern int32_t pv_export_init_(CSOUND *);
extern int32_t pv_import_init_(CSOUND *);
extern int32_t scale_init_(CSOUND *);
extern int32_t sndinfo_init_(CSOUND *);
extern int32_t srconv_init_(CSOUND *);
extern int32_t src_conv_init_(CSOUND *);
extern int32_t xtrct_init_(CSOUND *);

#endif /* CSOUND_STD_UTIL_H */
Expand Down

0 comments on commit e9e192b

Please sign in to comment.