I'm using the BASS sound library and I've got a question that maybe somebody else using the BASS sound library knows.
A memory leak is showing up in Leaks when I profile this simple test code to play back a mod music file using BASS:
BASS_SetConfig(BASS_CONFIG_IOS_MIXAUDIO, 0); // Disable mixing. To be called before BASS_Init.
if (HIWORD(BASS_GetVersion()) != BASSVERSION)
NSLog(@"An incorrect version of BASS was loaded");
// Initialize default device.
if (!BASS_Init(-1, 44100, 0, NULL, NULL))
NSLog(@"Can't initialize device");
//-- Test tracker music playback
NSString *respath = [[NSBundle mainBundle] pathForResource:@"song" ofType:@"it"];
musicChannel = BASS_MusicLoad(FALSE, [respath cStringUsingEncoding:NSUTF8StringEncoding], 0, 0, BASS_MUSIC_AUTOFREE, 0);
NSLog(@"Can't load music!");
If I comment out the BASS_MusicLoad() call, the leak goes away.
The leak goes back to a malloc which was called by BASS_Background.
I'm testing on a device, not simulator.