Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 527 Bytes

File metadata and controls

19 lines (13 loc) · 527 Bytes

Prerequisites

MyOpenAL requires two frameworks:

  • OpenAL (/System/Library/Frameworks/OpenAL.framework)
  • AudioToolbox (/System/Library/Frameworks/AudioToolbox.framework)

Usage

// Initializing OpenAL.
MyOpenAL* myOpenAL = myOpenAL = [[MyOpenAL alloc] init];

// Loading sound file castaned.wav and saving reference.
NSUInteger sound = [myOpenAL loadSoundFromFile:@"castaned" ext:@"wav" withLoop:false];

// Playing it with given sound level (volume).
[myOpenAL playSoundWithId:soundOne atVolume:0.75f];