Feature #15

Add AudioFileReader implementation for QTKit

Added by Chris Cannam over 13 years ago. Updated over 9 years ago.

Status:ClosedStart date:2010-10-04
Priority:NormalDue date:
Assignee:Luis Figueira% Done:

0%

Category:-
Target version:-

Description

The svcore library contains an audio file import class that uses the Apple QuickTime framework. This is found in data/fileio/QuickTimeFileReader.{cpp,h}, and it works OK. It reads an audio file in any format supported by QuickTime, either in a single blocking loop when it is constructed, or in a background thread after construction (depending on its DecodeMode setting).

Unfortunately there appears to be no 64-bit implementation of QuickTime, and from OS/X 10.6 the preferred framework for audio I/O is QTKit (see the QuickTime developers' page) which has a completely separate API.

So, we need a QTKit implementation of the audio importer.

This would presumably be another class, similar in structure to QuickTimeFileReader, but separate from it (we need to keep QuickTimeFileReader around because QuickTime is the only API available on earlier versions of OS/X). It would subclass and implement AudioFileReader, and be returned by AudioFileReaderFactory in place of the QuickTimeFileReader if some suitable symbol (e.g. HAVE_QTKIT) is defined.

I guess the way to start with this is to have a look at the QuickTimeFileReader implementation and become somewhat familiar with the way it uses QuickTime (e.g. use of the CodedAudioFileReader base class to provide a file-backed cache to decode into; threading structure; etc), and then compare the new QTKit API to determine just how different it is and whether it can be supported with a relatively simple cut-paste-and-edit or whether it will need (for example) a deep understanding of Objective-C. For the moment I'm assuming that it is even possible to use the Objective-C API from a C++ class -- I don't know that for sure though.

Success criterion: An application that uses svcore (for example, sonic-annotator or sonic-visualiser) should be able to import any audio file format supported by QTKit, when running on the proper platform, even when no other file importer implementations (e.g. libsndfile or libmad) are compiled in.

Fancy a look at this one?

History

#1 Updated by Chris Cannam over 9 years ago

  • Status changed from New to Closed

Also available in: Atom PDF