Skip to content

Commit 31b475a

Browse files
committed
copyright and some minor refactoring
1 parent f747b1f commit 31b475a

4 files changed

+27
-6
lines changed

cmake/FindSFMLAUDIO.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
# find_package( SFMLAUDIO )
2929

3030
set ( SFMLAUDIO_FOUND False )
31-
find_path ( SFML_INCLUDE_DIR SFML/AudioXXX.hpp PATH_SUFFIXES )
31+
find_path ( SFML_INCLUDE_DIR SFML/Audio.hpp PATH_SUFFIXES )
3232

3333
if ( SFML_INCLUDE_DIR )
3434
set ( SFMLAUDIO_FOUND True )
3535
message( "-- sfml-audio (Audio.hpp) found in ${SFML_INCLUDE_DIR}")
3636
endif ()
37+

cmake/ProcessDependencies.cmake

+20
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
1+
# examples/MyModule/cmake/ProcessDependencies.cmake
2+
#
3+
# This file is part of NEST.
4+
#
5+
# Copyright (C) 2004 The NEST Initiative
6+
#
7+
# NEST is free software: you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 2 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# NEST is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License
18+
# along with NEST. If not, see <http://www.gnu.org/licenses/>.
19+
120
function( CHECK_HAVE_SFML_AUDIO )
221
set( HAVE_SFML_AUDIO OFF PARENT_SCOPE )
322
find_package( SFMLAUDIO )
423
if ( SFMLAUDIO_FOUND )
524
set( HAVE_SFML_AUDIO ON PARENT_SCOPE )
625
endif ()
726
endfunction()
27+

recording_backend_soundclick.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// Constructor
3131
nest::RecordingBackendSoundClick::RecordingBackendSoundClick()
3232
{
33-
#if defined( HAVE_SFML_AUDIO )
33+
#ifdef HAVE_SFML_AUDIO
3434
// Load the raw sound data into the SFML sound buffer.
3535
sound_buffer_.loadFromMemory(
3636
sound_click_16bit_44_1khz_wav, sizeof( sound_click_16bit_44_1khz_wav ) );
@@ -67,7 +67,7 @@ void nest::RecordingBackendSoundClick::enroll( const RecordingDevice& device,
6767
void
6868
nest::RecordingBackendSoundClick::initialize()
6969
{
70-
#if defined( HAVE_SFML_AUDIO )
70+
#ifdef HAVE_SFML_AUDIO
7171
LOG( M_INFO,
7272
"Recording Backend",
7373
( "Recording backend >SoundClick< successfully initialized." ) );
@@ -120,7 +120,7 @@ nest::RecordingBackendSoundClick::write( const RecordingDevice& device,
120120
usleep( time_lag_us );
121121
}
122122

123-
#if defined( HAVE_SFML_AUDIO )
123+
#ifdef HAVE_SFML_AUDIO
124124
sound_.play();
125125
#endif
126126
}

recording_backend_soundclick.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "stopwatch.h"
2929

3030
// Simple and Fast Multimedia Library (SFML)
31-
#if defined( HAVE_SFML_AUDIO )
31+
#ifdef HAVE_SFML_AUDIO
3232
#include <SFML/Audio.hpp>
3333
#endif
3434

@@ -83,7 +83,7 @@ class RecordingBackendSoundClick : public RecordingBackend
8383
// NEST Stopwatch object
8484
Stopwatch stopwatch_;
8585

86-
#if defined( HAVE_SFML_AUDIO )
86+
#ifdef HAVE_SFML_AUDIO
8787
sf::SoundBuffer sound_buffer_;
8888
sf::Sound sound_;
8989
#endif

0 commit comments

Comments
 (0)