Commit Graph
339 Commits
Author SHA1 Message Date
Mike Brady 30510e72f1 Remove a very noisy and redundant debug message. 2022-08-16 09:25:53 +01:00
Mike Brady 449e024c95 If the default device is inaccessible with EHOSTDOWN, try hw:0 instead. Works for Fedora 36 Workstation. Might need to make it a bit smarter. 2022-07-22 15:52:16 +01:00
Mike Brady 129343c165 Don't quit if the ALSA output device is or becomes busy and resume when it becomes available again. 2022-07-20 18:04:42 +01:00
Mike Brady 850fda1055 Fix a typo. 2022-05-19 18:07:32 +01:00
Mike Brady 00bc837bef quieten some debug messages. 2022-05-17 17:50:46 +01:00
Mike Brady 3b4a21f002 Quieten some debug messages. Remove some redundant code. 2022-05-17 15:49:01 +01:00
Mike Brady a295c2a291 Improve the logic for supressing clicks when the alsa disable_standby_mode is active. 2022-04-03 10:35:48 +01:00
Mike Brady 8490c4c1c1 Always record frames successfully sent to DAC even if they are less than requested. 2022-03-16 10:19:15 +11:00
Mike Brady a382ac6672 Clang Format 2022-03-14 11:56:43 +11:00
Mike Brady 3d96f79ddc Quieten a few debug messages. 2022-03-11 17:03:49 +11:00
Mike Brady 0b4b4a73fc make close() a separate function and make flush do a close if we don't have to keep the dac active. 2022-03-10 17:41:53 +11:00
Mike Brady 713492a709 Check to see if the alsa_handle is NULL in standard_delay_and_status. Don't see how it could happen though. 2022-03-07 16:23:59 +11:00
Mike Brady 8476e5efac Check to see if the alsa_handle is NULL in precision_delay_and_status. Don't see how it could happen though. 2022-03-07 13:32:16 +11:00
Mike Brady 9bac04e2d7 Check for NULL pointers before deferencing delay and state variable pointers in audio_alsa.c's delay and delay_and_status functions. 2022-03-04 10:02:40 +11:00
Mike Brady 70ef99e924 Add a special-purpose flush routine called sub_flush. It doesn't close the device ever. 2022-02-26 08:33:19 +00:00
Mike Brady 6ced6bc67d Add a "mixer_control_index" setting to the "alsa" part of ther configuration file. A mixer is fully identified by a name and index, duh. Change some debug messages and add an entry to the sample configuration file. 2022-01-21 18:18:13 +01:00
Mike Brady 56bef8e7dd Use CLOCK_MONOLITHIC_RAW to avoid NTP effects, report raw and corrected timing from audio_alsa. Clean up statistics. Stop watchdog timing out AP2 sessions. CLean up some debug messages. 2021-11-28 16:08:48 +00:00
Mike Brady dc5b8f1a11 Clang format 2021-11-26 18:02:23 +00:00
Mike Brady 136071a621 change stats to report non-zero if output has just opened or if there has been any discontinuity in play from previous time. 2021-11-26 15:17:27 +00:00
Mike Brady 14bfba2724 Add code to check divisions and mods for a potrntial divide by zero problem. MAy cause SPS to terminate but leave a log message. 2021-11-21 21:47:32 +00:00
Mike Brady cd9da86fc3 Add a 'stats' function to the audio back ends to replace the 'rate_info' function. Zero all except the alsa back end. 2021-11-20 13:59:16 +00:00
Mike Brady 5f8e6e3989 attempt to increase the precision of the FPS timing 2021-11-20 12:14:23 +00:00
Mike Brady c0a3dacf30 Working to check for divide / mod by 0's 2021-11-17 10:35:21 +00:00
Mike Brady 99c6638573 Ensure the frame rate calculator allows for silent frames added to disable standby. Clean up outmoded and unused stuff in audio_alsa.c. More to do. 2021-11-06 18:32:26 +00:00
Mike Brady 366eb27afc Stop a message from repeating endlessly. 2021-09-09 11:23:25 +01:00
Mike Brady f058d118c1 Quieten a really noise message on verbosity 3. 2021-09-03 15:38:28 +01:00
Mike Brady 6f9c17690f Bring over some updates that were applied to the master branch. 2021-07-22 17:33:31 +01:00
Mike Brady 1ca4ebcf02 Make some more error conditions terminate the program. 2021-06-30 10:13:13 +01:00
Mike Brady f923e99f98 Terminate the program if the specified output device can not be found. 2021-06-30 10:02:46 +01:00
Mike Brady 5c08ccd4d0 Correct the information in a non-available frame rate error message from audio_alsa.c. 2021-06-30 09:49:16 +01:00
Mike Brady 6e24897d4d Correct the information in a non-available frame rate error message from audio_alsa.c. 2021-06-30 09:46:41 +01:00
Mike Brady 0c7d385f35 Keep an eye on DAC underrun recoveries 2021-06-22 14:09:09 +01:00
Mike Brady 0f1118c142 Exit immediately if the speed or format cannot be set. 2021-06-06 15:48:09 +01:00
Mike Brady e4c82b7700 Add some comments and a new debug message about underrun 2021-06-04 09:41:15 +01:00
Mike Brady c5dafbd28b Remember the original anchor information so that if the master clock become equal to it in the future, it can be restored to those exact numbers and eliminate any intervening approximations. Add some diagnostics. 2021-06-01 14:51:17 +01:00
Mike Brady 7df6ff0a55 Exit if the requested output format is not available. 2021-06-01 09:51:14 +01:00
Mike Brady d4ea91aa65 Rough and hacky but works with the bit depth of the output DAC to automatically choose the correct AAC decoding sample size. Allocation of rotating buffers is fixed and profligate. 2021-06-01 08:56:47 +01:00
Mike Brady d2d35cc758 Quieten speed and size debug message 2021-05-10 09:36:14 +01:00
Mike Brady a68f28ac2b clang format 2021-05-01 14:09:38 +01:00
Mike Brady 3a02b79a62 Update the mdns stuff to work with a string, update audio_alsa rtp.c, rtsp.c and shairport.c to build and work in AirPlay 1 but with AirPlay 2 code in place. Some of it is #defined out. 2021-04-30 09:29:30 +01:00
Mike Brady b9854d3fdc Version 3.3.8 is 3.3.8rc7. 2021-04-26 11:23:13 +01:00
Mike Brady 561a129617 Fix a race condition where the alsa_handle could be checked for null but then set to null before use. The code between the check and the use is now protected. 2021-04-08 13:56:13 +01:00
Mike Brady 6a42c76569 Stop using snd_pcm_status_get_driver_htstamp in the alsa precision timing function. It seems to have changed (?). 2021-03-27 16:12:42 +00:00
Mike Brady fd4c429b5a Be more careful with changing precision. Stop using snd_pcm_status_get_driver_htstamp. 2021-03-27 15:37:29 +00:00
Mike Brady bdc2dca3ec 3.3.7rc0 2020-07-06 17:09:15 +01:00
Mike Brady 54d761ff7d Clean up some of the wording and layout of the configuration file
Clean up and improve the way lead-in sillence is used to give a more accurate sync time to the first packet of audio.
Allow very good sync to occur with 0.3 seconds of lead-in silence.
Improve the use of the buffer offset.
Format some other files.
2020-05-18 16:55:09 +01:00
Mike Brady 67e9b1b6cd partial move to using a nanosecond-based system timer. More to come. 2020-02-24 19:40:44 +00:00
Mike Brady 02224666da Squashed commit of the following:
Don't use strndup as old versions of OpenWrt don't seem to have it
    Update FREEBSD.md
    Fix comparison between old and new metadata strings by checking they have equal lengths as well.
    Remove a redundant definition to prevent use on an uninitialised copy, clean up some of the less-used backends
    Remove some unwanted and unused variable declarations from audio_dummy.c and audio_soundio.c
    Add the -fno-common flag to compilation.
    Treat the "mper" attribute as the 64-bit item that it is rather than a 32-bit item as hithereto. Output it as a hexadecimal number to correspond with the format of the track id obtained from AppleScript
    Make changes to that it compiles under gcc-10 with -fno-common
    Add a SIGCHLD handler to reap zombie processes generated after script invocations where wait_for_completion is set to "no".
    Update and rename CONTRIBUTING.md to REPORTING ISSUES.md
    Add a few more commands and clarify some text.
    Change from talking about a server to talking about a client. Technically, e.g. iTunes is a client of Shairport Sync.
    Store the UserAgent so as to recognise forked-daapd so as to always send a revision_number of 1 when asking for playerstatus of forked-daapd.
    Add or update some of the copyright notices
    Add the ability to set the volume directly to the D-Bus RemoteControl interface and to the MPRIS interface. Both use the recently-discovered ability to set the device_volume.
    Merge in Pieter De Gendt's work on resampling on the jack backend.
    Merge pull request #939 from pdgendt/feature/jack-soxr-resampling
    Add SetAirplayVolume to the D-Bus RemoteControl interface.
    Add SetVolume to the MPRIS interface.
    Hook up the Volume property in the MPRIS interface.
    Modify RemoteCommand in the D-Bus interface to return the HTTP status and response.
    Change the type of airplay_volume from int to double in the metadata hub.
    Add a few sample commands in the D-Bus document.
2020-02-20 21:32:35 +00:00
Mike Brady f771774519 Compiles under gcc-10 with -fno-common 2020-02-13 17:37:41 +00:00
Mike Brady 78c9331c2c Update sample D-Bus commands
Rename D-Bus LoudnessFilterActive property to Loudness and friends
Update sample D-Bus commands
Add D-Bus convolution filter controls -- enable convolution filters to be turned on and off or changed; enable convolution gain to be checked and changed; fix loudness control.
Fix D-Bus loudness switch silencing output. Rename LoudnessFiulterActive to Loudness. Add Convolution, ConvolutionGain and ConvolutionImpulseResponseFile properties to the D-Bus interface.
Bug fix: correct frame size entry for S24 format
2019-11-13 22:04:22 +00:00