diff --git a/cmake/KwaveLibaudiofileSupport.cmake b/cmake/KwaveLibaudiofileSupport.cmake index f28829da..2a67c047 100644 --- a/cmake/KwaveLibaudiofileSupport.cmake +++ b/cmake/KwaveLibaudiofileSupport.cmake @@ -1,66 +1,63 @@ ############################################################################# ## Kwave - cmake/KwaveLibaudiofileSupport.txt ## ------------------- ## begin : Tue May 22 2007 ## copyright : (C) 2007 by Thomas Eschenbacher ## email : Thomas.Eschenbacher@gmx.de ############################################################################# # ############################################################################# # # # Redistribution and use in source and binary forms, with or without # # modification, are permitted provided that the following conditions # # are met: # # # # 1. Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # # notice, this list of conditions and the following disclaimer in the # # documentation and/or other materials provided with the distribution. # # # # For details see the accompanying cmake/COPYING-CMAKE-SCRIPTS file. # # # ############################################################################# INCLUDE(CheckLibraryExists) INCLUDE(FindPkgConfig) INCLUDE(UsePkgConfig) INCLUDE(CheckTypeSize) PKG_CHECK_MODULES(LIBAUDIOFILE REQUIRED audiofile>=0.3.0) -IF (NOT LIBAUDIOFILE_FOUND) - MESSAGE(FATAL_ERROR "audiofile library not found or too old") -ENDIF(NOT LIBAUDIOFILE_FOUND) ############################################################################# ### check if the system has audiofile.h ### FIND_PATH(HAVE_AUDIOFILE_H audiofile.h) FIND_PATH(HAVE_AFS_VFS_H af_vfs.h) ############################################################################# ### system libaudiofile can be used & header exists: check for functions ### IF (HAVE_AUDIOFILE_H AND HAVE_AFS_VFS_H) CHECK_LIBRARY_EXISTS(audiofile afOpenVirtualFile ${LIBAUDIOFILE_LIBDIR} HAVE_AF_OPEN_VIRTUAL_FILE) ENDIF (HAVE_AUDIOFILE_H AND HAVE_AFS_VFS_H) # check for compression types SET(CMAKE_EXTRA_INCLUDE_FILES "audiofile.h") CHECK_TYPE_SIZE("sizeof(AF_COMPRESSION_FLAC)" AF_COMPRESSION_FLAC) CHECK_TYPE_SIZE("sizeof(AF_COMPRESSION_ALAC)" AF_COMPRESSION_ALAC) SET(CMAKE_EXTRA_INCLUDE_FILES) ############################################################################# ### some verbose output of the result ### IF (HAVE_AF_OPEN_VIRTUAL_FILE) # system libaudiofile is ok and will be used MESSAGE(STATUS "Found libaudiofile") ELSE (HAVE_AF_OPEN_VIRTUAL_FILE) # system libaudiofile should be used but is not ok -> FAIL MESSAGE(FATAL_ERROR "system libaudiofile is missing or cannot be used") ENDIF (HAVE_AF_OPEN_VIRTUAL_FILE) ############################################################################# ############################################################################# diff --git a/cmake/KwaveLibsamplerateSupport.cmake b/cmake/KwaveLibsamplerateSupport.cmake index b06e6ed7..cfc2c071 100644 --- a/cmake/KwaveLibsamplerateSupport.cmake +++ b/cmake/KwaveLibsamplerateSupport.cmake @@ -1,46 +1,43 @@ ############################################################################# ## Kwave - cmake/KwaveLibsamplerateSupport.txt ## ------------------- ## begin : Sat Jul 04 2009 ## copyright : (C) 2009 by Thomas Eschenbacher ## email : Thomas.Eschenbacher@gmx.de ############################################################################# # ############################################################################# # # # Redistribution and use in source and binary forms, with or without # # modification, are permitted provided that the following conditions # # are met: # # # # 1. Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # # notice, this list of conditions and the following disclaimer in the # # documentation and/or other materials provided with the distribution. # # # # For details see the accompanying cmake/COPYING-CMAKE-SCRIPTS file. # # # ############################################################################# INCLUDE(FindPkgConfig) INCLUDE(UsePkgConfig) ############################################################################# ### check for libsamplerate headers and library ### PKG_CHECK_MODULES(SAMPLERATE REQUIRED samplerate>=0.1.3) -IF (NOT SAMPLERATE_FOUND) - MESSAGE(FATAL_ERROR "libsamplerate not found") -ENDIF(NOT SAMPLERATE_FOUND) SET(SAMPLERATE_LIBS samplerate) SET(HAVE_LIBSAMPLERATE ON) MESSAGE(STATUS "Found samplerate library in ${SAMPLERATE_LIBDIR}") MESSAGE(STATUS "Found samplerate headers in ${SAMPLERATE_INCLUDEDIR}") # MESSAGE(STATUS " CFLAGS=${SAMPLERATE_CFLAGS}") # MESSAGE(STATUS " LDLAGS=${SAMPLERATE_LDFLAGS}") # MESSAGE(STATUS " LIBS=${SAMPLERATE_LIBS}") ############################################################################# ############################################################################# diff --git a/plugins/codec_audiofile/AudiofileDecoder.h b/plugins/codec_audiofile/AudiofileDecoder.h index 79ac22a3..7933d994 100644 --- a/plugins/codec_audiofile/AudiofileDecoder.h +++ b/plugins/codec_audiofile/AudiofileDecoder.h @@ -1,81 +1,81 @@ /************************************************************************* AudiofileDecoder.h - import through libaudiofile ------------------- begin : Tue May 28 2002 copyright : (C) 2002 by Thomas Eschenbacher email : Thomas.Eschenbacher@gmx.de ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ -#ifndef WAV_DECODER_H -#define WAV_DECODER_H +#ifndef AUDIOFILE_DECODER_H +#define AUDIOFILE_DECODER_H #include "config.h" #include "libkwave/Decoder.h" class QIODevice; class QWidget; namespace Kwave { class VirtualAudioFile; class AudiofileDecoder: public Kwave::Decoder { public: /** Constructor */ AudiofileDecoder(); /** Destructor */ virtual ~AudiofileDecoder(); /** Returns a new instance of the decoder */ virtual Kwave::Decoder *instance(); /** * Opens the source and decodes the header information. * @param widget a widget that can be used for displaying * message boxes or dialogs * @param source file or other source with a stream of bytes * @return true if succeeded, false on errors */ virtual bool open(QWidget *widget, QIODevice &source); /** * Decodes a stream of bytes into a MultiWriter * @param widget a widget that can be used for displaying * message boxes or dialogs * @param dst MultiWriter that receives the audio data * @return true if succeeded, false on errors */ virtual bool decode(QWidget *widget, Kwave::MultiWriter &dst); /** * Closes the source. */ virtual void close(); private: /** source of the audio data */ QIODevice *m_source; /** adapter for libaudiofile */ Kwave::VirtualAudioFile *m_src_adapter; }; } #endif /* AUDIOFILE_DECODER_H */ //*************************************************************************** //***************************************************************************