31 #include <AudioToolbox/ExtendedAudioFile.h>
33 namespace cinder {
namespace audio {
namespace cocoa {
38 ::ExtAudioFileDispose( audioFile );
42 typedef std::unique_ptr<::OpaqueExtAudioFile, ExtAudioFileDeleter>
ExtAudioFilePtr;
60 size_t performRead(
Buffer *
buffer,
size_t bufferFrameOffset,
size_t numFramesNeeded )
override;
61 void performSeek(
size_t readPositionFrames )
override;
62 bool supportsConversion()
override {
return true; }
67 size_t mNumChannels, mSampleRateNative;
78 static ::AudioFileTypeID getFileTypeIdFromExtension(
const std::string &ext );
virtual ~SourceFileCoreAudio()
Definition: FileCoreAudio.cpp:58
SourceFileCoreAudio()
Definition: FileCoreAudio.cpp:41
GLsizei const GLchar ** string
Definition: GLee.h:2427
size_t getNumChannels() const override
Returns the number of channels.
Definition: FileCoreAudio.h:52
Loads and reads from an audio file source.
Definition: Source.h:83
std::shared_ptr< class SourceFile > SourceFileRef
Definition: Source.h:34
TargetFileCoreAudio(const DataTargetRef &dataTarget, size_t sampleRate, size_t numChannels, SampleType sampleType, const std::string &extension)
Definition: FileCoreAudio.cpp:145
static std::vector< std::string > getSupportedExtensions()
Definition: FileCoreAudio.cpp:121
std::unique_ptr<::OpaqueExtAudioFile, ExtAudioFileDeleter > ExtAudioFilePtr
Definition: FileCoreAudio.h:42
Definition: FileCoreAudio.h:44
std::unique_ptr<::AudioBufferList, AudioBufferListShallowDeleter > AudioBufferListShallowPtr
Definition: CinderCoreAudio.h:56
GLuint buffer
Definition: GLee.h:2065
SourceFileRef cloneWithSampleRate(size_t sampleRate) const override
Returns an copy of this Source with all properties identical except the sampleRate. This is useful if the SourceFile must match a samplerate that was unknown when it was first constructed.
Definition: FileCoreAudio.cpp:53
Base class that is used to create and write to an audio destination. Currently only supports ...
Definition: Target.h:36
void performWrite(const Buffer *buffer, size_t numFrames, size_t frameOffset) override
Definition: FileCoreAudio.cpp:181
Definition: FileCoreAudio.h:70
void operator()(::OpaqueExtAudioFile *audioFile)
Definition: FileCoreAudio.h:36
std::shared_ptr< class DataTarget > DataTargetRef
Definition: DataTarget.h:33
size_t getSampleRateNative() const override
Returns the true samplerate of the Source.
Definition: FileCoreAudio.h:53
SampleType
Identifiers sample types. Primarily used for encoding audio at different bitrates.
Definition: SampleType.h:29
Definition: FileCoreAudio.h:35
virtual ~TargetFileCoreAudio()
Definition: FileCoreAudio.h:73
std::shared_ptr< class DataSource > DataSourceRef
Definition: DataSource.h:35