I am having a slight problem with my audio class. It just stops responding when I use this->sample[id].sample_id in the al_play_sample() function.
Here is the struct used to hold the data.
This is the vector that holds the array.
This is how I load, play and stop the sounds.
If I use this it works fine but then I have no sample id to stop it.
Any suggestions?
Use ALLEGRO_SAMPLE_ID foo; and pass &foo as the parameter. You are passing around a pointer to unallocated memory.
Thank you so much. It works fine now 
Edit: How do I thank you at the top?
"... is answered to my satisfaction"(there's a checkbox for it when you reply)
There is no boxes :/
{"name":"603949","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/7\/b7e48d0e185cce31f384c0bd795b76ee.png","w":1024,"h":768,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/7\/b7e48d0e185cce31f384c0bd795b76ee"}
Maybe this is because you didn't select "a question with a specific answer" or something like that...(when writing the OP)
When you create the thread, you have to select "A question or problem with a specific answer" under the Classification pulldown.
Ahh, I shall keep that in mind thanks guys