jamoma / JamomaCore

Jamoma Frameworks for Audio and Control Structure
Other
36 stars 14 forks source link

Is there a why to get the relative path of Jamoma project in C++ code? #157

Closed nwolek closed 10 years ago

nwolek commented 11 years ago

Right now, the unit tests below will fail on another person's machine because they use absolute file paths. Is there currently a way to get the relative path of Jamoma? That way I could include a sound file with the source code and point to it for unit tests.

https://github.com/jamoma/JamomaCore/blob/dev/DSP/extensions/SoundfileLib/tests/TTSoundfile.test.cpp https://github.com/jamoma/JamomaCore/blob/dev/DSP/extensions/SoundfileLib/tests/TTSoundfileLoader.test.cpp https://github.com/jamoma/JamomaCore/blob/dev/DSP/library/tests/TTSampleMatrix.test.cpp https://github.com/jamoma/JamomaCore/blob/dev/DSP/library/tests/TTBuffer.test.cpp

tap commented 11 years ago

https://github.com/jamoma/JamomaCore/blob/master/Foundation/library/source/TTFoundation.cpp#L141

Perhaps this code should be factored-out into its own function if we will use it in more than one place.

nwolek commented 10 years ago

Forgot to note that I made this work here: https://github.com/jamoma/JamomaCore/blob/master/DSP/extensions/SoundfileLib/tests/TTSoundfileLoader.test.cpp#L60

Tim's observation that we should perhaps have a function for this is still valid though.

tap commented 10 years ago

do we have a separate ticket for the relative path feature request?

best, Tim

On Sat, Feb 8, 2014 at 10:26 AM, nwolek notifications@github.com wrote:

Forgot to note that I made this work here:

https://github.com/jamoma/JamomaCore/blob/master/DSP/extensions/SoundfileLib/tests/TTSoundfileLoader.test.cpp#L60

Tim's observation that we should perhaps have a function for this is still valid though.

— Reply to this email directly or view it on GitHubhttps://github.com/jamoma/JamomaCore/issues/157#issuecomment-34548162 .

nwolek commented 10 years ago

It is now #203