mirror of
https://github.com/alexkay/spek.git
synced 2025-04-24 03:50:55 +03:00
Add mp3 demuxing tests
This commit is contained in:
parent
79ae75a7b0
commit
98aa9904ef
28
po/spek.pot
28
po/spek.pot
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-02-23 20:00-0800\n"
|
||||
"POT-Creation-Date: 2013-03-01 20:01-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,64 +34,64 @@ msgstr ""
|
||||
msgid "View spectrograms of your audio files"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-pipeline.cc:201
|
||||
#: ../src/spek-pipeline.cc:199
|
||||
#, c-format
|
||||
msgid "%d kbps"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-pipeline.cc:206
|
||||
#: ../src/spek-pipeline.cc:204
|
||||
#, c-format
|
||||
msgid "%d Hz"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-pipeline.cc:213
|
||||
#: ../src/spek-pipeline.cc:211
|
||||
#, c-format
|
||||
msgid "%d bit"
|
||||
msgid_plural "%d bits"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../src/spek-pipeline.cc:221
|
||||
#: ../src/spek-pipeline.cc:219
|
||||
#, c-format
|
||||
msgid "%d channel"
|
||||
msgid_plural "%d channels"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../src/spek-pipeline.cc:238
|
||||
#: ../src/spek-pipeline.cc:236
|
||||
msgid "Cannot open input file"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-pipeline.cc:241
|
||||
#: ../src/spek-pipeline.cc:239
|
||||
msgid "Cannot find stream info"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-pipeline.cc:244
|
||||
#: ../src/spek-pipeline.cc:242
|
||||
msgid "The file contains no audio streams"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-pipeline.cc:247
|
||||
#: ../src/spek-pipeline.cc:245
|
||||
msgid "Cannot find decoder"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-pipeline.cc:250
|
||||
#: ../src/spek-pipeline.cc:248
|
||||
msgid "Unknown duration"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-pipeline.cc:253
|
||||
#: ../src/spek-pipeline.cc:251
|
||||
msgid "No audio channels"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-pipeline.cc:256
|
||||
#: ../src/spek-pipeline.cc:254
|
||||
msgid "Cannot open decoder"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/spek-pipeline.cc:259
|
||||
#: ../src/spek-pipeline.cc:257
|
||||
msgid "Unsupported sample format"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: first %s is the error message, second %s is stream description.
|
||||
#: ../src/spek-pipeline.cc:271
|
||||
#: ../src/spek-pipeline.cc:269
|
||||
#, c-format
|
||||
msgid "%s: %s"
|
||||
msgstr ""
|
||||
|
@ -23,7 +23,6 @@
|
||||
* (c) 2007-2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
*/
|
||||
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
BIN
tests/samples/2ch-44100Hz-128cbr.mp3
Normal file
BIN
tests/samples/2ch-44100Hz-128cbr.mp3
Normal file
Binary file not shown.
BIN
tests/samples/2ch-44100Hz-320cbr.mp3
Normal file
BIN
tests/samples/2ch-44100Hz-320cbr.mp3
Normal file
Binary file not shown.
BIN
tests/samples/2ch-44100Hz-V0.mp3
Normal file
BIN
tests/samples/2ch-44100Hz-V0.mp3
Normal file
Binary file not shown.
BIN
tests/samples/2ch-44100Hz-V2.mp3
Normal file
BIN
tests/samples/2ch-44100Hz-V2.mp3
Normal file
Binary file not shown.
@ -47,10 +47,16 @@ static void test_file(const std::string& name, const FileInfo& info)
|
||||
|
||||
void test_audio_info()
|
||||
{
|
||||
const double MP3_T = 5.0 * 1152 / 44100; // 5 frames * duration per mp3 frame
|
||||
|
||||
std::map<std::string, FileInfo> files = {
|
||||
{ "1ch-96000Hz-24bps.flac", {"FLAC (Free Lossless Audio Codec)", 0, 96000, 24, 1, 0.1} },
|
||||
{ "2ch-48000Hz-16bps.flac", {"FLAC (Free Lossless Audio Codec)", 0, 48000, 16, 2, 0.1} },
|
||||
{ "2ch-44100Hz-16bps.wav", {"PCM signed 16-bit little-endian", 0, 44100, 16, 2, 0.1} },
|
||||
{"1ch-96000Hz-24bps.flac", {"FLAC (Free Lossless Audio Codec)", 0, 96000, 24, 1, 0.1}},
|
||||
{"2ch-48000Hz-16bps.flac", {"FLAC (Free Lossless Audio Codec)", 0, 48000, 16, 2, 0.1}},
|
||||
{"2ch-44100Hz-16bps.wav", {"PCM signed 16-bit little-endian", 0, 44100, 16, 2, 0.1}},
|
||||
{"2ch-44100Hz-128cbr.mp3", {"MP3 (MPEG audio layer 3)", 128000, 44100, 0, 2, MP3_T}},
|
||||
{"2ch-44100Hz-320cbr.mp3", {"MP3 (MPEG audio layer 3)", 320000, 44100, 0, 2, MP3_T}},
|
||||
{"2ch-44100Hz-V0.mp3", {"MP3 (MPEG audio layer 3)", 112000, 44100, 0, 2, MP3_T}},
|
||||
{"2ch-44100Hz-V2.mp3", {"MP3 (MPEG audio layer 3)", 64000, 44100, 0, 2, MP3_T}},
|
||||
};
|
||||
for (const auto& item : files) {
|
||||
run([&] () { test_file(item.first, item.second); }, "audio info: " + item.first);
|
||||
|
Loading…
x
Reference in New Issue
Block a user