Hi,
Noob here.
I'm writing a simple random audio player and attempting to load all of my files into an array from which a file will be randomly selected. Here's my code:
I'm using openFrameworks libraries, hence the setup() and loadSound() functions. (songTrack() is the function that makes the random selection).
The problem I'm having is in loading the files in the first place. I continually get a segmentation fault. What am I doing wrong here? Is there a better way to do this?
Thanks!
Thanks!
That's a much more elegant solution.
But I'm still getting a segmentation fault. Even when I only try to load one or two files.
What's causing this?
Try setting a breakpoint and stepping through with your code with a debugger and see where it crashes. Once you find where, post the function and all related functions so we can look at it.