-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
526 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# ChannelActive | ||
|
||
## Description | ||
Checks if a channel is currently playing audio or is paused. | ||
|
||
## Parameters | ||
`channel` | ||
|
||
: The ID of the channel to check. | ||
|
||
## Return Value | ||
Returns the result of the check as a `bool32`. The result will be `false` if the channel is in an idle state; otherwise, it will be `true`. | ||
|
||
## Syntax | ||
=== "C" | ||
|
||
``` c | ||
RSDK.ChannelActive(uint32 channel); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
channels[uint8 channel].IsActive(); | ||
``` | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
bool32 isActive = RSDK.ChannelActive(0); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
bool32 isActive = channels[0].IsActive(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# GetChannelPos | ||
|
||
## Description | ||
Gets the position of the current track in the given channel. | ||
|
||
## Parameters | ||
`channel` | ||
|
||
: The ID of the channel to check. | ||
|
||
## Return Value | ||
Returns the current position of the channel's track, in samples, as a `uint32`. | ||
|
||
## Syntax | ||
=== "C" | ||
|
||
``` c | ||
RSDK.GetChannelPos(uint32 channel); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
channels[uint8 channel].AudioPos(); | ||
``` | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
uint32 trackPos = RSDK.GetChannelPos(0); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
uint32 trackPos = channels[0].AudioPos(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# GetSfx | ||
|
||
## Description | ||
Retrieves the ID of the given sound effect. | ||
|
||
## Parameters | ||
`sfxPath` | ||
|
||
: The path of the sound effect. SFX must be defined in the GameConfig/StageConfig in order to be valid. | ||
|
||
## Return Value | ||
Returns the ID of the sound effect as a `uint16`. The return value will be `-1` if the sound effect is invalid. | ||
|
||
## Syntax | ||
=== "C" | ||
|
||
``` c | ||
RSDK.GetSfx(const char *sfxName); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
SoundFX.Get(const char *sfxName); | ||
``` | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
MyObject->mySfx = RSDK.GetSfx("Global/SoundFX.wav"); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
sVars->mySfx.Get("Global/SoundFX.wav"); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# PauseChannel | ||
|
||
## Description | ||
Pauses the currently playing audio in the given channel, if any is playing. The channel can be resumed with [ResumeChannel()](ResumeChannel.md). | ||
|
||
## Parameters | ||
`channel` | ||
|
||
: The ID of the channel to pause. | ||
|
||
## Return Value | ||
None. | ||
|
||
## Syntax | ||
=== "C" | ||
|
||
``` c | ||
RSDK.PauseChannel(uint32 channel); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
channels[uint8 channel].Pause(); | ||
``` | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
RSDK.PauseChannel(0); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
channels[0].Pause(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# PlaySfx <small>(RSDKv5)</small> | ||
|
||
## Description | ||
Plays the sound effect in the given slot, looping it if a loop point is set. | ||
|
||
## Parameters | ||
`sfx` | ||
|
||
: The slot of the sound effect. | ||
|
||
`loopPoint` | ||
|
||
: The sound effect's loop point, in samples. `0` will disable looping, `1` will loop from the beginning of the sound effect, and anything else is the sample to loop from. | ||
|
||
`priority` | ||
|
||
: The priority of the sound effect. | ||
|
||
## Return Value | ||
Returns the ID of the channel the sound effect plays in as an `int32`. The return value will be `-1` if the sound effect failed to play. | ||
|
||
## Syntax | ||
=== "C" | ||
|
||
``` c | ||
RSDK.PlaySfx(uint16 sfx, uint32 loopPoint, uint32 priority); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
SoundFX.Play(uint32 loopPoint, uint32 priority); | ||
``` | ||
``` cpp | ||
SoundFX.Play(); // loopPoint and priority default to 0 and 0xFF, respectively | ||
``` | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
RSDK.PlaySfx(MyObject->mySfx, 0, 0xFF); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
sVars->mySfx.Play(0, 0xFF); | ||
``` | ||
``` cpp | ||
sVars->mySfx.Play(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# PlayStream | ||
|
||
## Description | ||
Plays the given music file, looping it if set to do so. | ||
|
||
## Parameters | ||
`filename` | ||
|
||
: The file path to load the music file from, relative to `Data/Music/`. The music file must be in OGG format. | ||
|
||
`id` | ||
|
||
: The ID of the channel to play the track in. If the given number is `16` or higher, the channel will be automatically chosen. | ||
|
||
`startPos` | ||
|
||
: The point of the track to start at, in samples. `0` will play the track from the beginning. | ||
|
||
`loopPoint` | ||
|
||
: The track's loop point, in samples. `0` will disable looping, `1` will loop from the beginning of the track, and anything else is the sample to loop from. | ||
|
||
`loadASync` | ||
|
||
: If true, loads the track asynchronously. This should usually be `true`, unless the track is for a video/image, in which case it should be `false`. | ||
|
||
## Return Value | ||
Returns the ID of the channel the track plays in as an `int32`. The return value will be `-1` if the track failed to play. | ||
|
||
## Syntax | ||
=== "C" | ||
|
||
``` c | ||
RSDK.PlayStream(const char *filename, uint32 slot, uint32 startPos, uint32 loopPoint, bool32 loadASync); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
channels[uint8 slot].PlayStream(const char *filename, uint32 startPos, uint32 loopPoint, bool32 loadASync); | ||
``` | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
RSDK.PlayStream("Test.ogg", 0, 0, 0, true); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
channels[0].PlayStream("Test.ogg", 0, 0, true); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# ResumeChannel | ||
|
||
## Description | ||
If the given channel's audio has been paused with [PauseChannel()](PauseChannel.md), resumes playing the audio. | ||
|
||
## Parameters | ||
`channel` | ||
|
||
: The ID of the channel to resume. | ||
|
||
## Return Value | ||
None. | ||
|
||
## Syntax | ||
=== "C" | ||
|
||
``` c | ||
RSDK.ResumeChannel(uint32 channel); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
channels[uint8 channel].Resume(); | ||
``` | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
RSDK.ResumeChannel(0); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
channels[0].Resume(); | ||
``` |
Oops, something went wrong.