Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't Mac need WAV or wav? #2

Open
marybeckman opened this issue Aug 24, 2014 · 5 comments
Open

Doesn't Mac need WAV or wav? #2

marybeckman opened this issue Aug 24, 2014 · 5 comments
Labels

Comments

@marybeckman
Copy link
Contributor

I don't understand this procedure at lines 86-88:

procedure audio_extension
.extension$ = if (macintosh or unix) then ".WAV" else ".wav" endif
endproc

Since Mac and Unix are case sensitive, shouldn't the procedure be one that checks to see which case the extension has and then use it instead?

@tjmahr
Copy link
Member

tjmahr commented Aug 24, 2014

Sure, do that. I don't remember the rationale for that choice; I was refactoring code from the very first version of the NWR script when I made that one-liner.

@marybeckman
Copy link
Contributor Author

Tristan, I think the rationale for that choice was that my original code that you were refactoring was not only not very well commented but also convoluted to the point of total opacity, so ...

@patrickreidy, can you think of a simpler way to do this than I could?

@tjmahr
Copy link
Member

tjmahr commented Aug 24, 2014

To be fair re rationales, I didn't test on any Unix or Mac systems so I just trusted any platform-specific code in our scripts and hoped it would work.

@patrickreidy
Copy link
Contributor

Mary, I guess that you're suggestion of checking the case of the actual extension and then using that is the simplest solution... But can I ask whether the current L2T-Audio script causing errors due to audio extensions, or is this a modification to make the code clearer?

@marybeckman
Copy link
Contributor Author

Yes, the current L2T-Audio script causes errors for people running the scripts from a Mac, the way that I do, which I get around by renaming the handful of audio files that have extension .wav to be extension .WAV on the mirror of the tier2:DataAnalysis/.../Recordings directories on my hard drive. Doing that on the UMN server as well could be the cleanest solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants