TWOEARS / auditory-front-end

Two!Ears Auditory Model - Auditory front-end module
http://docs.twoears.eu/en/latest/afe/
GNU General Public License v2.0
16 stars 10 forks source link

addPathsIfNotIncluded() breaks standalone version #12

Closed hagenw closed 7 years ago

hagenw commented 8 years ago

The AFE was designed to be used without all other parts of Two!Ears (including main). The function addPathsIfNotIncluded() introduced in #7 breaks this as this function is only available in main. I see two solutions to this problem: 1) Simply copy the code from addPathsIfNotIncluded() into startAuditoryFrontEnd() 2) Add the function to the AFE as well

I would be in favor of the first approach. Is this fine, or would there be further problems?

ivo--t commented 8 years ago

I support your approach (1).

This could also be the solution to integrating this fix into the binsim, @fietew ? I guess you haven't merged my respective pull request exactly because of this reason?

hagenw commented 8 years ago

I created the branch addpathes where I changed startAuditoryFrontEnd accordingly. During those changes I stumbled over two other things: 1) The test/ folders are normally not included in the start scripts. @Hardcorehobel: was there a special reason why it was included in startAuditoryFrontEnd? In my changes I removed the folder. 2) The path creation with strsplit( genpath(fullfile(basePath, 'src')), pathsep ) returns '' which cannot be found in the current pathes, so addpath was still called every time you call startAuditoryFrontEnd. I changed this by using explicitly path names in startAuditoryFrontEnd. This might have the downside that you add a new folder to src/ and forget to add it to startAuditoryFrontEnd as well. So, maybe there is a better solution?

Hardcorehobel commented 7 years ago

Merged pull request