Mike Brady
44c61835b8
Include a few fixes for FreeBSD warnings and quieten some debug messages
2018-08-22 15:10:38 +01:00
Mike Brady
d2f6a446e1
Bring up to date with 3.3d2 from the raspberry pi
2018-08-22 14:41:03 +01:00
Mike Brady
754155ce0f
clang format
2018-08-22 13:07:04 +01:00
Mike Brady
1ee806a53a
Fix display of drift -- the sign is correct now. All timing is relative to the local clock. Add a rough estimate of the correction necessary. Use the most recent 128 timing samples.
2018-08-22 13:02:42 +01:00
Mike Brady
0cda8f963c
Simplify some calculations and a bug so that the output calculation is correclty reset if there is a problem with output, e.g. an underflow.
2018-08-15 15:57:41 +01:00
Mike Brady
ab1f55fe20
Log an entry if a different period or buffer size was requested and not obtained.
2018-08-15 12:42:02 +01:00
Mike Brady
8b0889ea5d
Remove bogus possibly uninitialised variable warning.
2018-08-06 17:57:42 +01:00
Mike Brady
3888125a24
Change calculation order to prevent overflow after about 26 hours at 44,100 fps in the frame rate calculations. Calculate frame rates whether statistcs are requested or not. Clean up some fps rate availability flags.
2018-08-01 09:35:28 +01:00
Mike Brady
76c5dd9285
Stop using SIGUSR1 for cancelling threads, use pthread_cancel and friends 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.
2018-07-30 10:07:11 +01:00
Mike Brady
ea20840d6c
Make the play function return a status (ignored for the present). Clean up audio_alsa by removing all the die calls and placing the alsa_mutex calls in pthread cleanup routines.
2018-07-29 13:45:42 +01:00
Mike Brady
c91a991edd
Prevent arithmetic overflow after 2^32 microseconds, i.e. about one hoour and 11 minutes...
2018-07-29 10:45:55 +01:00
Mike Brady
17793bd000
Change measurement of frames and timing to mimimise effects of paging, cache loading, asynchronous access to the DAC.
2018-07-29 09:47:53 +01:00
Mike Brady
c03f6d8133
Ensure flush resets everything.
2018-07-29 08:35:06 +01:00
Mike Brady
c85e7e05d1
Add a frames per second output. This should be exact if the machine is connected up to, say, an NTP time service. It uses CLOCK_MONOTONIC time.
2018-07-28 19:02:02 +01:00
Mike Brady
5f750ba9b7
Fix a few memory leaks.
2018-07-22 16:12:52 +01:00
Mike Brady
f1d4503431
Try to add proper cancellation code to all threads -- not complete, buggy.
2018-07-20 13:50:38 +01:00
Mike Brady
93f410599f
Add debug_mutex_unlock code in place of a regular pthread_mutex_unlock in some places.
2018-06-01 09:28:28 +01:00
Mike Brady
18b37ea254
Replace all pthread_mutex_locks with debug_mutex_lock with a message and timer. Not really tested.
2018-06-01 08:29:48 +01:00
Mike Brady
452e1f72fb
Include all RTSP messages in debug level 2 except for the OPTIONS message; tidy up some other debug messages.
2018-05-25 13:48:12 +01:00
Mike Brady
e66a47943d
Treat volume-based muting the same as playback-switch-based muting and disable both by default. Rename the setting to "use_hardware_mute_if_available".
2018-05-25 09:22:48 +01:00
Mike Brady
6d66b2ed33
Stop erroneously assuming that the buffer passed to the player is not changed -- sometimes it is, it seems. Tidy up some typing.
2018-05-07 22:00:01 +01:00
Mike Brady
709ffa5915
Replace snd_pcm_drop with snd_pcm_drain.
2018-05-06 17:25:43 +01:00
Mike Brady
31b4dcc54a
Release candidate 1 for 3.2
2018-04-07 16:43:05 +01:00
Mike Brady
32c7a535a1
Make scanning for DACP port part of the dacp handler. Only emit 'clip' and 'svip' for a play connection, suppress 'pfls' until 'pffr' has been emitted
2018-03-31 17:34:59 +01:00
Mike Brady
69b3b5d776
Send rtsp events to the metadata thteread for handling. Begin to clean up signals.
2018-03-31 12:39:26 +01:00
Mike Brady
c36a7822a3
Tidy up using clang-format
2018-03-07 14:35:25 +00:00
Mike Brady
07e46565ca
Eliminate almost all warnings from -Wall
2018-03-07 14:29:14 +00:00
Mike Brady
370501117e
Change snd_pcm_drain to snd_pcm_drop, remove the blocking and unblocking code, so a little formatting.
2018-02-05 14:19:33 +00:00
Mike Brady
2efab6ee4d
Quieten a debug message.
2018-01-31 19:54:28 +00:00
Mike Brady
f83b86ec23
Add the option to use a flat volume control profile.
2018-01-29 22:28:22 +00:00
Mike Brady
e0aa75a80c
pretty-print after adding alsa volume-based mute capability
2018-01-13 20:15:27 +00:00
Mike Brady
6d792fa0ef
Quieten some debug messages.
2018-01-13 20:13:19 +00:00
Mike Brady
8a4bfb0378
Take advantage of the mute capability of a device that mutes at its lowest setting
2018-01-13 20:09:51 +00:00
Mike Brady
95e291e7e7
3.14 to 3.1.5 Fix a bug resumption in iOS 11.2 on software-volume controlled Shairport Syncs to be at 100% volume. Improve sync with movies. Other bug fixes.
2017-12-11 19:59:58 +00:00
Jörg Krause
41ebf30a08
Fix usage of ALSA softvol plugin
...
Somewhere in the version 3.x the softvol plugin got broken as the volume
change is not applied anymore. Turned out for the softvol plugin no
`volume()` and `parameters()` are defined.
2017-11-20 17:27:47 +01:00
Mike Brady
d343a851c0
Some spring cleaning using clang-format
2017-10-05 17:48:24 +01:00
Jakub Nabaglo
90f779dc74
Minor cleanup
2017-09-26 21:37:01 +10:00
Jakub Nabaglo
2915e6672c
Attempt to fix hardware volume bug on devices without a linear scale
2017-09-26 17:24:55 +10:00
Mike Brady
81a02221c1
Change default of using alsa mute switch to "no" for compatability with other audio players.
2017-09-02 17:17:11 +01:00
Mike Brady
e513e5330c
Tidy up source using clang-format
2017-07-31 11:57:57 +02:00
Mike Brady
5663858c63
Tidy up and/or suppress some debug messages
2017-07-22 18:09:39 +02:00
Mike Brady
b7864b4ecf
Move common audio backend settings like buffer size and offsets to the "general" settings stanza. Improve the resync code a little.
2017-07-21 12:29:03 +02:00
Mike Brady
d428585715
Add code to read audio_backend_silent_lead_in_time settings.
2017-07-06 19:13:10 +01:00
Mike Brady
c13ff31c82
Merge pull request #545 from ccutrer/dynamic_output_device
...
Read `stdout` from the on-start command to choose ALSA output device
Thanks for this. It looks well-implemented, but it also is very special-purpose. When a more general solution comes along that provides this functionality, I hope you won't mind if this code is removed...
2017-06-25 15:01:12 +01:00
Cody Cutrer
3e9e228564
read stdout from the on-start command to choose ALSA output device
...
refs GH-452
2017-06-24 19:46:03 -06:00
Mike Brady
f7077e7097
Some calls to the "die" function need to be preceded by unlocking the alsa mutex.
2017-06-24 18:22:55 +01:00
Mike Brady
b3ae05ea60
Initial very rough full-fat pulseaudio backend
2017-05-17 08:49:40 +01:00
Mike Brady
558a2ec767
Improve the logic of the interplay between the volume and mute controls, so that if muted due to volume levels, will not be unmuted
2017-05-04 16:30:12 +01:00
Mike Brady
721a624c53
Signal presence or absence of hardware volume and mute abilities properly. Fix software-only mute.
2017-05-04 14:06:24 +01:00
Mike Brady
eb1b7c3779
Open and close the hardware mixer when needed -- don't keep it open throughout the play session. This allows it to respond to external volume changes
2017-05-02 12:29:57 +01:00