Heaven Help Us All

AeroPlayne

Overview

AeroPlayne is an app that reimplements the Apple’s AirTunes (more popularly known as AirPlay®, specifically version 1 of the protocol). This enables the device to appear on your local network as a virtual speaker (a category of receiver), capable of receiving a broadcast from other devices on your network (categorised as the sender, typically an iOS device). Your device will relay the audio it receives to its default output, which is its internal speaker by default, or headphones if connected.

Operation

Every AirPlay® receiver must have a name. It doesn’t need to be unique on your network, but it’s a good idea nonetheless. By default that name is the model name of the device, but you should choose something more memorable. To edit it, either choose Rename Receiver from the menu, or tap on the existing name. Each receiver also has a unique ID, which does not change even if you rename it (unless you specifically choose to reset the ID, from the Settings page). This means all AirPlay® senders will automatically notice and update to the device’s name.

Initially the receiver is in sleep mode (indicated by a glowing white light). This means the device has not made itself present on your network. Tap the switch in the toolbar, or the text in the status bar at the bottom of the screen, to put it in standby mode (indicated by a green light). This makes the device broadcast its presence on your network. After a few moments it should appear in the list of AirPlay® devices on your network, ready to receive audio. It will also display a persistent notification indicating this state.

Upon starting to send audio to the receiver, the display should switch to its other mode. This consists of the toolbar subtitle containing the name of the device sending audio to this device, the artwork representing the audio being sent (if present), the title and artist for the track, and various controls (volume, fast forward, play/pause, rewind, and position - more on these later). When in this state, your device is acting as a receiver, passing whatever sound it receives to the current output device. The aforementioned notification will now also display the title, artist, artwork, and a subset of controls.

Note that in trial mode, audio is limited to three minutes of streaming, after which noise is overlaid onto the audio. You can reset the trial timer by disconnecting or restarting the audio.

Remote Controls

Whilst the controls are always present, they may or may not be enabled. This is determined by the advertised capabilities of the device that is currently sending audio, in particular its adoption of the Digital Audio Control Protocol (DACP). This is how sending devices allow themselves to be controlled remotely. In particular, the Music app (aka iTunes) on the Mac has the most comprehensive implementation of this protocol, and iOS devices less so (and in some cases not at all).

The protocol allows a sender device to advertise its specific capabilities (eg: change volume, play, pause, skip tracks). When the receiver notices these capabilities it enables the corresponding buttons. However, this is a functional protocol. It defines what it will do, not how it will accomplish this, which in practice may cause confusion. For example, to be capable of pausing audio means “when the command to pause is received, the audio should pause”. The following are all legitimate means for the sender to do this:

  • Tell the receiver to stop playing audio (typical of the Mac’s Music app, and the most desirable outcome).

  • Don’t tell the receiver to stop playing audio, but send it silence instead (typical of the audio component of a video).

  • Immediately disconnect from the receiver, and ignore any further commands (typical of iOS devices, presumably to save battery).

In the first case, the audio will pause immediately (which is probably the expected outcome). In the second, the receiver will have to work its way through its buffer before it gets to the silence, meaning the response appears delayed by a few seconds. In the third case, it appears that the sending device suddenly disappeared, putting the receiver back into standby mode. These response are all technically very different, but functionally correct.

In other words, treat the remote controls offered by the receiver as an idiosyncratic bonus that may or may not work.

Buffers

AirPlay® relies on buffers, which is how it copes with occasional delays when sending audio to the receiver. By default the buffer is approximately 1.75 seconds long, meaning it takes that amount of time from the audio being sent to the audio being played. Without this buffer, audio may occasionally skip if it can’t be delivered to the receiver promptly. This is also the correct buffer size to synchronise the audio relayed by the receiver with video played by the sender.

However, unlike with many hardware devices you are able to change the size of this buffer. This is most useful when the sending device does not need to synchronise any media with the audio (ie: an audio-only sender), and allows changes of the delay between an action initiated on the receiver (eg: pausing audio, changing tracks), and the reaction (the audio being paused, the track changing), also known as the latency. Ideally this value should be as small as possible, for the best experience. But take care - a smaller buffer is makes for a more responsive experience, but it also decreases the margin of error. It takes less of a network problem to cause a noticeable glitch in audio.

To change the buffer size, choose Adjust Sync from the menu, or long press on the status bar near the bottom of the screen, and choose it from this menu. The dialog that opens allows you to change the buffer size, and also fine tune the buffer (by tapping the plus and minus buttons, great for precise audio synchronisation). Depending on your typical requirements and the quality of your network connection you can make the buffer significantly smaller with no ill effects. However, every case is different, so experiment with your own setup.

Effects

In the lower left corner of the screen is an icon representing the current audio effects. If it is highlighted (with an oval behind it), one or more effects are enabled. Upon clicking on the icon, a sheet appears containing a page for each of the built-in effects on your device (there are usually five - equaliser, loudness, bass boost, gain, and reverb). Each effect can be enabled individually, using the switch in its title bar. The current settings for all effects can be gathered and saved as an individual preset. Preset management is handled via items in the menu at the end of the toolbar.

Metadata

To the lower right is the metadata icon. If the currently connected sender supplies information about the audio it is sending, it will be shown in this dialog. Metadata includes most of the standard information defined in the iTunes/Music app for Mac, including Title, Artist & Album Name, Year of Release etc. It also offers information about the file from which the audio is sourced, for example its size and bitrate (where applicable).

