annotate data/fileio/test/UnsupportedFormat.h @ 1698:dbd13eb7dad1

Add tests for audio file readers presented with empty or nonsense input
author Chris Cannam
date Fri, 03 May 2019 13:33:53 +0100
parents
children 83cb6e9d769b 219b2c2ff8c2
rev   line source
Chris@1698 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@1698 2
Chris@1698 3 /*
Chris@1698 4 Sonic Visualiser
Chris@1698 5 An audio file viewer and annotation editor.
Chris@1698 6 Centre for Digital Music, Queen Mary, University of London.
Chris@1698 7 This file copyright 2013 Chris Cannam.
Chris@1698 8
Chris@1698 9 This program is free software; you can redistribute it and/or
Chris@1698 10 modify it under the terms of the GNU General Public License as
Chris@1698 11 published by the Free Software Foundation; either version 2 of the
Chris@1698 12 License, or (at your option) any later version. See the file
Chris@1698 13 COPYING included with this distribution for more information.
Chris@1698 14 */
Chris@1698 15
Chris@1698 16 #ifndef SV_UNSUPPORTED_FORMAT_H
Chris@1698 17 #define SV_UNSUPPORTED_FORMAT_H
Chris@1698 18
Chris@1698 19 static bool isLegitimatelyUnsupported(QString format) {
Chris@1698 20
Chris@1698 21 #ifdef Q_OS_WIN
Chris@1698 22 return (format == "apple_lossless");
Chris@1698 23 #else
Chris@1698 24 #ifdef Q_OS_MAC
Chris@1698 25 return (format == "wma");
Chris@1698 26 #else
Chris@1698 27 return (format == "aac" ||
Chris@1698 28 format == "apple_lossless" ||
Chris@1698 29 format == "m4a" ||
Chris@1698 30 format == "wma");
Chris@1698 31 #endif
Chris@1698 32 #endif
Chris@1698 33 }
Chris@1698 34
Chris@1698 35 #endif