JubeatPlus 3.9.11
Loading...
Searching...
No Matches
SePlayer Class Reference

Loads one audio file into an OpenAL buffer and plays it on demand. More...

#include <SePlayer.h>

Inheritance diagram for SePlayer:
Collaboration diagram for SePlayer:

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.

Detailed Description

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.

Method Documentation

◆ initWithPath:

- (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.

Parameters
pathA filesystem path, converted to a file URL before decoding.
Returns
The initialised player.
Ghidra address:
0x153b34

◆ sePlay

- (void) sePlay

Plays the loaded sound from the start.

Non-looping.

Ghidra address:
0x153ed0
Ghidra address:
0x153ed0

◆ terminate

- (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.

Ghidra address:
0x153ee0
Ghidra address:
0x153ee0

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