libmsx
C library for MSX
Loading...
Searching...
No Matches
+ Collaboration diagram for Other LA0 specific APIs.:

Functions

uint8_t la0_get_bgm_frequency (void)
 MSX Return default frequency of the current background music.
 
uint16_t la0_get_bgm_total_samples (void)
 MSX Return the total number of BGM samples.
 
uint16_t la0_get_bgm_loop_samples (void)
 MSX Return the number of samples in the loop portion of BGM.
 
uint8_t la0_get_bgm_loop_counter (void)
 MSX Return the loop counter value.
 

Detailed Description

Function Documentation

◆ la0_get_bgm_frequency()

uint8_t la0_get_bgm_frequency ( void  )

MSX Return default frequency of the current background music.

Returns
frequency in Hz.
See also
audio_get_bgm_frequency()
audio_set_bgm_frequency()

◆ la0_get_bgm_total_samples()

uint16_t la0_get_bgm_total_samples ( void  )

MSX Return the total number of BGM samples.

Returns the total number of samples of the current BGM (including the loop part).

The total time (in seconds) of the first part plus the loop part at normal playback speed is la0_get_bgm_total_samples() / la0_get_bgm_frequency().

Returns
The total number of BGM samples.

◆ la0_get_bgm_loop_samples()

uint16_t la0_get_bgm_loop_samples ( void  )

MSX Return the number of samples in the loop portion of BGM.

Returns the number of samples in the loop part of the current BGM, or 0 if there is no loop part.

The time (in seconds) of the loop part at normal playback speed is la0_get_bgm_loop_samples() / la0_get_bgm_frequency().

Returns
The number of samples in the loop portion of BGM.

◆ la0_get_bgm_loop_counter()

uint8_t la0_get_bgm_loop_counter ( void  )

MSX Return the loop counter value.

The loop counter starts at 0 and counts up when the song loops back.

In case of overflow (exceeding 255), the counter returns to 0.

Returns
The loop counter value.