feat: adopt IINA-style playback window
This commit is contained in:
@@ -21,7 +21,7 @@ typedef struct PlayerState {
|
||||
char error[512];
|
||||
} PlayerState;
|
||||
|
||||
// Commands are asynchronous. False means invalid input or a full command queue.
|
||||
// Playback commands are asynchronous. False means invalid input or a full command queue.
|
||||
// Paths are copied before returning. All other calls require a live handle.
|
||||
Player *player_create(void);
|
||||
bool player_open(Player *player, const char *path);
|
||||
@@ -29,6 +29,11 @@ bool player_play(Player *player);
|
||||
bool player_pause(Player *player);
|
||||
bool player_seek(Player *player, double seconds);
|
||||
bool player_close(Player *player);
|
||||
// Synchronous, thread-safe gain; survives open, seek, and close. Zero mutes.
|
||||
// Rejects null handles and non-finite/out-of-range values without changing gain.
|
||||
bool player_set_volume(Player *player, float normalized0to1);
|
||||
// Returns the target gain immediately; zero for a null handle.
|
||||
float player_get_volume(Player *player);
|
||||
PlayerState player_get_state(Player *player);
|
||||
// Joins the worker and stops audio; never invoke from an audio callback.
|
||||
void player_destroy(Player *player);
|
||||
|
||||
Reference in New Issue
Block a user