So, I've previously been using my own OpenAL code but I recently started using CD instead, because I didn't have anything written to clean up and reload sounds. We're adding levels to a game and will have many sounds for each level with little to no overlap. So, I'm writing code so that all the buffers are cleared and then reloaded when a new level is loaded.
Problem I'm getting is that some buffers refuse to unload. Im stopping all sounds prior to the unload loop, which iterates through the 32 buffers and calls unloadBuffer on each. The log results are as follows:
2010-02-08 15:14:17.444 [5686:207] Denshion error deleting buffer: a003
2010-02-08 15:14:17.445 [5686:207] Denshion buffer 1 successfully unloaded
2010-02-08 15:14:17.445 [5686:207] Denshion buffer 2 successfully unloaded
2010-02-08 15:14:17.445 [5686:207] Denshion error deleting buffer: a004
2010-02-08 15:14:17.446 [5686:207] Denshion error deleting buffer: a004
2010-02-08 15:14:17.446 [5686:207] Denshion error deleting buffer: a004
2010-02-08 15:14:17.447 [5686:207] Denshion buffer 6 successfully unloaded
2010-02-08 15:14:17.447 [5686:207] Denshion buffer 7 successfully unloaded
2010-02-08 15:14:17.447 [5686:207] Denshion buffer 8 successfully unloaded
2010-02-08 15:14:17.448 [5686:207] Denshion buffer 9 successfully unloaded
2010-02-08 15:14:17.448 [5686:207] Denshion buffer 10 successfully unloaded
2010-02-08 15:14:17.448 [5686:207] Denshion buffer 11 successfully unloaded
2010-02-08 15:14:17.449 [5686:207] Denshion buffer 12 successfully unloaded
2010-02-08 15:14:17.449 [5686:207] Denshion buffer 13 successfully unloaded
2010-02-08 15:14:17.449 [5686:207] Denshion buffer 14 successfully unloaded
2010-02-08 15:14:17.450 [5686:207] Denshion buffer 15 successfully unloaded
2010-02-08 15:14:17.450 [5686:207] Denshion buffer 16 successfully unloaded
2010-02-08 15:14:17.451 [5686:207] Denshion buffer 17 successfully unloaded
2010-02-08 15:14:17.451 [5686:207] Denshion buffer 18 successfully unloaded
2010-02-08 15:14:17.452 [5686:207] Denshion buffer 19 successfully unloaded
2010-02-08 15:14:17.452 [5686:207] Denshion buffer 20 successfully unloaded
2010-02-08 15:14:17.453 [5686:207] Denshion buffer 21 successfully unloaded
2010-02-08 15:14:17.453 [5686:207] Denshion buffer 22 successfully unloaded
2010-02-08 15:14:17.453 [5686:207] Denshion buffer 23 successfully unloaded
2010-02-08 15:14:17.454 [5686:207] Denshion buffer 24 successfully unloaded
2010-02-08 15:14:17.454 [5686:207] Denshion buffer 25 successfully unloaded
2010-02-08 15:14:17.455 [5686:207] Denshion buffer 26 successfully unloaded
2010-02-08 15:14:17.455 [5686:207] Denshion buffer 27 successfully unloaded
2010-02-08 15:14:17.455 [5686:207] Denshion buffer 28 successfully unloaded
2010-02-08 15:14:17.456 [5686:207] Denshion buffer 29 successfully unloaded
2010-02-08 15:14:17.457 [5686:207] Denshion buffer 30 successfully unloaded
2010-02-08 15:14:17.457 [5686:207] Denshion buffer 31 successfully unloaded
If I leave out the unload and instead let loadBuffer handle the unloadBuffer call, I get the same errors. For example:
2010-02-08 15:14:17.480 [5686:a517] Denshion: Loading openAL buffer 0 tap.caf
2010-02-08 15:14:17.487 [5686:a517] Denshion: non empty buffer, regenerating
2010-02-08 15:14:17.488 [5686:a517] Denshion: error deleting buffer: a004
Since I stop all sounds prior to unloading, I don't imagine the sound playing to be an issue.
Each time I unload and load buffers, more of them throw errors on load.
Anyone have experience with this or have any suggestions? Much appreciated.