~ as a shortcut for the home directory not supported (OSX)
Heyho Nicola,
I am using ofxPDSP's sample buffer and i just ran into a problem when using ~ instead of /Users/thomasgeissl/. Not sure this is supported in c++ at all. Maybe it is just in the underlying mp3 libary not support. I am wondering if ofxAudioFile should support this. What's your opinion on this?
I guess some regexps and ofFilePath::getUserHomeDir() could fix it.
// _deckA->load("/Users/thomasgeissl/Desktop/Radiohead_Idioteque.mp3"); //works
_deckA->load("~/Desktop/Radiohead_Idioteque.mp3"); // gives me an error
Thomas
ah, i don't think it is a c++ feature, but I found this that could help (if it works on all *nix ) https://stackoverflow.com/questions/2910377/get-home-directory-in-linux you can automatically substitute ~ in path when you find it
it would be nice to have a getHomeDirectory() method in ofFilePath, maybe i could do a PR when i will have time (end of the month)