builds and runs OK on Linux with internal sox library files, speaker eq tested, READM...
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 28 Jan 2017 20:51:08 +0000 (20:51 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 28 Jan 2017 20:51:08 +0000 (20:51 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@3003 01035d8c-6547-0410-b346-abe4f91aad63

freedv-dev/CMakeLists.txt
freedv-dev/cmake/BuildSamplerate.cmake
freedv-dev/cmake/BuildSndfile.cmake
freedv-dev/cmake/BuildSox.cmake [deleted file]
freedv-dev/src/dlg_audiooptions.cpp
freedv-dev/src/dlg_audiooptions.h
freedv-dev/src/sox/sox_i.h

index 5f575797a8c15c283ff3dc9c41bcff5cbfc5609c..b3ca6bc9c6ef83d2458ca0afc07f1ff83d5ea95c 100644 (file)
@@ -86,8 +86,6 @@ set(USE_STATIC_SNDFILE FALSE CACHE BOOL
     "Download and build static sndfile instead of the system library.")
 set(USE_STATIC_SAMPLERATE FALSE CACHE BOOL
     "Download and build static samplerate instead of the system library.")
-set(USE_STATIC_SOX FALSE CACHE BOOL
-    "Download and build static sox instead of the system library.")
 set(USE_STATIC_CODEC2 TRUE CACHE BOOL
     "Download and build static codec2 instead of the system library.")
 set(USE_STATIC_SPEEXDSP TRUE CACHE BOOL
@@ -99,7 +97,6 @@ if(USE_STATIC_DEPS)
     set(USE_STATIC_PORTAUDIO TRUE FORCE)
     set(USE_STATIC_SNDFILE TRUE FORCE)
     set(USE_STATIC_SAMPLERATE TRUE FORCE)
-    set(USE_STATIC_SOX TRUE FORCE)
     set(USE_STATIC_CODEC2 TRUE FORCE)
 endif(USE_STATIC_DEPS)
 
@@ -282,31 +279,6 @@ else(NOT USE_STATIC_SAMPLERATE)
     include(cmake/BuildSamplerate.cmake)
 endif(NOT USE_STATIC_SAMPLERATE)
 
-#
-# Find sox library
-#
-if(NOT USE_STATIC_SOX)
-    message(STATUS "Looking for sox...")
-    find_library(LIBSOX_LIBRARY sox)
-    find_path(LIBSOX_INCLUDE_DIR NAMES sox/sox.h sox.h)
-    message(STATUS "  sox library: ${LIBSOX_LIBRARY}")
-    message(STATUS "  sox headers: ${LIBSOX_INCLUDE_DIR}")
-    if(LIBSOX_LIBRARY AND LIBSOX_INCLUDE_DIR)
-        list(APPEND FREEDV_LINK_LIBS ${LIBSOX_LIBRARY})
-        include_directories(${LIBSOX_INCLUDE_DIR})
-    else(LIBSOX_LIBRARY AND LIBSOX_INCLUDE_DIR)
-        message(FATAL_ERROR "sox library not found.
-On Linux systems try installing:
-    sox-devel (RPM based systems)
-    libsox-dev (DEB based systems)
-On Windows it's easiest to use the cmake option: USE_STATIC_SOX"
-        )
-    endif(LIBSOX_LIBRARY AND LIBSOX_INCLUDE_DIR)
-else(NOT USE_STATIC_SOX)
-    message(STATUS "Will attempt static build of sox.")
-    include(cmake/BuildSox.cmake)
-endif(NOT USE_STATIC_SOX)
-
 #    
 # sndfile Library
 #
index aa09f855fdcf10452e7975eb0525fb6a119c5e2f..8b6b7a368f695add96f4a2a94722707449fcb57d 100644 (file)
@@ -1,7 +1,7 @@
 set(SAMPLERATE_TARBALL "libsamplerate-0.1.8")
 
 if(MINGW AND CMAKE_CROSSCOMPILING)
-    set(CONFIGURE_COMMAND ./configure --build=${HOST} --host=${HOST} --target=${HOST} --prefix=${CMAKE_BINARY_DIR}/external/dist --disable-sndfile)
+    set(CONFIGURE_COMMAND ./configure --build=${HOST} --host=${HOST} --target=${HOST} --prefix=${CMAKE_BINARY_DIR}/external/dist --disable-sndfile --disable-fftw)
 else()
     set(CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR}/external/dist)
 endif()
index 43233fb7047774b77819389141187dc04db07fd9..c49b6388454838fdf8461807f40017c2623892d8 100644 (file)
@@ -1,7 +1,7 @@
 set(SNDFILE_TARBALL "libsndfile-1.0.25")
 
 if(MINGW AND CMAKE_CROSSCOMPILING)
-    set(CONFIGURE_COMMAND ./configure --host=${HOST}  --prefix=${CMAKE_BINARY_DIR}/external/dist --disable-external-libs --disable-shared)
+    set(CONFIGURE_COMMAND ./configure --host=${HOST}  --prefix=${CMAKE_BINARY_DIR}/external/dist --disable-external-libs --disable-shared --disable-sqlite)
 else()
     set(CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR}/external/dist --disable-external-libs --disable-shared --disable-external-libs)
 endif()
diff --git a/freedv-dev/cmake/BuildSox.cmake b/freedv-dev/cmake/BuildSox.cmake
deleted file mode 100644 (file)
index d54488b..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-set(SOX_TARBALL "sox-14.4.1")
-
-# required linking libraries on linux. Not sure about windows.
-find_library(ALSA_LIBRARIES asound)
-find_library(AO_LIBRARIES ao)
-find_library(GSM_LIBRARIES gsm)
-
-if(UNIX AND NOT ALSA_LIBRARIES)
-    message(ERROR "Could not find alsa library.
-On Linux systems try installing:
-    alsa-lib-devel  (RPM based systems)
-    libasound2-dev  (DEB based systems)"
-    )
-endif(UNIX AND NOT ALSA_LIBRARIES)
-
-if(UNIX AND NOT AO_LIBRARIES)
-    message(ERROR "Could not find libao.
-On Linux systems try installing:
-    libao-devel  (RPM based systems)
-    libao-dev    (DEB based systems)"
-    )
-endif(UNIX AND NOT AO_LIBRARIES)
-
-if(MINGW AND CMAKE_CROSSCOMPILING)
-    set(CONFIGURE_COMMAND ./configure --host=${HOST} --enable-shared=no --without-id3tag --without-png --disable-gomp --with-oggvorbis=no --with-oss=no --with-flac=no --with-amrnb=no --with-amrwb=no --with-mp3=no --with-wavpack=no --disable-dl-sndfile --with-pulseaudio=no --without-magic --with-gsm --prefix=${CMAKE_BINARY_DIR}/external/dist)
-else()
-    set(CONFIGURE_COMMAND ./configure --enable-shared=no --without-id3tag --without-png --disable-gomp --with-oggvorbis=no --with-oss=no --with-flac=no --with-amrnb=no --with-amrwb=no --with-mp3=no --with-wavpack=no --disable-dl-sndfile --with-pulseaudio=no --without-magic --with-gsm --prefix=${CMAKE_BINARY_DIR}/external/dist)
-endif()
-
-include(ExternalProject)
-ExternalProject_Add(sox
-    URL http://downloads.sourceforge.net/sox/${SOX_TARBALL}.tar.gz
-    BUILD_IN_SOURCE 1
-    INSTALL_DIR external/dist
-    CONFIGURE_COMMAND ${CONFIGURE_COMMAND}
-    BUILD_COMMAND $(MAKE) V=1
-    INSTALL_COMMAND $(MAKE) install
-)
-set(SOX_LIBRARIES ${CMAKE_BINARY_DIR}/external/dist/lib/libsox.a)
-if(UNIX)
-    list(APPEND SOX_LIBRARIES ${ALSA_LIBRARIES} ${AO_LIBRARIES} ${GSM_LIBRARIES})
-endif()
-if(MINGW)
-    list(APPEND SOX_LIBRARIES winmm)
-endif()
-include_directories(${CMAKE_BINARY_DIR}/external/dist/include)
-list(APPEND FREEDV_LINK_LIBS ${SOX_LIBRARIES})
-list(APPEND FREEDV_STATIC_DEPS sox)
index 7d23a08f1a7890394c0a116b491cf19a5d500deb..4e8cd9815396e5f04ce127ec8a7490d13ff90fd3 100644 (file)
@@ -70,8 +70,8 @@ void AudioOptsDialog::buildTestControls(PlotScalar **plotScalar, wxButton **btnT
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
 AudioOptsDialog::AudioOptsDialog(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
 {
-    this->SetSizeHints(wxSize(850, 600), wxDefaultSize);
-
+    //this->SetSizeHints(wxSize(850, 600), wxDefaultSize);
+    fprintf(stderr, "pos %d %d\n", pos.x, pos.y);
     Pa_Init();
 
     wxBoxSizer* mainSizer;
index 7a78b59a1f6a97f1b0490e7864996d094840f92d..5aa6741d95c7691c97c9ac858bb76477f722d202 100644 (file)
@@ -169,7 +169,7 @@ class AudioOptsDialog : public wxDialog
 
     public:
 
-        AudioOptsDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Audio Config"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 300,300 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        AudioOptsDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Audio Config"), const wxPoint& pos = wxPoint(1,1), const wxSize& size = wxSize( 800, 650 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
         ~AudioOptsDialog();
         int ExchangeData(int inout);
 };
index e2cdbae458cf360d8af664b2d3142ec29406477c..9d533263535c390f915c88403fde951e575a5443 100644 (file)
@@ -16,6 +16,8 @@
 #include "soxomp.h"  /* Note: soxomp.h includes soxconfig.h */
 #include "sox.h"
 
+#define __FREEDV__
+
 #if defined HAVE_FMEMOPEN
 #define _GNU_SOURCE
 #endif