Recording

The app is also capable of recording, or more accurately transcoding the audio it receives, meaning it can create a file in real time, consisting of the received audio encoded as either an MP4 file (containing lossy-compressed standard AAC audio data, suitable for general purpose audio, or High Efficiency AAC audio data, which is designed to preserve voice quality at lower bit rates), or a FLAC file (containing the highest quality losslessly-compressed audio, which results in a bigger file, but with no loss of quality from encoding). Note that in trial mode, only the lowest bitrate of MP4 file is available, and recording is limited to three minutes.

Every recording first requires a destination file. As long as the receiver is not in sleep mode, choose Record from the menu. The standard file picker will open, offering a choice of destination locations, and a file name. By default, the file name is same as the receiver’s name. When a valid name and location is selected, the receiver is then primed to record. If the receiver was already receiving audio at the time the file name was chosen, recording will immediately start. If not, the receiver is “ready to record”, meaning when audio is next received, the recording will automatically start.

Also, if the app is not in trial mode, the audio format can be chosen using the Preset button in the top left. Normally this is only available from the Settings page, but this button is a shortcut to that function. Note that changing to a file format with a different type of container (from MP4 to FLAC, or vice versa) requires choosing another file, which ensures it has the correct file extension.

To stop the recording, choose the Finish button in the top right corner. In some circumstances, on some device/operating system combinations, the “finishing” operation takes time to work through a backlog of transcoding. See the Known Issues section below for more information.

It is possible to pause a recording without finishing it by pausing the sending device. Provided this causes the sending device to pause without disconnecting, or sending silence (see previous discussion), the recording will pause but not finish, and resume whenever more audio is sent.

Other Settings

  • New Sender Blocking

When enabled, if a sender attempts to connect to the receiver, but there is already a sender connected, the current sender is disconnected, and replaced with the new sender. If disabled, the request to connect by the new sender is rejected. Disabled by default.

  • Presence Reporting

When enabled, the sender reports to the sender all of the audio outputs it believes it has available to it (speakers, headphones, etc). The receiver may choose not to connect based on this response. If disabled, the receiver always reports the presence of a speaker, which is the most compatible option. Disabled by default.

  • Encoding Format & Bitrate

Selects the file format, and data within that file, to use when recording audio. There are currently two supported formats: MP4 and FLAC. MP4 is the container format for lossy-compressed AAC or HE-AAC audio, and is the most widely supported format. FLAC is the container format for losslessly-compressed FLAC audio. AAC is recommended as a general compromise of features and quality, HE-AAC for speech where space is at a premium, and FLAC where audio quality is paramount. Uses the lowest quality format and bitrate (32KB/s MP4) by default.

  • Direct File Writer

When enabled, the recorded file is written directly to its destination. When disabled, the file is written first to an intermediate file on the device, then copied to the destination. This option is present to work around an Android issue where certain file destinations take a long time to write the file to their destination. See Known Issues below for more details. Enabled by default.

  • Share Crash Data

When a crash occurs, the app usually stops working. Enabling this will generate a log of what caused the event, which is then sent to the developer to aid in fixing the issue. No personal data is included. It is STRONGLY recommended to leave this option enabled. Enabled by default.

  • Share Usage Statistics

At certain points within the lifecycle of the app, events can be generated and logged to show the developer how the app is being used, which features are being discovered, etc. No personal data is included. Enabled by default.

  • Reset Analytics Data

All analytics events are associated with a unique ID number. Tapping this causes that number to be regenerated. This number is also used to uniquely identify the receiver on your network, so resetting it will also make your device appear as a new device on your network (with the same name).

Known Issues

The app was written to be compatible with the protocol used in version 1 of AirPlay®, in particular the version used by an AirPort Express® device. Therefore it inherits the issues associated with these devices.

  • As of macOS Ventura (and perhaps before), using AirPlay® direct from within Safari’s video element (as used by YouTube, etc) is NOT supported. I suspect this now requires AirPlay® version 2. This issue also affects Apple’s AirPort Express®. For whatever strange reason, the iOS browser version does still work. The workaround is to use the app as an AirPlay® output device in the Sound Control Panel

  • On certain devices and in certain conditions, the ‘finishing’ stage of recording may take an unusually long time. Ideally it would be instant, but if it takes more than a few seconds, a notice will appear. However the file will still eventually be written. If this is the first time the delay occurs, the Direct File Writer option (available in Settings) is automatically disabled. This makes it use a different method to ‘finish’ the file, which is likely to be faster, and the expense of being less compatible with exotic file destinations.

  • When switching between the pages of individual audio effects, the sheet hosting the controls for the effect may not be the correct height. This issue is being investigated.

  • When sending from the macOS Music app, the artwork for each item may not be displayed. This seems to be a bug in the Music app, as the image is explicitly specified as empty even when it is present.

FAQ

  • Why can’t I record in the MP3 file format?

I have no idea. Android doesn’t seem to natively support it. Probably due to licensing costs.

  • What is Trial Mode?

This is a paid app. In its free mode (aka Trial), audio receiving is limited to three minutes, after which noise is overlaid on the sound. Additionally, the recording quality is limited to its lowest setting.

  • My problem isn’t listed here.

If the issue causes a crash, enable Crash Reporting and eventually I’ll get the report. If it works but doesn’t seem correct, get in touch. Send an email (preferably), or DM me on Twitter or Mastodon.