ObjectAL
 All Classes Functions Variables Properties Pages
Class Methods | List of all members
OALTools Class Reference

Miscellaneous tools used by ObjectAL. More...

#import <OALTools.h>

Inheritance diagram for OALTools:

Class Methods

(void) + setDefaultBundle:
 Set the default bundle to use when looking up paths. More...
 
(NSBundle *) + defaultBundle
 The default bundle used when looking up paths. More...
 
(NSURL *) + urlForPath:
 Returns the URL corresponding to the specified path. More...
 
(NSURL *) + urlForPath:bundle:
 Returns the URL corresponding to the specified path. More...
 
(void) + notifyExtAudioError:function:description:
 Notify an error if the specified ExtAudio error code indicates an error. More...
 
(void) + notifyAudioSessionError:function:description:
 Notify an error if the specified AudioSession error code indicates an error. More...
 

Detailed Description

Miscellaneous tools used by ObjectAL.

Method Documentation

+ (NSBundle *) defaultBundle

The default bundle used when looking up paths.

return The default bundle.

+ (void) notifyAudioSessionError: (OSStatus)  errorCode
function: (const char*)  function
description: (NSString*)  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.

Parameters
errorCode,:The error code returned from an OS call.
function,:The function name where the error occurred.
description,:A printf-style description of what happened.
+ (void) notifyExtAudioError: (OSStatus)  errorCode
function: (const char*)  function
description: (NSString*)  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.

Parameters
errorCode,:The error code returned from an OS call.
function,:The function name where the error occurred.
description,:A printf-style description of what happened.
+ (void) setDefaultBundle: (NSBundle*)  bundle

Set the default bundle to use when looking up paths.

Parameters
bundleThe new default bundle.
+ (NSURL *) urlForPath: (NSString*)  path

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.

Parameters
pathThe path to convert to a URL.
Returns
The corresponding URL or nil if a URL could not be formed.
+ (NSURL *) urlForPath: (NSString*)  path
bundle: (NSBundle*)  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.

Parameters
pathThe path to convert to a URL.
bundleThe bundle to look inside for relative paths.
Returns
The corresponding URL or nil if a URL could not be formed.

The documentation for this class was generated from the following files: