Skip to content

Commit

Permalink
several syntax fixes. still does not build with clang.
Browse files Browse the repository at this point in the history
  • Loading branch information
nwolek committed Jun 8, 2013
1 parent 2a300f3 commit cbbaec8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
16 changes: 2 additions & 14 deletions DSP/extensions/SoundfileLib/TTSoundfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@

#include "TTSoundfile.h"

TTObjectBasePtr TTSoundfile::instantiate(TTSymbol& name, TTValue& arguments)
{
return new TTSoundfile(arguments);
}


extern "C" void TTSoundfile::registerClass()
{
TTClassRegister(thisTTClassName, thisTTClassTags, TTSoundfile::instantiate);
}

TT_AUDIO_CONSTRUCTOR,
mFilePath(kTTSymEmpty),
mNumChannels(0),
Expand All @@ -38,8 +27,7 @@ mTitle(kTTSymEmpty),
mArtist(kTTSymEmpty),
mDate(kTTSymEmpty),
mAnnotation(kTTSymEmpty),
mSoundFile(NULL),
mSoundFileInfo(NULL)
mSoundFile(NULL)
{
// add the attributes and messages here
addAttributeWithSetter(FilePath, kTypeSymbol);
Expand All @@ -48,7 +36,7 @@ mSoundFileInfo(NULL)
// need to add the rest of these here...
addAttribute(SampleRate, kTypeFloat64);
addAttributeProperty(SampleRate, readOnly, kTTBoolYes);
addAttribute(DurationInSamples, TTInt64);
addAttribute(DurationInSamples, kTypeInt64);
addAttributeProperty(DurationInSamples, readOnly, kTTBoolYes);
addAttribute(DurationInSeconds, kTypeFloat64);
addAttributeProperty(DurationInSeconds, readOnly, kTTBoolYes);
Expand Down
14 changes: 7 additions & 7 deletions DSP/extensions/SoundfileLib/TTSoundfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ class TTSoundfile : public TTAudioObjectBase {
SNDFILE* mSoundFile; ///< libsndfile handle for the actual file we open
SF_INFO mSoundFileInfo; ///< libsndfile metadata for the file we open

};

/** Atribute accessor. Send a filepath to the object and attempt to interface with the file.
@param newValue full POSIX path to the file, including file name
@return TTErr returns kTTErrNone until futher notice
*/
TTErr setFilePath(const TTValue& newValue);

};

/** Atribute accessor. Send a filepath to the object and attempt to interface with the file.
@param newValue full POSIX path to the file, including file name
@return TTErr returns kTTErrNone until futher notice
*/
TTErr TTSoundfile::setFilePath(const TTValue& newValue);
typedef TTSoundfile* TTSoundfilePtr;

#endif

0 comments on commit cbbaec8

Please sign in to comment.