Inherits from NSObject
Declared in OALTools.h

Overview

Miscellaneous tools used by ObjectAL.

Class Methods

defaultBundle

The default bundle used when looking up paths.

+ (NSBundle *)defaultBundle

Discussion

return The default bundle.

Declared In

OALTools.h

notifyAudioSessionError:function:description:

Notify an error if the specified AudioSession error code indicates an error. This will log the error and also potentially post an audio error notification (OALAudioErrorNotification) if it is suspected that this error is a result of the audio session getting corrupted.

+ (void)notifyAudioSessionError:(OSStatus)errorCode function:(const char *)function description:(NSString *)description, ...

Parameters

function:

The function name where the error occurred.

description:

A printf-style description of what happened.

errorCode:

The error code returned from an OS call.

Declared In

OALTools.h

notifyExtAudioError:function:description:

Notify an error if the specified ExtAudio error code indicates an error. This will log the error and also potentially post an audio error notification (OALAudioErrorNotification) if it is suspected that this error is a result of the audio session getting corrupted.

+ (void)notifyExtAudioError:(OSStatus)errorCode function:(const char *)function description:(NSString *)description, ...

Parameters

function:

The function name where the error occurred.

description:

A printf-style description of what happened.

errorCode:

The error code returned from an OS call.

Declared In

OALTools.h

setDefaultBundle:

Set the default bundle to use when looking up paths.

+ (void)setDefaultBundle:(NSBundle *)bundle

Parameters

bundle

The new default bundle.

Declared In

OALTools.h

urlForPath:

Returns the URL corresponding to the specified path. If the path is not absolute (starts with a “/”), this method will look for the file in the default bundle.

+ (NSURL *)urlForPath:(NSString *)path

Parameters

path

The path to convert to a URL.

Return Value

The corresponding URL or nil if a URL could not be formed.

Declared In

OALTools.h

urlForPath:bundle:

Returns the URL corresponding to the specified path. If the path is not absolute (starts with a “/”), this method will look for the file in the specified bundle.

+ (NSURL *)urlForPath:(NSString *)path bundle:(NSBundle *)bundle

Parameters

path

The path to convert to a URL.

bundle

The bundle to look inside for relative paths.

Return Value

The corresponding URL or nil if a URL could not be formed.

Declared In

OALTools.h