From 071b4f3e5005052709126ee9dbe8f751f9370859 Mon Sep 17 00:00:00 2001 From: Alexander Kojevnikov <alexander@kojevnikov.com> Date: Fri, 22 Feb 2013 21:29:39 -0800 Subject: [PATCH] Open .opus audio files (closes #39) --- dist/osx/README.md | 15 +++++++++++---- dist/win/spek.wxs.in | 2 +- src/spek-window.cc | 1 + 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dist/osx/README.md b/dist/osx/README.md index bf93c01..e0b1f7b 100644 --- a/dist/osx/README.md +++ b/dist/osx/README.md @@ -2,7 +2,7 @@ Using [MacPorts](http://www.macports.org/) install build dependencies: - port install autoconf automake clang-3.2 git-core intltool upx yasm. + port install autoconf automake gcc47 git-core intltool upx yasm. Download and build wxWidgets 2.9+, example configure flags: @@ -17,20 +17,27 @@ Copy the wxWidgets m4 macro to the MacPorts tree: sudo cp $HOME/usr/share/aclocal/wxwin.m4 /opt/local/share/aclocal/ +Download and build libopus, example configure flags: + + ./configure --prefix=$HOME/usr --disable-shared + make && make install + Download and build FFmpeg, example configure flags: - ./configure --prefix=$HOME/usr --enable-gpl --enable-version3 \ + ./configure --prefix=$HOME/usr --enable-gpl --enable-version3 \ --enable-runtime-cpudetect --enable-pthreads \ --disable-shared --disable-debug --disable-doc \ --disable-nonfree --disable-ffmpeg --disable-ffplay \ --disable-ffprobe --disable-ffserver --disable-avdevice --disable-swscale \ --disable-postproc --disable-encoders --disable-muxers \ - --disable-devices --disable-filters --disable-swresample + --disable-devices --disable-filters --disable-swresample \ + --enable-libopus make && make install Clone and build Spek, example configure flags: - PKG_CONFIG_PATH=$HOME/usr/lib/pkgconfig ./autogen.sh --with-wx-config=$HOME/usr/bin/wx-config + PKG_CONFIG_PATH=$HOME/usr/lib/pkgconfig CXX=/opt/local/bin/g++-mp-4.7 + ./autogen.sh --with-wx-config=$HOME/usr/bin/wx-config Bundle Spek: diff --git a/dist/win/spek.wxs.in b/dist/win/spek.wxs.in index 946081f..b8f7696 100644 --- a/dist/win/spek.wxs.in +++ b/dist/win/spek.wxs.in @@ -81,7 +81,7 @@ <RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Spek.Audio\shell" Value="open" Type="string" /> <RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Spek.Audio\shell\open\command" Value=""[INSTALLLOCATION]spek.exe" "%1"" Type="string" /> <!-- Associate with file extensions --> - <?foreach ext in "3gp;aac,aif;aifc;aiff;amr;awb;ape;au;dts;flac;gsm;m4a;m4p;mp3;mp4;mp+;mpc;mpp;oga;ogg;ra;ram;snd;wav;wma;wv"?> + <?foreach ext in "3gp;aac,aif;aifc;aiff;amr;awb;ape;au;dts;flac;gsm;m4a;m4p;mp3;mp4;mp+;mpc;mpp;oga;ogg;opus;ra;ram;snd;wav;wma;wv"?> <RegistryValue Root="HKLM" Key="SOFTWARE\Spek\Capabilities\FileAssociations" Name=".$(var.ext)" Value="Spek.Audio" Type="string" /> <RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Applications\spek.exe\SupportedTypes" Name=".$(var.ext)" Value="" Type="string" /> <RegistryValue Root="HKLM" Key="SOFTWARE\Classes\.$(var.ext)\OpenWithList\spek.exe" Value="" Type="string" /> diff --git a/src/spek-window.cc b/src/spek-window.cc index 5d3c610..1662069 100644 --- a/src/spek-window.cc +++ b/src/spek-window.cc @@ -212,6 +212,7 @@ static const char *audio_extensions[] = { "mpp", "oga", "ogg", + "opus", "ra", "ram", "snd",