Skip to content

MacOS build enhancements, support for LIRC IR on MacOS.#245

Open
wilson wants to merge 5 commits intoralph-irving:masterfrom
wilson:wlb/osx
Open

MacOS build enhancements, support for LIRC IR on MacOS.#245
wilson wants to merge 5 commits intoralph-irving:masterfrom
wilson:wlb/osx

Conversation

@wilson
Copy link
Copy Markdown

@wilson wilson commented Apr 1, 2025

Just some things I ended up doing to my local copy, I thought I'd see if you were interested in incorporating them.

This all started when I learned that the release builds for MacOS don't enable many of the build flags by default.
My local copy is now happy looking like this:

Squeezelite 2.0.0-1524, Copyright 2012-2015 Adrian Smith, 2015-2025 Ralph Irving. See -t for license terms
Usage: ./squeezelite-osx [options]
  -s <server>[:<port>]	Connect to specified server, otherwise uses autodiscovery to find server
  -o <output device>	Specify output device, default "default", - = output to stdout
  -l 			List output devices
  -a <l>:<r>		Specify Portaudio params to open output device, l = target latency in ms, r = allow OSX to resample (0|1)
  -a <f>		Specify sample format (16|24|32) of output file when using -o - to output samples to stdout (interleaved little endian only)
  -b <stream>:<output>	Specify internal Stream and Output buffer sizes in Kbytes. Default is 2048:3445
  -c <codec1>,<codec2>	Restrict codecs to those specified, otherwise load all available codecs; known codecs: flac,pcm,ogg,aac,dsd,mp3 (mad,mpg for specific mp3 codec)
  			Codecs reported to LMS in order listed, allowing codec priority refinement.
  -C <timeout>		Close output device when idle after timeout seconds, default is to keep it open while player is 'on'
  -d <log>=<level>	Set logging level, logs: all|slimproto|stream|decode|output|ir, level: info|debug|sdebug
  -e <codec1>,<codec2>	Explicitly exclude native support of one or more codecs; known codecs: flac,pcm,ogg,aac,dsd,mp3 (mad,mpg for specific mp3 codec)
  -f <logfile>		Write debug to logfile
  -i [<filename>]	Enable lirc remote control support (lirc config file ~/.lircrc used if filename not specified)
  -m <mac addr>		Set mac address, format: ab:cd:ef:12:34:56
  -M <modelname>	Set the squeezelite player model name sent to the server (default: SqueezeLite)
  -n <name>		Set the player name
  -N <filename>		Store player name in filename to allow server defined name changes to be shared between servers (not supported with -n)
  -W			Read wave and aiff format from header, ignore server parameters
  -r <rates>[:<delay>]	Sample rates supported, allows output to be off when squeezelite is started; rates = <maxrate>|<minrate>-<maxrate>|<rate1>,<rate2>,<rate3>; delay = optional delay switching rates in ms
  -R -u [params]	Resample, params = <recipe>:<flags>:<attenuation>:<precision>:<passband_end>:<stopband_start>:<phase_response>,
  			 recipe = (v|h|m|l|q)(L|I|M)(s) [E|X], E = exception - resample only if native rate not supported, X = async - resample to max rate for device, otherwise to max sync rate
  			 flags = num in hex,
  			 attenuation = attenuation in dB to apply (default is -1db if not explicitly set),
  			 precision = number of bits precision (NB. HQ = 20. VHQ = 28),
  			 passband_end = number in percent (0dB pt. bandwidth to preserve. nyquist = 100%),
  			 stopband_start = number in percent (Aliasing/imaging control. > passband_end),
  			 phase_response = 0-100 (0 = minimum / 50 = linear / 100 = maximum)
  -D [delay]		Output device supports DSD over PCM (DoP), delay = optional delay switching between PCM and DoP in ms
  -v 			Visualizer support
  -Z <rate>		Report rate to server in helo as the maximum sample rate we can support
  -t 			License terms
  -? 			Display this help text

Build options: OSX PORTAUDIO SELFPIPE RESAMPLE VISEXPORT IR DSD SSL

At the moment a working LIRC on MacOS requires some patches I've done, I'm separately working on contributing those back to LIRC upstream. Because of that, this checks to see if LIRC is installed before enabling that build option.

@wilson
Copy link
Copy Markdown
Author

wilson commented Apr 1, 2025

In case anyone is interested, here's a .lircrc file to support the squeezebox remotes with squeezelite: https://gist.github.com/wilson/dd1d50ff413529de6d1e5d355263a5df

Copy link
Copy Markdown
Owner

@ralph-irving ralph-irving left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you separate this commit into a separate PR?

Copy link
Copy Markdown
Owner

@ralph-irving ralph-irving left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you separate this commit into a separate PR as well?

@ralph-irving
Copy link
Copy Markdown
Owner

I'd like to include your changes for the MacOS builds, however these changes break my current build flow for the mac. Would you merge all the Makefile.osx changes in this PR into a new and different Makefile.???? Maybe Makefile.macos. Then I could migrate my build process to use the new makefile when time permits, while you and others can use it immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants