mirror of
https://github.com/alexkay/spek.git
synced 2025-04-15 08:10:33 +03:00
Use C++ everywhere
This commit is contained in:
parent
4fc7070285
commit
8b7d3b5c2d
@ -3,8 +3,7 @@ SUBDIRS = \
|
||||
lib \
|
||||
man \
|
||||
po \
|
||||
src \
|
||||
tests
|
||||
src
|
||||
|
||||
EXTRA_DIST = \
|
||||
INSTALL.md \
|
||||
|
@ -4,7 +4,7 @@ AC_CONFIG_HEADERS([config.h])
|
||||
AM_INIT_AUTOMAKE([1.11.1 foreign no-dist-gzip dist-xz])
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
AC_PROG_CC_C99
|
||||
AC_LANG([C++])
|
||||
AC_PROG_CXX
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_INSTALL
|
||||
@ -71,7 +71,6 @@ AC_CONFIG_FILES([
|
||||
man/spek.1
|
||||
po/Makefile.in
|
||||
src/Makefile
|
||||
tests/Makefile
|
||||
web/version
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
@ -1,20 +1,20 @@
|
||||
noinst_LIBRARIES = libspek.a
|
||||
|
||||
libspek_a_SOURCES = \
|
||||
spek-audio.c \
|
||||
spek-audio.cc \
|
||||
spek-audio.h \
|
||||
spek-fft.c \
|
||||
spek-fft.cc \
|
||||
spek-fft.h \
|
||||
spek-palette.c \
|
||||
spek-palette.cc \
|
||||
spek-palette.h \
|
||||
spek-pipeline.c \
|
||||
spek-pipeline.cc \
|
||||
spek-pipeline.h \
|
||||
spek-utils.c \
|
||||
spek-utils.cc \
|
||||
spek-utils.h
|
||||
|
||||
libspek_a_CPPFLAGS = \
|
||||
-include config.h \
|
||||
-pthread
|
||||
|
||||
libspek_a_CFLAGS = \
|
||||
libspek_a_CXXFLAGS = \
|
||||
$(FFMPEG_CFLAGS)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* spek-audio.c
|
||||
/* spek-audio.cc
|
||||
*
|
||||
* Copyright (C) 2010-2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
@ -18,9 +18,12 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define __STDC_CONSTANT_MACROS
|
||||
extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavutil/mathematics.h>
|
||||
}
|
||||
|
||||
#include "spek-audio.h"
|
||||
|
||||
@ -53,7 +56,8 @@ const struct spek_audio_properties * spek_audio_get_properties(struct spek_audio
|
||||
struct spek_audio_context * spek_audio_open(const char *path)
|
||||
{
|
||||
// TODO: malloc and initialise explicitely
|
||||
struct spek_audio_context *cx = calloc(1, sizeof(struct spek_audio_context));
|
||||
struct spek_audio_context *cx =
|
||||
(spek_audio_context *)calloc(1, sizeof(struct spek_audio_context));
|
||||
|
||||
if (avformat_open_input(&cx->format_context, path, NULL, NULL) != 0) {
|
||||
cx->properties.error = SPEK_AUDIO_CANNOT_OPEN_FILE;
|
||||
@ -132,8 +136,8 @@ struct spek_audio_context * spek_audio_open(const char *path)
|
||||
return cx;
|
||||
}
|
||||
cx->buffer_size = (AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2;
|
||||
cx->properties.buffer = av_malloc(cx->buffer_size);
|
||||
cx->packet = av_mallocz(sizeof(AVPacket));
|
||||
cx->properties.buffer = (uint8_t*)av_malloc(cx->buffer_size);
|
||||
cx->packet = (AVPacket*)av_mallocz(sizeof(AVPacket));
|
||||
av_init_packet(cx->packet);
|
||||
cx->offset = 0;
|
||||
return cx;
|
@ -1,4 +1,4 @@
|
||||
/* spek-fft.c
|
||||
/* spek-fft.cc
|
||||
*
|
||||
* Copyright (C) 2010-2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
@ -17,16 +17,20 @@
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#define __STDC_CONSTANT_MACROS
|
||||
extern "C" {
|
||||
#include <libavcodec/avfft.h>
|
||||
#include <libavutil/mem.h>
|
||||
}
|
||||
|
||||
#include "spek-fft.h"
|
||||
|
||||
struct spek_fft_plan * spek_fft_plan_new(int n)
|
||||
{
|
||||
struct spek_fft_plan *p = malloc(sizeof(struct spek_fft_plan));
|
||||
p->input = av_mallocz(sizeof(float) * n);
|
||||
p->output = av_mallocz(sizeof(float) * (n / 2 + 1));
|
||||
struct spek_fft_plan *p = (spek_fft_plan*)malloc(sizeof(struct spek_fft_plan));
|
||||
p->input = (float*)av_mallocz(sizeof(float) * n);
|
||||
p->output = (float*)av_mallocz(sizeof(float) * (n / 2 + 1));
|
||||
int bits = 0;
|
||||
while (n) {
|
||||
n >>= 1;
|
@ -1,4 +1,4 @@
|
||||
/* spek-palette.c
|
||||
/* spek-palette.cc
|
||||
*
|
||||
* Copyright (C) 2010-2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
@ -16,8 +16,8 @@
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SPEK_PALETTE_HH_
|
||||
#define SPEK_PALETTE_HH_
|
||||
#ifndef SPEK_PALETTE_H_
|
||||
#define SPEK_PALETTE_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* spek-pipeline.c
|
||||
/* spek-pipeline.cc
|
||||
*
|
||||
* Copyright (C) 2010-2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
@ -23,9 +23,12 @@
|
||||
* (c) 2007-2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
*/
|
||||
|
||||
#define __STDC_LIMIT_MACROS
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -81,7 +84,7 @@ static float average_input(const struct spek_pipeline *p, void *buffer);
|
||||
struct spek_pipeline * spek_pipeline_open(
|
||||
const char *path, int bands, int samples, spek_pipeline_cb cb, void *cb_data)
|
||||
{
|
||||
struct spek_pipeline *p = malloc(sizeof(struct spek_pipeline));
|
||||
struct spek_pipeline *p = (spek_pipeline*)malloc(sizeof(struct spek_pipeline));
|
||||
p->cx = spek_audio_open(path);
|
||||
p->properties = spek_audio_get_properties(p->cx);
|
||||
p->bands = bands;
|
||||
@ -102,15 +105,15 @@ struct spek_pipeline * spek_pipeline_open(
|
||||
|
||||
if (!p->properties->error) {
|
||||
p->nfft = 2 * bands - 2;
|
||||
p->coss = malloc(p->nfft * sizeof(float));
|
||||
p->coss = (float*)malloc(p->nfft * sizeof(float));
|
||||
float cf = 2.0f * (float)M_PI / p->nfft;
|
||||
for (int i = 0; i < p->nfft; ++i) {
|
||||
p->coss[i] = cosf(cf * i);
|
||||
}
|
||||
p->fft = spek_fft_plan_new(p->nfft);
|
||||
p->input_size = p->nfft * (NFFT * 2 + 1);
|
||||
p->input = malloc(p->input_size * sizeof(float));
|
||||
p->output = malloc(bands * sizeof(float));
|
||||
p->input = (float*)malloc(p->input_size * sizeof(float));
|
||||
p->output = (float*)malloc(bands * sizeof(float));
|
||||
spek_audio_start(p->cx, samples);
|
||||
}
|
||||
|
||||
@ -189,7 +192,7 @@ void spek_pipeline_close(struct spek_pipeline *p)
|
||||
|
||||
static void * reader_func(void *pp)
|
||||
{
|
||||
struct spek_pipeline *p = pp;
|
||||
struct spek_pipeline *p = (spek_pipeline*)pp;
|
||||
|
||||
p->has_worker_thread = !pthread_create(&p->worker_thread, NULL, &worker_func, p);
|
||||
if (!p->has_worker_thread) {
|
||||
@ -248,7 +251,7 @@ static void reader_sync(struct spek_pipeline *p, int pos)
|
||||
|
||||
static void * worker_func(void *pp)
|
||||
{
|
||||
struct spek_pipeline *p = pp;
|
||||
struct spek_pipeline *p = (spek_pipeline*)pp;
|
||||
|
||||
int sample = 0;
|
||||
int64_t frames = 0;
|
||||
@ -340,26 +343,26 @@ static float average_input(const struct spek_pipeline *p, void *buffer)
|
||||
float res = 0.0f;
|
||||
if (p->properties->fp) {
|
||||
if (p->properties->width == 32) {
|
||||
float *b = buffer;
|
||||
float *b = (float*)buffer;
|
||||
for (int i = 0; i < channels; i++) {
|
||||
res += b[i];
|
||||
}
|
||||
} else {
|
||||
assert(p->properties->width == 64);
|
||||
double *b = buffer;
|
||||
double *b = (double*)buffer;
|
||||
for (int i = 0; i < channels; i++) {
|
||||
res += (float) b[i];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (p->properties->width == 16) {
|
||||
int16_t *b = buffer;
|
||||
int16_t *b = (int16_t*)buffer;
|
||||
for (int i = 0; i < channels; i++) {
|
||||
res += b[i] / (float) INT16_MAX;
|
||||
}
|
||||
} else {
|
||||
assert (p->properties->width == 32);
|
||||
int32_t *b = buffer;
|
||||
int32_t *b = (int32_t*)buffer;
|
||||
for (int i = 0; i < channels; i++) {
|
||||
res += b[i] / (float) INT32_MAX;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/* spek-utils.c
|
||||
/* spek-utils.cc
|
||||
*
|
||||
* Copyright (C) 2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
80
po/spek.pot
80
po/spek.pot
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2012-09-21 19:49-0700\n"
|
||||
"POT-Creation-Date: 2013-02-02 19:03-0800\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,179 +34,179 @@ msgstr ""
|
||||
msgid "View spectrograms of your audio files"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-audio-desc.cc:38
|
||||
#: ../src/spek-audio-desc.cc:36
|
||||
#, c-format
|
||||
msgid "%d kbps"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-audio-desc.cc:41
|
||||
#: ../src/spek-audio-desc.cc:39
|
||||
#, c-format
|
||||
msgid "%d Hz"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-audio-desc.cc:46
|
||||
#: ../src/spek-audio-desc.cc:44
|
||||
#, c-format
|
||||
msgid "%d bit"
|
||||
msgid_plural "%d bits"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../src/spek-audio-desc.cc:52
|
||||
#: ../src/spek-audio-desc.cc:50
|
||||
#, c-format
|
||||
msgid "%d channel"
|
||||
msgid_plural "%d channels"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../src/spek-audio-desc.cc:69
|
||||
#: ../src/spek-audio-desc.cc:67
|
||||
msgid "Cannot open input file"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-audio-desc.cc:72
|
||||
#: ../src/spek-audio-desc.cc:70
|
||||
msgid "Cannot find stream info"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-audio-desc.cc:75
|
||||
#: ../src/spek-audio-desc.cc:73
|
||||
msgid "The file contains no audio streams"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-audio-desc.cc:78
|
||||
#: ../src/spek-audio-desc.cc:76
|
||||
msgid "Cannot find decoder"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-audio-desc.cc:81
|
||||
#: ../src/spek-audio-desc.cc:79
|
||||
msgid "Unknown duration"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-audio-desc.cc:84
|
||||
#: ../src/spek-audio-desc.cc:82
|
||||
msgid "No audio channels"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-audio-desc.cc:87
|
||||
#: ../src/spek-audio-desc.cc:85
|
||||
msgid "Cannot open decoder"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-audio-desc.cc:90
|
||||
#: ../src/spek-audio-desc.cc:88
|
||||
msgid "Unsupported sample format"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: first %s is the error message, second %s is stream description.
|
||||
#: ../src/spek-audio-desc.cc:98
|
||||
#: ../src/spek-audio-desc.cc:96
|
||||
#, c-format
|
||||
msgid "%s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-preferences-dialog.cc:58
|
||||
#: ../src/spek-preferences-dialog.cc:61
|
||||
msgid "Preferences"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-preferences-dialog.cc:63
|
||||
#: ../src/spek-preferences-dialog.cc:66
|
||||
msgid "(system default)"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: The name of a section in the Preferences dialog.
|
||||
#: ../src/spek-preferences-dialog.cc:70
|
||||
#: ../src/spek-preferences-dialog.cc:73
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-preferences-dialog.cc:79
|
||||
#: ../src/spek-preferences-dialog.cc:82
|
||||
msgid "Language:"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-preferences-dialog.cc:95
|
||||
#: ../src/spek-preferences-dialog.cc:98
|
||||
msgid "Check for &updates"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-spectrogram.cc:193
|
||||
#: ../src/spek-spectrogram.cc:191
|
||||
#, c-format
|
||||
msgid "%d kHz"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-spectrogram.cc:198
|
||||
#: ../src/spek-spectrogram.cc:196
|
||||
#, c-format
|
||||
msgid "%d dB"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: keep "00" unchanged, it's used to calc the text width
|
||||
#: ../src/spek-spectrogram.cc:304
|
||||
#: ../src/spek-spectrogram.cc:302
|
||||
msgid "00 kHz"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: keep "-00" unchanged, it's used to calc the text width
|
||||
#: ../src/spek-spectrogram.cc:335
|
||||
#: ../src/spek-spectrogram.cc:333
|
||||
msgid "-00 dB"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:77
|
||||
#: ../src/spek-window.cc:75
|
||||
msgid "Spek - Acoustic Spectrum Analyser"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:97
|
||||
#: ../src/spek-window.cc:95
|
||||
msgid "&File"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:103
|
||||
#: ../src/spek-window.cc:101
|
||||
msgid "&Edit"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:107 ../src/spek-window.cc:112
|
||||
#: ../src/spek-window.cc:105 ../src/spek-window.cc:110
|
||||
msgid "&Help"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:135
|
||||
#: ../src/spek-window.cc:133
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:149
|
||||
#: ../src/spek-window.cc:147
|
||||
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:187
|
||||
#: ../src/spek-window.cc:185
|
||||
#, c-format
|
||||
msgid "Spek - %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:233
|
||||
#: ../src/spek-window.cc:231
|
||||
msgid "All files"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:235
|
||||
#: ../src/spek-window.cc:233
|
||||
msgid "Audio files"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:249
|
||||
#: ../src/spek-window.cc:247
|
||||
msgid "Open File"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:271
|
||||
#: ../src/spek-window.cc:269
|
||||
msgid "PNG images"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:277
|
||||
#: ../src/spek-window.cc:275
|
||||
msgid "Save Spectrogram"
|
||||
msgstr ""
|
||||
|
||||
#. Suggested name is <file_name>.png
|
||||
#: ../src/spek-window.cc:285
|
||||
#: ../src/spek-window.cc:283
|
||||
msgid "Untitled"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: Add your name here
|
||||
#: ../src/spek-window.cc:330
|
||||
#: ../src/spek-window.cc:329
|
||||
msgid "translator-credits"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:336
|
||||
#: ../src/spek-window.cc:335
|
||||
msgid "Copyright (c) 2010-2012 Alexander Kojevnikov and contributors"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-window.cc:339
|
||||
#: ../src/spek-window.cc:338
|
||||
msgid "Spek Website"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: the %s is the package version.
|
||||
#: ../src/spek.cc:100
|
||||
#: ../src/spek.cc:98
|
||||
#, c-format
|
||||
msgid "Spek version %s"
|
||||
msgstr ""
|
||||
|
@ -1,24 +1,24 @@
|
||||
bin_PROGRAMS = spek
|
||||
|
||||
spek_SOURCES = \
|
||||
spek-artwork.hh \
|
||||
spek-artwork.cc \
|
||||
spek-artwork.h \
|
||||
spek-audio-desc.cc \
|
||||
spek-audio-desc.hh \
|
||||
spek-audio-desc.h \
|
||||
spek-events.cc \
|
||||
spek-events.hh \
|
||||
spek-events.h \
|
||||
spek-platform.cc \
|
||||
spek-platform.hh \
|
||||
spek-platform.h \
|
||||
spek-preferences-dialog.cc \
|
||||
spek-preferences-dialog.hh \
|
||||
spek-preferences-dialog.h \
|
||||
spek-preferences.cc \
|
||||
spek-preferences.hh \
|
||||
spek-preferences.h \
|
||||
spek-ruler.cc \
|
||||
spek-ruler.hh \
|
||||
spek-ruler.h \
|
||||
spek-spectrogram.cc \
|
||||
spek-spectrogram.hh \
|
||||
spek-spectrogram.h \
|
||||
spek-window.cc \
|
||||
spek-window.hh \
|
||||
spek-window.h \
|
||||
spek.cc
|
||||
|
||||
spek_CPPFLAGS = \
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/iconbndl.h>
|
||||
|
||||
#include "spek-artwork.hh"
|
||||
#include "spek-artwork.h"
|
||||
|
||||
class SpekArtProvider : public wxArtProvider
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* spek-artwork.hh
|
||||
/* spek-artwork.h
|
||||
*
|
||||
* Copyright (C) 2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
@ -16,8 +16,8 @@
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SPEK_ARTWORK_HH_
|
||||
#define SPEK_ARTWORK_HH_
|
||||
#ifndef SPEK_ARTWORK_H_
|
||||
#define SPEK_ARTWORK_H_
|
||||
|
||||
#include <wx/string.h>
|
||||
|
@ -19,11 +19,9 @@
|
||||
#include <wx/arrstr.h>
|
||||
#include <wx/intl.h>
|
||||
|
||||
extern "C" {
|
||||
#include <spek-audio.h>
|
||||
}
|
||||
|
||||
#include "spek-audio-desc.hh"
|
||||
#include "spek-audio-desc.h"
|
||||
|
||||
#define ngettext wxPLURAL
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* spek-audio-desc.hh
|
||||
/* spek-audio-desc.h
|
||||
*
|
||||
* Copyright (C) 2010-2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
@ -16,8 +16,8 @@
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SPEK_AUDIO_DESC_HH_
|
||||
#define SPEK_AUDIO_DESC_HH_
|
||||
#ifndef SPEK_AUDIO_DESC_H_
|
||||
#define SPEK_AUDIO_DESC_H_
|
||||
|
||||
#include <wx/string.h>
|
||||
|
@ -16,7 +16,7 @@
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "spek-events.hh"
|
||||
#include "spek-events.h"
|
||||
|
||||
//IMPLEMENT_DYNAMIC_CLASS(SpekHaveSampleEvent, wxEvent)
|
||||
DEFINE_EVENT_TYPE(SPEK_HAVE_SAMPLE)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* spek-events.hh
|
||||
/* spek-events.h
|
||||
*
|
||||
* Copyright (C) 2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
@ -16,8 +16,8 @@
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SPEK_EVENTS_HH_
|
||||
#define SPEK_EVENTS_HH_
|
||||
#ifndef SPEK_EVENTS_H_
|
||||
#define SPEK_EVENTS_H_
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <wx/stdpaths.h>
|
||||
#include <wx/utils.h>
|
||||
|
||||
#include "spek-platform.hh"
|
||||
#include "spek-platform.h"
|
||||
|
||||
void spek_platform_init()
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* spek-platform.hh
|
||||
/* spek-platform.h
|
||||
*
|
||||
* Copyright (C) 2010-2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
@ -16,8 +16,8 @@
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SPEK_PLATFORM_HH_
|
||||
#define SPEK_PLATFORM_HH_
|
||||
#ifndef SPEK_PLATFORM_H_
|
||||
#define SPEK_PLATFORM_H_
|
||||
|
||||
#include <wx/string.h>
|
||||
|
@ -16,10 +16,10 @@
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "spek-platform.hh"
|
||||
#include "spek-preferences.hh"
|
||||
#include "spek-platform.h"
|
||||
#include "spek-preferences.h"
|
||||
|
||||
#include "spek-preferences-dialog.hh"
|
||||
#include "spek-preferences-dialog.h"
|
||||
|
||||
// List all languages with a decent (e.g. 80%) number of translated
|
||||
// strings. Don't translate language names. Keep the first line intact.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* spek-preferences-dialog.hh
|
||||
/* spek-preferences-dialog.h
|
||||
*
|
||||
* Copyright (C) 2011-2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
@ -16,8 +16,8 @@
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SPEK_PREFERENCES_DIALOG_HH_
|
||||
#define SPEK_PREFERENCES_DIALOG_HH_
|
||||
#ifndef SPEK_PREFERENCES_DIALOG_H_
|
||||
#define SPEK_PREFERENCES_DIALOG_H_
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
@ -18,9 +18,9 @@
|
||||
|
||||
#include <wx/string.h>
|
||||
|
||||
#include "spek-platform.hh"
|
||||
#include "spek-platform.h"
|
||||
|
||||
#include "spek-preferences.hh"
|
||||
#include "spek-preferences.h"
|
||||
|
||||
SpekPreferences& SpekPreferences::get()
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* spek-preferences.hh
|
||||
/* spek-preferences.h
|
||||
*
|
||||
* Copyright (C) 2011-2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
@ -16,8 +16,8 @@
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SPEK_PREFERENCES_HH_
|
||||
#define SPEK_PREFERENCES_HH_
|
||||
#ifndef SPEK_PREFERENCES_H_
|
||||
#define SPEK_PREFERENCES_H_
|
||||
|
||||
#include <wx/fileconf.h>
|
||||
#include <wx/intl.h>
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "spek-ruler.hh"
|
||||
#include "spek-ruler.h"
|
||||
|
||||
SpekRuler::SpekRuler(
|
||||
int x, int y, Position pos, wxString sample_label,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* spek-ruler.hh
|
||||
/* spek-ruler.h
|
||||
*
|
||||
* Copyright (C) 2010-2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
@ -16,8 +16,8 @@
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SPEK_RULER_HH_
|
||||
#define SPEK_RULER_HH_
|
||||
#ifndef SPEK_RULER_H_
|
||||
#define SPEK_RULER_H_
|
||||
|
||||
#include <wx/dc.h>
|
||||
#include <wx/string.h>
|
@ -20,19 +20,17 @@
|
||||
|
||||
#include <wx/dcbuffer.h>
|
||||
|
||||
extern "C" {
|
||||
#include <spek-audio.h>
|
||||
#include <spek-palette.h>
|
||||
#include <spek-pipeline.h>
|
||||
#include <spek-utils.h>
|
||||
}
|
||||
|
||||
#include "spek-audio-desc.hh"
|
||||
#include "spek-events.hh"
|
||||
#include "spek-platform.hh"
|
||||
#include "spek-ruler.hh"
|
||||
#include "spek-audio-desc.h"
|
||||
#include "spek-events.h"
|
||||
#include "spek-platform.h"
|
||||
#include "spek-ruler.h"
|
||||
|
||||
#include "spek-spectrogram.hh"
|
||||
#include "spek-spectrogram.h"
|
||||
|
||||
BEGIN_EVENT_TABLE(SpekSpectrogram, wxWindow)
|
||||
EVT_CHAR(SpekSpectrogram::on_char)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* spek-spectrogram.hh
|
||||
/* spek-spectrogram.h
|
||||
*
|
||||
* Copyright (C) 2010-2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
@ -16,8 +16,8 @@
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SPEK_SPECTROGRAM_HH_
|
||||
#define SPEK_SPECTROGRAM_HH_
|
||||
#ifndef SPEK_SPECTROGRAM_H_
|
||||
#define SPEK_SPECTROGRAM_H_
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
@ -26,16 +26,14 @@
|
||||
// WX on WIN doesn't like it when pthread.h is included first.
|
||||
#include <pthread.h>
|
||||
|
||||
extern "C" {
|
||||
#include <spek-utils.h>
|
||||
}
|
||||
|
||||
#include "spek-artwork.hh"
|
||||
#include "spek-preferences-dialog.hh"
|
||||
#include "spek-preferences.hh"
|
||||
#include "spek-spectrogram.hh"
|
||||
#include "spek-artwork.h"
|
||||
#include "spek-preferences-dialog.h"
|
||||
#include "spek-preferences.h"
|
||||
#include "spek-spectrogram.h"
|
||||
|
||||
#include "spek-window.hh"
|
||||
#include "spek-window.h"
|
||||
|
||||
DECLARE_EVENT_TYPE(SPEK_NOTIFY_EVENT, -1)
|
||||
DEFINE_EVENT_TYPE(SPEK_NOTIFY_EVENT)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* spek-window.hh
|
||||
/* spek-window.h
|
||||
*
|
||||
* Copyright (C) 2010-2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
@ -16,8 +16,8 @@
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SPEK_WINDOW_HH_
|
||||
#define SPEK_WINDOW_HH_
|
||||
#ifndef SPEK_WINDOW_H_
|
||||
#define SPEK_WINDOW_H_
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
10
src/spek.cc
10
src/spek.cc
@ -20,15 +20,13 @@
|
||||
#include <wx/log.h>
|
||||
#include <wx/socket.h>
|
||||
|
||||
extern "C" {
|
||||
#include <spek-audio.h>
|
||||
}
|
||||
|
||||
#include "spek-artwork.hh"
|
||||
#include "spek-platform.hh"
|
||||
#include "spek-preferences.hh"
|
||||
#include "spek-artwork.h"
|
||||
#include "spek-platform.h"
|
||||
#include "spek-preferences.h"
|
||||
|
||||
#include "spek-window.hh"
|
||||
#include "spek-window.h"
|
||||
|
||||
class Spek: public wxApp
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* test-utils.c
|
||||
/* test-utils.cc
|
||||
*
|
||||
* Copyright (C) 2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
@ -1,4 +1,4 @@
|
||||
/* test.c
|
||||
/* test.cc
|
||||
*
|
||||
* Copyright (C) 2012 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
Loading…
x
Reference in New Issue
Block a user