diff options
-rw-r--r-- | cmake/Modules/FindPortaudio.cmake | 128 | ||||
-rw-r--r-- | gr-uhd/examples/grc/uhd_wbfm_receive.grc | 234 |
2 files changed, 165 insertions, 197 deletions
diff --git a/cmake/Modules/FindPortaudio.cmake b/cmake/Modules/FindPortaudio.cmake index 4b7175438..61e4ae23a 100644 --- a/cmake/Modules/FindPortaudio.cmake +++ b/cmake/Modules/FindPortaudio.cmake @@ -4,104 +4,32 @@ # PORTAUDIO_FOUND - system has Portaudio # PORTAUDIO_INCLUDE_DIRS - the Portaudio include directory # PORTAUDIO_LIBRARIES - Link these to use Portaudio -# PORTAUDIO_DEFINITIONS - Compiler switches required for using Portaudio -# PORTAUDIO_VERSION - Portaudio version -# -# Copyright (c) 2006 Andreas Schneider <mail@cynapses.org> -# -# Redistribution and use is allowed according to the terms of the New BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - - -if (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS) - # in cache already - set(PORTAUDIO_FOUND TRUE) -else (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS) - if (NOT WIN32) - include(FindPkgConfig) - pkg_check_modules(PORTAUDIO2 portaudio-2.0) - endif (NOT WIN32) - - if (PORTAUDIO2_FOUND) - set(PORTAUDIO_INCLUDE_DIRS - ${PORTAUDIO2_INCLUDE_DIRS} - ) - if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(PORTAUDIO_LIBRARIES "${PORTAUDIO2_LIBRARY_DIRS}/lib${PORTAUDIO2_LIBRARIES}.dylib") - else (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(PORTAUDIO_LIBRARIES - ${PORTAUDIO2_LIBRARIES} - ) - endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(PORTAUDIO_VERSION - 19 - ) - set(PORTAUDIO_FOUND TRUE) - else (PORTAUDIO2_FOUND) - find_path(PORTAUDIO_INCLUDE_DIR - NAMES - portaudio.h - PATHS - /usr/include - /usr/local/include - /opt/local/include - /sw/include - ) - - find_library(PORTAUDIO_LIBRARY - NAMES - portaudio - PATHS - /usr/lib - /usr/local/lib - /opt/local/lib - /sw/lib - ) - - find_path(PORTAUDIO_LIBRARY_DIR - NAMES - portaudio - PATHS - /usr/lib - /usr/local/lib - /opt/local/lib - /sw/lib - ) - - set(PORTAUDIO_INCLUDE_DIRS - ${PORTAUDIO_INCLUDE_DIR} - ) - set(PORTAUDIO_LIBRARIES - ${PORTAUDIO_LIBRARY} - ) - - set(PORTAUDIO_LIBRARY_DIRS - ${PORTAUDIO_LIBRARY_DIR} - ) - - set(PORTAUDIO_VERSION - 18 - ) - - if (PORTAUDIO_INCLUDE_DIRS AND PORTAUDIO_LIBRARIES) - set(PORTAUDIO_FOUND TRUE) - endif (PORTAUDIO_INCLUDE_DIRS AND PORTAUDIO_LIBRARIES) - - if (PORTAUDIO_FOUND) - if (NOT Portaudio_FIND_QUIETLY) - message(STATUS "Found Portaudio: ${PORTAUDIO_LIBRARIES}") - endif (NOT Portaudio_FIND_QUIETLY) - else (PORTAUDIO_FOUND) - if (Portaudio_FIND_REQUIRED) - message(FATAL_ERROR "Could not find Portaudio") - endif (Portaudio_FIND_REQUIRED) - endif (PORTAUDIO_FOUND) - endif (PORTAUDIO2_FOUND) - - - # show the PORTAUDIO_INCLUDE_DIRS and PORTAUDIO_LIBRARIES variables only in the advanced view - mark_as_advanced(PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES) - -endif (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS) +include(FindPkgConfig) +pkg_check_modules(PC_PORTAUDIO portaudio) + +find_path(PORTAUDIO_INCLUDE_DIRS + NAMES + portaudio.h + PATHS + /usr/local/include + /usr/include + HINTS + ${PC_PORTAUDIO_INCLUDE_DIR} +) + +find_library(PORTAUDIO_LIBRARIES + NAMES + portaudio + PATHS + /usr/local/lib + /usr/lib + /usr/lib64 + HINTS + ${PC_PORTAUDIO_LIBDIR} +) + +mark_as_advanced(PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PORTAUDIO DEFAULT_MSG PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES) diff --git a/gr-uhd/examples/grc/uhd_wbfm_receive.grc b/gr-uhd/examples/grc/uhd_wbfm_receive.grc index 62658a2eb..7f14123f2 100644 --- a/gr-uhd/examples/grc/uhd_wbfm_receive.grc +++ b/gr-uhd/examples/grc/uhd_wbfm_receive.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Sat Oct 8 15:18:49 2011</timestamp> + <timestamp>Tue Apr 24 16:59:09 2012</timestamp> <block> <key>options</key> <param> @@ -389,7 +389,15 @@ </param> <param> <key>type</key> - <value>complex</value> + <value>fc32</value> + </param> + <param> + <key>otw</key> + <value></value> + </param> + <param> + <key>stream_args</key> + <value></value> </param> <param> <key>dev_addr</key> @@ -408,7 +416,11 @@ <value>1</value> </param> <param> - <key>ref_source0</key> + <key>clock_source0</key> + <value></value> + </param> + <param> + <key>time_source0</key> <value></value> </param> <param> @@ -416,7 +428,11 @@ <value></value> </param> <param> - <key>ref_source1</key> + <key>clock_source1</key> + <value></value> + </param> + <param> + <key>time_source1</key> <value></value> </param> <param> @@ -424,7 +440,11 @@ <value></value> </param> <param> - <key>ref_source2</key> + <key>clock_source2</key> + <value></value> + </param> + <param> + <key>time_source2</key> <value></value> </param> <param> @@ -432,7 +452,11 @@ <value></value> </param> <param> - <key>ref_source3</key> + <key>clock_source3</key> + <value></value> + </param> + <param> + <key>time_source3</key> <value></value> </param> <param> @@ -440,7 +464,11 @@ <value></value> </param> <param> - <key>ref_source4</key> + <key>clock_source4</key> + <value></value> + </param> + <param> + <key>time_source4</key> <value></value> </param> <param> @@ -448,7 +476,11 @@ <value></value> </param> <param> - <key>ref_source5</key> + <key>clock_source5</key> + <value></value> + </param> + <param> + <key>time_source5</key> <value></value> </param> <param> @@ -456,7 +488,11 @@ <value></value> </param> <param> - <key>ref_source6</key> + <key>clock_source6</key> + <value></value> + </param> + <param> + <key>time_source6</key> <value></value> </param> <param> @@ -464,7 +500,11 @@ <value></value> </param> <param> - <key>ref_source7</key> + <key>clock_source7</key> + <value></value> + </param> + <param> + <key>time_source7</key> <value></value> </param> <param> @@ -1036,93 +1076,6 @@ </param> </block> <block> - <key>wxgui_fftsink2</key> - <param> - <key>id</key> - <value>wxgui_fftsink2</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>complex</value> - </param> - <param> - <key>title</key> - <value>FFT Plot</value> - </param> - <param> - <key>samp_rate</key> - <value>samp_rate</value> - </param> - <param> - <key>baseband_freq</key> - <value>(freq+fine)*1e6</value> - </param> - <param> - <key>y_per_div</key> - <value>10</value> - </param> - <param> - <key>y_divs</key> - <value>10</value> - </param> - <param> - <key>ref_level</key> - <value>0</value> - </param> - <param> - <key>ref_scale</key> - <value>2.0</value> - </param> - <param> - <key>fft_size</key> - <value>512</value> - </param> - <param> - <key>fft_rate</key> - <value>15</value> - </param> - <param> - <key>peak_hold</key> - <value>False</value> - </param> - <param> - <key>average</key> - <value>False</value> - </param> - <param> - <key>avg_alpha</key> - <value>0</value> - </param> - <param> - <key>win</key> - <value>None</value> - </param> - <param> - <key>win_size</key> - <value></value> - </param> - <param> - <key>grid_pos</key> - <value>2, 0, 2, 4</value> - </param> - <param> - <key>notebook</key> - <value></value> - </param> - <param> - <key>_coordinate</key> - <value>(624, 278)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>parameter</key> <param> <key>id</key> @@ -1332,6 +1285,93 @@ <value>0</value> </param> </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>wxgui_fftsink2</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>FFT Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>(freq+fine)</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>0</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>512</value> + </param> + <param> + <key>fft_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>None</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>2, 0, 2, 4</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(624, 278)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> <connection> <source_block_id>gr_multiply_const_vxx</source_block_id> <sink_block_id>audio_sink</sink_block_id> |