From 2c45cd44a9f9915f0039fa0f117af9296c0308ee Mon Sep 17 00:00:00 2001 From: mchinen Date: Mon, 16 Jan 2012 09:47:58 +0000 Subject: [PATCH] Bug 311 (PX) Fix slow import/export with OGG files for linux builds that use system libsndfile. Disables OGG (Which isn't supported in our local libsndfile). --- src/import/ImportPCM.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/import/ImportPCM.cpp b/src/import/ImportPCM.cpp index b786a484e..6ad7643d7 100644 --- a/src/import/ImportPCM.cpp +++ b/src/import/ImportPCM.cpp @@ -144,6 +144,20 @@ ImportFileHandle *PCMImportPlugin::Open(wxString filename) //char str[1000]; //sf_error_str((SNDFILE *)NULL, str, 1000); + return NULL; + } else if (file && + (info.format & SF_FORMAT_TYPEMASK) == SF_FORMAT_OGG) { + // mchinen 15.1.2012 - disallowing libsndfile to handle + // ogg files because seeking is broken at this date (very slow, + // seeks from beginning of file each seek). + // This was said by Erik (libsndfile maintainer). + // Note that this won't apply to our local libsndfile, so only + // linux builds that use --with-libsndfile=system are affected, + // as our local libsndfile doesn't do OGG. + // In particular ubuntu 10.10 and 11.04 are known to be affected + // When the bug is fixed, we can check version to avoid only + // the broken builds. + return NULL; }