Check whether cdparanoia has paranoia_cachemodel_size.

BUG: 254
This commit is contained in:
craig.p.drummond@gmail.com
2013-07-17 11:03:16 +00:00
committed by craig.p.drummond@gmail.com
parent 5350a9fd40
commit 2b6064492d
3 changed files with 14 additions and 0 deletions

View File

@@ -12,6 +12,8 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(CheckCSourceCompiles)
if (CDPARANOIA_INCLUDE_DIR AND CDPARANOIA_LIBRARIES)
# in cache already
SET(CDPARANOIA_FOUND TRUE)
@@ -33,4 +35,12 @@ else (CDPARANOIA_INCLUDE_DIR AND CDPARANOIA_LIBRARIES)
MARK_AS_ADVANCED(CDPARANOIA_INCLUDE_DIR CDPARANOIA_LIBRARIES)
if (CDPARANOIA_FOUND)
set(CMAKE_REQUIRED_INCLUDES ${CDPARANOIA_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${CDPARANOIA_LIBRARIES})
check_c_source_compiles("#include <cdda_interface.h>
#include <cdda_paranoia.h>
int main() { paranoia_cachemodel_size(0, 0); return 0; }"
CDPARANOIA_HAS_CACHEMODEL_SIZE)
endif (CDPARANOIA_FOUND)
endif (CDPARANOIA_INCLUDE_DIR AND CDPARANOIA_LIBRARIES)

View File

@@ -32,6 +32,7 @@
#cmakedefine ENABLE_REMOTE_DEVICES 1
#cmakedefine TAGLIB_CAN_SAVE_ID3VER 1
#cmakedefine ENABLE_PROXY_CONFIG 1
#cmakedefine CDPARANOIA_HAS_CACHEMODEL_SIZE 1
/*
This is done via CMake add_defintions - as it controls SLOT generation in GtkProxyStyle

View File

@@ -22,6 +22,7 @@
*/
#include "cdparanoia.h"
#include "config.h"
#include <QMutex>
#include <QMutexLocker>
#include <QSet>
@@ -52,7 +53,9 @@ CdParanoia::CdParanoia(const QString &device, bool full, bool noSkip, bool playb
setFullParanoiaMode(full);
if (playback) {
maxRetries=1;
#ifdef CDPARANOIA_HAS_CACHEMODEL_SIZE
paranoia_cachemodel_size(paranoia, 24);
#endif
}
}
}