Skip to content

Commit 49cd9f1

Browse files
committed
Improved docs for the recursive json methods
1 parent d67e895 commit 49cd9f1

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

Superpowered/SuperpoweredAdvancedAudioPlayer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,11 @@ class AdvancedAudioPlayer {
370370
/// @return If true, the player is playing backwards.
371371
JSWASM bool isReverse();
372372

373-
/// @brief Starts on changes pitch bend (temporary playback rate change).
373+
/// @brief Starts or changes pitch bend (temporary playback rate change).
374374
/// @param maxPercent The maximum playback rate range for pitch bend, should be between 0.01f and 0.3f (1% and 30%).
375375
/// @param bendStretch Use time-stretching for pitch bend or not (false makes it "audible").
376376
/// @param faster True: faster, false: slower.
377-
/// @param holdMs How long to maintain the pitch bend state. A value >= 1000 will hold until endContinuousPitchBend is called.
377+
/// @param holdMs How long to maintain the pitch bend state. A value >= 1000 will hold until endContinuousPitchBend is called. A value < 40 will not "ramp up" pitch bend, but will apply it immediately.
378378
JSWASM void pitchBend(float maxPercent, bool bendStretch, bool faster, unsigned int holdMs);
379379

380380
/// @brief Ends pitch bend.

Superpowered/SuperpoweredJSON.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ namespace Superpowered {
8282
/// @return Pointer to a child or NULL if not found.
8383
json *atKeyWithType(const char *key, jtype type);
8484

85-
/// @brief Returns with a pointer to a child with the corresponding key in any depth. Example: item->atKeyRecursive("animals", "mammal", "cat");
85+
/// @brief Returns with a pointer to a child with the corresponding key in any depth. Example: item->atKeyRecursive("animals", "mammal", "cat", NULL);
8686
/// @param key The key or name of the item to be found.
87-
/// @param ... Other child keys.
87+
/// @param ... Other child keys. Must end with NULL!
8888
/// @return Pointer to an item or NULL if not found.
8989
json *atKeyRecursive(const char *key, ...);
9090

91-
/// @brief Returns with a pointer to a child with the corresponding key and type in any depth. Example: item->atKeyWithTypeRecursive(jstring, "animals", "mammal", "cat");
91+
/// @brief Returns with a pointer to a child with the corresponding key and type in any depth. Example: item->atKeyWithTypeRecursive(jstring, "animals", "mammal", "cat", NULL);
9292
/// @param type The type of the item to be found.
9393
/// @param key The key or name of the item to be found.
94-
/// @param ... Other child keys.
94+
/// @param ... Other child keys. Must end with NULL!
9595
/// @return Pointer to an item or NULL if not found.
9696
json *atKeyWithTypeRecursive(jtype type, const char *key, ...);
9797

@@ -154,45 +154,45 @@ namespace Superpowered {
154154
/// @return The item or NULL if the item is not found.
155155
json *objectAtKey(const char *key);
156156

157-
/// @brief Finds a jtype == null item in the child hierarchy. item->nullAtKeyRecursive("animals", "mammal", "cat");
157+
/// @brief Finds a jtype == null item in the child hierarchy. item->nullAtKeyRecursive("animals", "mammal", "cat", NULL);
158158
/// @param key The key or name of the item.
159-
/// @param ... Other child keys.
159+
/// @param ... Other child keys. Must end with NULL!
160160
/// @return The item or NULL if the item is not found.
161161
json *nullAtKeyRecursive(const char *key, ...);
162162

163-
/// @brief Finds a jtype == jbool item in the child hierarchy. item->boolAtKeyRecursive("animals", "mammal", "cat");
163+
/// @brief Finds a jtype == jbool item in the child hierarchy. item->boolAtKeyRecursive("animals", "mammal", "cat", NULL);
164164
/// @param key The key or name of the item.
165-
/// @param ... Other child keys.
165+
/// @param ... Other child keys. Must end with NULL!
166166
/// @return The item or NULL if the item is not found.
167167
json *boolAtKeyRecursive(const char *key, ...);
168168

169-
/// @brief Finds a jtype == jint item in the child hierarchy. item->intAtKeyRecursive("animals", "mammal", "cat");
169+
/// @brief Finds a jtype == jint item in the child hierarchy. item->intAtKeyRecursive("animals", "mammal", "cat", NULL);
170170
/// @param key The key or name of the item.
171-
/// @param ... Other child keys.
171+
/// @param ... Other child keys. Must end with NULL!
172172
/// @return The item or NULL if the item is not found.
173173
json *intAtKeyRecursive(const char *key, ...);
174174

175-
/// @brief Finds a jtype == jdouble item in the child hierarchy. item->doubleAtKeyRecursive("animals", "mammal", "cat");
175+
/// @brief Finds a jtype == jdouble item in the child hierarchy. item->doubleAtKeyRecursive("animals", "mammal", "cat", NULL);
176176
/// @param key The key or name of the item.
177-
/// @param ... Other child keys.
177+
/// @param ... Other child keys. Must end with NULL!
178178
/// @return The item or NULL if the item is not found.
179179
json *doubleAtKeyRecursive(const char *key, ...);
180180

181-
/// @brief Finds a jtype == jstring item in the child hierarchy. item->stringAtKeyRecursive("animals", "mammal", "cat");
181+
/// @brief Finds a jtype == jstring item in the child hierarchy. item->stringAtKeyRecursive("animals", "mammal", "cat", NULL);
182182
/// @param key The key or name of the item.
183-
/// @param ... Other child keys.
183+
/// @param ... Other child keys. Must end with NULL!
184184
/// @return The item or NULL if the item is not found.
185185
json *stringAtKeyRecursive(const char *key, ...);
186186

187-
/// @brief Finds a jtype == jarray item in the child hierarchy. item->arrayAtKeyRecursive("animals", "mammal", "cat");
187+
/// @brief Finds a jtype == jarray item in the child hierarchy. item->arrayAtKeyRecursive("animals", "mammal", "cat", NULL);
188188
/// @param key The key or name of the item.
189-
/// @param ... Other child keys.
189+
/// @param ... Other child keys. Must end with NULL!
190190
/// @return The item or NULL if the item is not found.
191191
json *arrayAtKeyRecursive(const char *key, ...);
192192

193-
/// @brief Finds a jtype == jobject item in the child hierarchy. item->objectAtKeyRecursive("animals", "mammal", "cat");
193+
/// @brief Finds a jtype == jobject item in the child hierarchy. item->objectAtKeyRecursive("animals", "mammal", "cat", NULL);
194194
/// @param key The key or name of the item.
195-
/// @param ... Other child keys.
195+
/// @param ... Other child keys. Must end with NULL!
196196
/// @return The item or NULL if the item is not found.
197197
json *objectAtKeyRecursive(const char *key, ...);
198198

0 commit comments

Comments
 (0)