Skip to content

Commit

Permalink
docs: fixup typos
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed May 1, 2024
1 parent 81c32ac commit f3231cd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ int main(int argc, char** argv) {
// music on-demand, so as long as you don't call DmPerformance_renderPcm, you can consider playback to
// be paused. To stop playing music, you can pass NULL as the segment parameter.
//
// The second parameter here is the timing. It tells the performance at which boundary to start playing
// The third parameter here is the timing. It tells the performance at which boundary to start playing
// the new segment as to not interrupt the flow of music. The options are "instant", which ignores all
// that and immediately plays the segment, "grid" which plays the segment at the next possible beat
// subdivision, "beat" which plays the segment at the next beat and "measure" which plays it at the next
Expand Down
23 changes: 17 additions & 6 deletions include/dmusic.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ DMAPI DmResult Dm_setHeapAllocator(DmMemoryAlloc* alloc, DmMemoryFree* free, voi

/// \brief The set of message levels supported by the logging facilities.
typedef enum DmLogLevel {
/// \brief The log message indicates an fatal error.
/// \brief The log message indicates a fatal error.
DmLogLevel_FATAL = 10,

/// \brief The log message indicates an error.
Expand Down Expand Up @@ -147,7 +147,7 @@ DMAPI void Dm_setLogger(DmLogLevel lvl, DmLogHandler* log, void* ctx);
/// \see Dm_setLoggerLevel Function to set the log level on its own.
DMAPI void Dm_setLoggerDefault(DmLogLevel lvl);

/// \brief Sets the log level of the library.
/// \brief Set the log level of the library.
/// \param lvl The log level to set.
DMAPI void Dm_setLoggerLevel(DmLogLevel lvl);

Expand Down Expand Up @@ -267,9 +267,8 @@ DMAPI DmResult DmLoader_addResolver(DmLoader* slf, DmLoaderResolverCallback* res

/// \brief Get a segment from the loader's cache or load it by file \p name.
///
/// Gets a segment from the loader's cache if it's enabled (see #DmLoader_CACHE) or loads the segment
/// using the resolvers added to the loader. If the requested segment is found in neither the loader,
/// nor by any resolver, an error is issued.
/// Gets a segment from the loader's cache or loads the segment using the resolvers added to the loader. If the
/// requested segment is found in neither the loader, nor by any resolver, an error is issued.
///
/// If the loader was created using the #DmLoader_DOWNLOAD option, this function automatically downloads
/// the segment by calling #DmSegment_download.
Expand All @@ -294,15 +293,27 @@ DMAPI DmResult DmLoader_getSegment(DmLoader* slf, char const* name, DmSegment**
/// \{

typedef enum DmRenderOptions {
/// \brief Render format flag to request rendering of `int16_t` samples
DmRender_SHORT = 1 << 0,

/// \brief Render format flag to request rendering of `float` samples
DmRender_FLOAT = 1 << 1,

/// \brief Render flags to request stereo PCM rendering.
DmRender_STEREO = 1 << 2,
} DmRenderOptions;

typedef enum DmTiming {
/// \brief Timing flag indicating start at the next possible tick.
DmTiming_INSTANT = 1,

/// \brief Timing flag indicating start at the next possible grid boundary.
DmTiming_GRID = 2,

/// \brief Timing flag indicating start at the next possible beat boundary.
DmTiming_BEAT = 3,

/// \brief Timing flag indicating start at the next possible measure boundary.
DmTiming_MEASURE = 4,
} DmTiming;

Expand Down Expand Up @@ -342,7 +353,7 @@ DMAPI void DmPerformance_release(DmPerformance* slf);
/// \brief Schedule a new segment to be played by the given performance.
///
/// The segment is played at the next timing boundary provided with \p timing. This function simply stops the currently
/// playing segment and starts playing the next one. To play a transition between the two segment, use
/// playing segment and starts playing the next one. To play a transition between the two segments, use
/// #DmPerformance_playTransition.
///
/// \note The segment will always start playing strictly after the last call to #DmPerformance_renderPcm since that
Expand Down

0 comments on commit f3231cd

Please sign in to comment.