spek

Acoustic spectrum analyser
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

commit e88efbe95965590d16b4ae1a111c4d18f1e8bbff
parent 8050f82afe39839eb02f15550ead4c0095f18783
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Tue, 28 Aug 2012 10:12:20 -0700

Move extern "C" {} blocks to C++ code

Diffstat:
Mlib/spek-audio.h | 8--------
Mlib/spek-fft.h | 8--------
Mlib/spek-palette.h | 8--------
Mlib/spek-pipeline.h | 8--------
Mlib/spek-utils.h | 8--------
Mpo/spek.pot | 68++++++++++++++++++++++++++++++++++----------------------------------
Msrc/spek-audio-desc.cc | 2++
Msrc/spek-spectrogram.cc | 2++
Msrc/spek-window.cc | 2++
Msrc/spek.cc | 2++
10 files changed, 42 insertions(+), 74 deletions(-)

diff --git a/lib/spek-audio.h b/lib/spek-audio.h @@ -19,10 +19,6 @@ #ifndef SPEK_AUDIO_H_ #define SPEK_AUDIO_H_ -#ifdef __cplusplus -extern "C" { -#endif - #include <stdbool.h> #include <stdint.h> @@ -80,8 +76,4 @@ int spek_audio_read(struct spek_audio_context *cx); // frees all allocated buffers and the context void spek_audio_close(struct spek_audio_context *cx); -#ifdef __cplusplus -} -#endif - #endif diff --git a/lib/spek-fft.h b/lib/spek-fft.h @@ -19,10 +19,6 @@ #ifndef SPEK_FFT_H_ #define SPEK_FFT_H_ -#ifdef __cplusplus -extern "C" { -#endif - struct RDFTContext; struct spek_fft_plan @@ -46,8 +42,4 @@ void spek_fft_execute(struct spek_fft_plan *p); // Destroy the plan and de-allocate buffers. void spek_fft_delete(struct spek_fft_plan *p); -#ifdef __cplusplus -} -#endif - #endif diff --git a/lib/spek-palette.h b/lib/spek-palette.h @@ -19,16 +19,8 @@ #ifndef SPEK_PALETTE_HH_ #define SPEK_PALETTE_HH_ -#ifdef __cplusplus -extern "C" { -#endif - #include <stdint.h> uint32_t spek_palette_spectrum(double level); -#ifdef __cplusplus -} -#endif - #endif diff --git a/lib/spek-pipeline.h b/lib/spek-pipeline.h @@ -19,10 +19,6 @@ #ifndef SPEK_PIPELINE_H_ #define SPEK_PIPELINE_H_ -#ifdef __cplusplus -extern "C" { -#endif - struct spek_pipeline; struct spek_audio_properties; @@ -37,8 +33,4 @@ void spek_pipeline_start(struct spek_pipeline *pipeline); void spek_pipeline_close(struct spek_pipeline *pipeline); -#ifdef __cplusplus -} -#endif - #endif diff --git a/lib/spek-utils.h b/lib/spek-utils.h @@ -19,15 +19,7 @@ #ifndef SPEK_UTILS_H_ #define SPEK_UTILS_H_ -#ifdef __cplusplus -extern "C" { -#endif - // Compare version numbers, e.g. 1.9.2 < 1.10.0 int spek_vercmp(const char *a, const char *b); -#ifdef __cplusplus -} -#endif - #endif diff --git a/po/spek.pot b/po/spek.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-08-28 09:54-0700\n" +"POT-Creation-Date: 2012-08-28 10:10-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -34,64 +34,64 @@ msgstr "" msgid "View spectrograms of your audio files" msgstr "" -#: ../src/spek-audio-desc.cc:36 +#: ../src/spek-audio-desc.cc:38 #, c-format msgid "%d kbps" msgstr "" -#: ../src/spek-audio-desc.cc:39 +#: ../src/spek-audio-desc.cc:41 #, c-format msgid "%d Hz" msgstr "" -#: ../src/spek-audio-desc.cc:44 +#: ../src/spek-audio-desc.cc:46 #, c-format msgid "%d bit" msgid_plural "%d bits" msgstr[0] "" msgstr[1] "" -#: ../src/spek-audio-desc.cc:50 +#: ../src/spek-audio-desc.cc:52 #, c-format msgid "%d channel" msgid_plural "%d channels" msgstr[0] "" msgstr[1] "" -#: ../src/spek-audio-desc.cc:67 +#: ../src/spek-audio-desc.cc:69 msgid "Cannot open input file" msgstr "" -#: ../src/spek-audio-desc.cc:70 +#: ../src/spek-audio-desc.cc:72 msgid "Cannot find stream info" msgstr "" -#: ../src/spek-audio-desc.cc:73 +#: ../src/spek-audio-desc.cc:75 msgid "The file contains no audio streams" msgstr "" -#: ../src/spek-audio-desc.cc:76 +#: ../src/spek-audio-desc.cc:78 msgid "Cannot find decoder" msgstr "" -#: ../src/spek-audio-desc.cc:79 +#: ../src/spek-audio-desc.cc:81 msgid "Unknown duration" msgstr "" -#: ../src/spek-audio-desc.cc:82 +#: ../src/spek-audio-desc.cc:84 msgid "No audio channels" msgstr "" -#: ../src/spek-audio-desc.cc:85 +#: ../src/spek-audio-desc.cc:87 msgid "Cannot open decoder" msgstr "" -#: ../src/spek-audio-desc.cc:88 +#: ../src/spek-audio-desc.cc:90 msgid "Unsupported sample format" msgstr "" #. TRANSLATORS: first %s is the error message, second %s is stream description. -#: ../src/spek-audio-desc.cc:93 +#: ../src/spek-audio-desc.cc:95 #, c-format msgid "%s: %s" msgstr "" @@ -117,92 +117,92 @@ msgstr "" msgid "Check for &updates" msgstr "" -#: ../src/spek-spectrogram.cc:153 +#: ../src/spek-spectrogram.cc:155 #, c-format msgid "%d kHz" msgstr "" -#: ../src/spek-spectrogram.cc:158 +#: ../src/spek-spectrogram.cc:160 #, c-format msgid "%d dB" msgstr "" #. TRANSLATORS: keep "00" unchanged, it's used to calc the text width -#: ../src/spek-spectrogram.cc:260 +#: ../src/spek-spectrogram.cc:262 msgid "00 kHz" msgstr "" #. TRANSLATORS: keep "-00" unchanged, it's used to calc the text width -#: ../src/spek-spectrogram.cc:288 +#: ../src/spek-spectrogram.cc:290 msgid "-00 dB" msgstr "" -#: ../src/spek-window.cc:73 +#: ../src/spek-window.cc:75 msgid "Spek - Acoustic Spectrum Analyser" msgstr "" -#: ../src/spek-window.cc:87 +#: ../src/spek-window.cc:89 msgid "&File" msgstr "" -#: ../src/spek-window.cc:94 +#: ../src/spek-window.cc:96 msgid "&Edit" msgstr "" -#: ../src/spek-window.cc:101 +#: ../src/spek-window.cc:103 msgid "&Help" msgstr "" -#: ../src/spek-window.cc:128 +#: ../src/spek-window.cc:130 msgid "A new version of Spek is available, click to download." msgstr "" #. TRANSLATORS: window title, %s is replaced with the file name -#: ../src/spek-window.cc:167 +#: ../src/spek-window.cc:169 #, c-format msgid "Spek - %s" msgstr "" -#: ../src/spek-window.cc:214 +#: ../src/spek-window.cc:216 msgid "All files" msgstr "" -#: ../src/spek-window.cc:216 +#: ../src/spek-window.cc:218 msgid "Audio files" msgstr "" -#: ../src/spek-window.cc:230 +#: ../src/spek-window.cc:232 msgid "Open File" msgstr "" -#: ../src/spek-window.cc:252 +#: ../src/spek-window.cc:254 msgid "PNG images" msgstr "" -#: ../src/spek-window.cc:258 +#: ../src/spek-window.cc:260 msgid "Save Spectrogram" msgstr "" #. Suggested name is <file_name>.png -#: ../src/spek-window.cc:266 +#: ../src/spek-window.cc:268 msgid "Untitled" msgstr "" #. TRANSLATORS: Add your name here -#: ../src/spek-window.cc:303 +#: ../src/spek-window.cc:305 msgid "translator-credits" msgstr "" -#: ../src/spek-window.cc:309 +#: ../src/spek-window.cc:311 msgid "Copyright (c) 2010-2012 Alexander Kojevnikov and contributors" msgstr "" -#: ../src/spek-window.cc:312 +#: ../src/spek-window.cc:314 msgid "Spek Website" msgstr "" #. TRANSLATORS: the %s is the package version. -#: ../src/spek.cc:91 +#: ../src/spek.cc:93 #, c-format msgid "Spek version %s" msgstr "" diff --git a/src/spek-audio-desc.cc b/src/spek-audio-desc.cc @@ -19,7 +19,9 @@ #include <wx/arrstr.h> #include <wx/intl.h> +extern "C" { #include <spek-audio.h> +} #include "spek-audio-desc.hh" diff --git a/src/spek-spectrogram.cc b/src/spek-spectrogram.cc @@ -19,9 +19,11 @@ #include <cmath> #include <wx/dcbuffer.h> +extern "C" { #include <spek-audio.h> #include <spek-palette.h> #include <spek-pipeline.h> +} #include "spek-audio-desc.hh" #include "spek-events.hh" diff --git a/src/spek-window.cc b/src/spek-window.cc @@ -26,7 +26,9 @@ // WX on WIN doesn't like it when pthread.h is included first. #include <pthread.h> +extern "C" { #include <spek-utils.h> +} #include "spek-preferences-dialog.hh" #include "spek-preferences.hh" diff --git a/src/spek.cc b/src/spek.cc @@ -20,7 +20,9 @@ #include <wx/log.h> #include <wx/socket.h> +extern "C" { #include <spek-audio.h> +} #include "spek-platform.hh" #include "spek-preferences.hh"