remove woebegone changes to base STK class

This commit is contained in:
Ariel Elkin
2014-03-14 18:34:43 +00:00
parent b7cbce0ced
commit 742cf6a202
2 changed files with 0 additions and 41 deletions

View File

@@ -174,9 +174,6 @@ public:
//! Static method that returns the current rawwave path.
static std::string rawwavePath(void) { return rawwavepath_; }
//! Static method to set the rawwave path on platforms where library resources are loaded dynamically.
static void setRawwavePathForDynamicallyLoadedRawwaves ( void );
//! Static method that sets the STK rawwave path.
static void setRawwavePath( std::string path );
@@ -522,9 +519,6 @@ const unsigned int RT_BUFFER_SIZE = 512;
// the various STK core classes (ex. Clarinet.cpp). If you wish to
// move the rawwaves directory to a different location in your file
// system, you will need to set this path definition appropriately.
// Platforms that load resources dynamically will call
// Stk::setRawwavePathForDynamicallyLoadedRawwaves() and set the raw
//wave path accordingly.
#if !defined(RAWWAVE_PATH)
#define RAWWAVE_PATH "../../rawwaves/"
#endif
@@ -532,10 +526,6 @@ const unsigned int RT_BUFFER_SIZE = 512;
const StkFloat PI = 3.14159265358979;
const StkFloat TWO_PI = 2 * PI;
const StkFloat ONE_OVER_128 = 0.0078125;
#ifdef __APPLE__
#include "TargetConditionals.h"
#endif
#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__WINDOWS_MM__)
#define __OS_WINDOWS__
@@ -545,8 +535,6 @@ const StkFloat ONE_OVER_128 = 0.0078125;
#define __STK_REALTIME__
#elif defined(__IRIX_AL__)
#define __OS_IRIX__
#elif defined TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
#define __OS_IOS__
#elif defined(__MACOSX_CORE__) || defined(__UNIX_JACK__)
#define __OS_MACOSX__
#define __STK_REALTIME__

View File

@@ -71,41 +71,12 @@ std::ostringstream Stk :: oStream_;
Stk :: Stk( void )
: ignoreSampleRateChange_(false)
{
setRawwavePathForDynamicallyLoadedRawwaves();
}
Stk :: ~Stk( void )
{
}
#ifdef __OS_IOS__
#include <CoreFoundation/CoreFoundation.h>
#endif
void Stk :: setRawwavePathForDynamicallyLoadedRawwaves ( void )
{
static bool rawwavesPathSet;
if (!rawwavesPathSet)
{
#ifdef __OS_IOS__
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef url = CFBundleCopyResourceURL(mainBundle, CFSTR("rawwaves"), CFSTR("bundle"), NULL);
if (url) {
CFStringRef rawwavesPathCFString = CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle);
CFIndex length = CFStringGetLength(rawwavesPathCFString);
CFIndex maxSize = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8);
char *rawwavesPathCString = (char *)malloc(maxSize);
CFStringGetCString(rawwavesPathCFString, rawwavesPathCString, maxSize, kCFStringEncodingUTF8);
std::string str(rawwavesPathCString);
setRawwavePath(rawwavesPathCString);
CFRelease(url);
CFRelease(rawwavesPathCFString);
}
#endif
rawwavesPathSet = true;
}
}
void Stk :: setSampleRate( StkFloat rate )
{
if ( rate > 0.0 && rate != srate_ ) {