Skip to content

Commit

Permalink
Stop using SIGUSR1 for cancelling threads, use pthread_cancel and fri…
Browse files Browse the repository at this point in the history
…ends instead, fix some memory leaks, add accurate ouput rate calculation to statistics, add "quit" verb to MPRIS and native d-bus interfaces. Probably still buggy.
  • Loading branch information
mikebrady committed Jul 30, 2018
2 parents d70d7e5 + 4ea9de7 commit 76c5dd9
Show file tree
Hide file tree
Showing 29 changed files with 1,562 additions and 1,113 deletions.
1 change: 1 addition & 0 deletions audio.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Audio driver handler. This file is part of Shairport.
* Copyright (c) James Laird 2013
* Modifications (c) Mike Brady 2014 -- 2018
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
Expand Down
4 changes: 3 additions & 1 deletion audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ typedef struct {
void (*start)(int sample_rate, int sample_format);

// block of samples
void (*play)(void *buf, int samples);
int (*play)(void *buf, int samples);
void (*stop)(void);

// may be null if not implemented
Expand All @@ -33,6 +33,8 @@ typedef struct {
// will change dynamically, so keep watching it. Implemented in ALSA only.
// returns a negative error code if there's a problem
int (*delay)(long *the_delay); // snd_pcm_sframes_t is a signed long
int (*rate_info)(uint64_t *elapsed_time,
uint64_t *frames_played); // use this to get the true rate of the DAC

// may be NULL, in which case soft volume is applied
void (*volume)(double vol);
Expand Down
Loading

0 comments on commit 76c5dd9

Please sign in to comment.