University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Compile error in sbm_speech_audiofile.cpp | General SmartBody Discussion | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Compile error in sbm_speech_audiofile.cpp
June 21, 2012
12:46 am
Avatar
Member
Members
Forum Posts: 80
Member Since:
June 13, 2012
sp_UserOfflineSmall Offline

In smartbody-lib/src/sbm/sbm_speech_audiofile.cpp, there is recently-added code that uses _fullpath, a Windows-only API. The POSIX equivalent to

_fullpath( fullAudioPath, relativeAudioPath.c_str(), _MAX_PATH )

would be

realpath( relativeAudioPath.c_str(), fullAudioPath )

(This forum software doesn't support any formatting markup?)

What convention does SmartBody use for platform-specific code, something like #if WIN32?

June 21, 2012
2:30 pm
Avatar
Admin
Forum Posts: 980
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

We try to use cross-platform APIs as much as possible. In this case, we should have used the boost filesystem API as we are doing later in that same file. For cases when we need to do something platform specific, we are doing:

#ifdef WIN32

and

#ifdef __APPLE__

and

#ifdef __ANDROID__

Sometimes, a functioning OSX build will lag a day or two behind the latest Windows version.

I'll check in these fixes for OSX.
Ari

Forum Timezone: America/Los_Angeles

Most Users Ever Online: 733

Currently Online: anton.1988dmon, reevesabrams72, downey74downey, MyraRoberso52, roseadams45, jessicaross68, Nasreen Zamir, skillfulgala4636, jeff345qs
44 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

jwwalker: 80

jyambao: 51

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 67

Members: 55092

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 429

Posts: 2348