kstenerud / ObjectAL-for-iPhone

Mac and iOS Audio development, minus the headache. ObjectAL is the easy Objective-C interface to OpenAL, AVAudioPlayer, and audio session management.
http://kstenerud.github.com/ObjectAL-for-iPhone
885 stars 171 forks source link

Crash on preloading sound files in iOS 7 simulator #61

Open intiQuo opened 11 years ago

intiQuo commented 11 years ago

Hi! I had a crash on iOS 7 simulator, when I try to preload sound file. It's not depend of what kind I try to preload, background or effect sounds. On iOS 6 simulator and device with iOS 7 app works correctly. Crash happensin init method when I want to take singleton of OALSimpleAudio :

- (id) init
{
    return [self initWithSources:kDefaultReservedSources];
}

If we look deeper, we can see in class ALWrapper, when we call method:

+ (ALCdevice*) openDevice:(NSString*) deviceName
{
    ALCdevice* device;
    @synchronized(self)
    {
        device = alcOpenDevice([deviceName UTF8String]);
        if(NULL == device)
        {
            OAL_LOG_ERROR(@"Could not open device %@", deviceName);
        }
    }
    return device;
}

deviceName is NULL.

Can anyone give me an answer how i can solve this problem?

Thanks.