@cyrstem wrote:
Hi, have an issue with this idea i been trying to read mp3 files from a folder like the dirListExample from openframeworks but in the part where you have to interate the vector im not sure what to do how do i treat a of vector ofSoundPlayer im
.cpp fromofDirectory dir; vector<ofSoundPlayer>sounds; int current; dir.listDir("audio"); dir.sort(); if( dir.size() ){ sounds.assign(dir.size(), ofImage()); +=======this part also what? should i use instead of ofImage ofLog(OF_LOG_NOTICE,"songs loaded"); } // you can now iterate through the files and load them into the ofImage vector // for(int i = 0; i < (int)dir.size(); i++){ // sounds[i].load(dir.getPath(i)); // }
im i on the right track ? or this code will not work with audio files like it does with image files
Thanks!!!
Posts: 2
Participants: 2