8 #ifndef GROOVE_PLAYER_H
9 #define GROOVE_PLAYER_H
void groove_player_destroy(struct GroovePlayer *player)
when the audio device is re-opened due to audio format changing
Definition: player.h:22
void groove_player_event_wakeup(struct GroovePlayer *player)
wakes up a blocking call to groove_player_event_get or groove_player_event_peek with a GROOVE_EVENT_W...
int groove_player_event_peek(struct GroovePlayer *player, int block)
returns < 0 on error, 0 on no event ready, 1 on event ready if block is 1, block until event is ready...
when the currently playing track changes.
Definition: player.h:16
int groove_player_attach(struct GroovePlayer *player, struct GroovePlaylist *playlist)
Attaches the player to the playlist instance and opens the device to begin playback.
when something tries to read from an empty buffer
Definition: player.h:19
int groove_player_detach(struct GroovePlayer *player)
returns 0 on success, < 0 on error
void groove_player_position(struct GroovePlayer *player, struct GroovePlaylistItem **item, double *seconds)
get the position of the play head both the current playlist item and the position in seconds in the p...
double gain
Volume adjustment to make to this player.
Definition: player.h:54
struct GroovePlayer * groove_player_create(void)
int groove_player_set_gain(struct GroovePlayer *player, double gain)
See the gain property of GrooveSink.
struct GrooveAudioFormat target_audio_format
The desired audio format settings with which to open the device.
Definition: player.h:46
struct GrooveAudioFormat actual_audio_format
read-only.
Definition: player.h:62
GroovePlayerEventType
use this to make a playlist utilize your speakers
Definition: player.h:14
when the audio device gets an error re-opening
Definition: player.h:25
int use_exact_audio_format
If you set this to 1, target_audio_format and actual_audio_format are ignored and no resampling...
Definition: player.h:68
struct GroovePlaylist * playlist
read-only.
Definition: player.h:58
struct SoundIoDevice * device
Set this to the device you want to open.
Definition: player.h:38
user requested wakeup
Definition: player.h:28
enum GroovePlayerEventType type
Definition: player.h:32
struct GrooveAudioFormat groove_player_get_device_audio_format(struct GroovePlayer *player)
When you set the use_exact_audio_format field to 1, the audio device is closed and re-opened as neces...
int groove_player_event_get(struct GroovePlayer *player, union GroovePlayerEvent *event, int block)
returns < 0 on error, 0 on no event ready, 1 on got event