|
JubeatPlus 3.9.11
|
Loads one audio file into an OpenAL buffer and plays it on demand. More...
#include <SePlayer.h>


Instance Methods | |
| (instancetype) | - initWithPath: |
Opens an OpenAL stack and loads the file at path into it. | |
| (void) | - sePlay |
| Plays the loaded sound from the start. | |
| (void) | - terminate |
| Stops playback and tears the whole OpenAL stack down. | |
Loads one audio file into an OpenAL buffer and plays it on demand.
The class declares no properties; its five ivars are the OpenAL handles and the decoded sample data, which it owns and must free through -terminate.
| - (instancetype) initWithPath: | (nullable NSString *) | path |
Opens an OpenAL stack and loads the file at path into it.
Note that a device that fails to open is not treated as fatal: the buffer and source are simply never generated, and the load continues against handle zero.
| path | A filesystem path, converted to a file URL before decoding. |
| - (void) sePlay |
Plays the loaded sound from the start.
Non-looping.
| - (void) terminate |
Stops playback and tears the whole OpenAL stack down.
Deletes the buffer and source, destroys the context, closes the device and frees the sample data, then zeroes all five ivars. Must be called explicitly — the class has no -dealloc, so an instance that is simply released leaks its device and its sample buffer.