Sorry about that, everyone. I didn't mean to make it look like I
was freezing out my audience by assuming a portion of them support
the every move of their government.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The lineage of this library was not as obvious to me as it should have
been, considering the country of origin. While the developer has not
publicly stated their position on the invasion of Ukraine, they seem to
be in the anti-vaccine camp, which is disappointing to say the least.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Added the R8Brain notice to the credits html document, and added a link
to the Github repository to the README.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This rename is more in line with what R8Brain does in its example code.
No actual behavioral changes to the code, however.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Report the correct codec name for WavPack files. An info refresh will be
needed for it to take effect on existing playlist entries.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The cache thread should have an autoreleasepool around the release loop,
because it will be freeing Objective C objects periodically.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Promote the Plugin Controller source file to Objective-C++, and add a
simple data cache that holds on to requests for up to 5 seconds after
their last access, for preventing spammed requests from hitting files
over and over. This is apparently really relevant to the CUESheet reader
and its embedded CUESheet handling, as that tends to reread the same
file over and over as it populates the playlist with tracks. The nested
reader can also lead to repeated reading even on files without CUESheets
embedded.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
A variable wasn't being used, except in debug builds. Comment out its
use and only skip over the field in the LAME header.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This should improve performance slightly again, as there were some ARM
code paths that weren't being enabled for ARM64.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
There was a stupid bug in the previous commit I made, which caused local
or seekable MP3 files to crash the player on decode. This fixes that, by
checking that a packet has actually been decoded before touching the
packet info structures. Dumb, dumb, dumb error on my part.
Fixes#244
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Support the weird scenario of format changes mid-stream. Probably
highly unlikely, and likely to break things if it does occur, but
whatever, it might actually happen in some weird file.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The current buffer size argument is used to determine if a buffer should
be allocated on the next run. Just in case something reuses the same
decoder instance.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
There were several warnings due to the capitalization of the header
paths, and due to unused functions that are only required by the text
CUESheet parser, and we're only using the CUESheet generator, which has
been heavily modified to emit NSString output rather than a file on
disk.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
For one thing, improve it so that if the tracknumber field is present,
but zero, it doesn't show the number sign in the spam. For the second,
only show the track artist field if it differs from the album artist.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
No idea if this brings a noticeable improvement, but it probably makes
better sense to only do the division step one time instead of doing it
twice interleaved when processing stereo files, which are the most
common scenario anyway.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Replace libsoxr dylib with a static library, and also build the two
architectures separately, to allow for platform-specific optimizations
to be employed for both. This also reduces the size of the CogAudio
framework by a few hundred kilobytes, as we eliminate unused code paths
better this way.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Now Cog supports freeformat MP3 once again. The plugin has been extended
to include sample accurate seeking, accurate length probing of files
missing headers, and iTunes gapless info reading using libid3tag.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Artwork deduplication should be done with hashes, not by full data
comparison. This should be a lot faster loading artwork from files now,
especially if the playlist already contains a lot of unique artwork.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
If starting playback from a given playlist entry, or selection, then
start shuffle mode from that track. Otherwise, start shuffle from the
beginning of the shuffle list.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
When in shuffle mode, start playback on the first item in the shuffle
list, rather than the selection, or the start of the playlist.
Fixes#241
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Added commands to control playback: play, pause, stop, previous, next.
Also added a spam property to PlaylistEntry, to return the formatted
spam string for the playlist entry, which is currently limited to the
playing item.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
When the option is enabled, and playback comes to a completion, the
player will quit on its own.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This stupid setLevel default was something suggested when making a
window a drag target, and I was observing a setLevel for a window
control, not for a window itself. I should not have set that in the
first place.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Since 10.13 doesn't want to observe the auto sizing attribute of the
field properly, gotta use the tiny font size that the field is already
configured to use.
Should fix#243
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Updated the FLAC library to what is the official release of 1.3.4,
although I already had all the commits from that version prior to this
update.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This small change brings the decoding more in line with what ffplay
does, and allows, for example, John McLaughlin.wma to play without
interruption from the stream warnings throughout the file.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This fixes#126 and brings back basic automation support. The basic
currentEntry object will return an object that can enumerate the track
metadata or the file URL of the currently playing track. More automation
suggestions are welcome, including playlist manipulation, or playback
control.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Xcode touched the Info.plist and fixed these, and I changed the file
type association definitions to print the correct thing in the future.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Apparently, the sort descriptors are going by data members of the array,
not by the column identifiers, or their textual contents.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Unfortunately, the track number column will always bug out and pop the
indicator back over to the Album Artist column. No way around it. The
control is just buggy like that.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This is a more correct method of identifying the supported classes to
coalesce into unique pointers through the storage array. I completely
forgot about this method, oops.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This allows for TagLib to handle artwork reading where the file built-in
readers fail, such as the FFmpeg reader, which would require parsing the
stream data for artwork packets, a really wacky convention to have.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Strings read from the database were not being stashed in the memory
store, which caused things like blank tags instead of correct metadata.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
IN A.D. 2101, WAR WAS BEGINNING. *boom*
Yeah, this was a dumb bug, I didn't realize that AUAudioUnit would just
arbitrarily ignore my configured block size and request a different one.
The AirPods Pro will just request 480 instead of the 512 I ask for, so
let's instead support variable block sizes, and only take up to the last
4096 samples of the chunk fed to the output device.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Significantly reduce the memory footprint of adding tracks to the
playlist, by coalescing the NSString and NSData objects in the info
dictionaries as they are being loaded in the background, into a common
data set which will then be discarded when the whole job is completed.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Added a string dictionary for deduplication of metadata, and actually
initialize both it and the art dictionary on startup, so they actually
work like they should.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Art read from external files supports more formats than previously
listed here. Amend the list accordingly.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Stream metadata could be in any encoding, not necessarily UTF-8. Handle
this in an appropriate way.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The new spectrum mode is linear frequency. Both modes also now have a
lower range of 10Hz, where possible.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Downmixing should no longer be necessary, unless someone actually tries
to emit up to 64 channels, while we support only 32 channels, but really
only 18 channels. Also read the channel layout field from the decoder,
so that the speaker layout will propagate from the files to the player.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The equalizer needs to apply its presets to the new settings variables
every time the preset changes, even when it happens with no dialog open.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
vDSP functions expect their input and output pointers to be aligned to
an even four values. Correct this by aligning all pointers. The
allocated buffers used for one parameter should already be aligned
somewhat, but align the incremented positions used on some of them so
that the vDSP functions don't misbehave. Also align the volume scaler
input by doing scalar math until the pointer is aligned prior to calling
vDSP_vsmul. Also, change 16-bit and 32-bit scale to use vsdiv instead of
vsmul with a really small number already divided into one.
Fixes the test vectors that were sent in extrapolating incorrectly due
to their final blocks having uneven sample counts, resulting in
unaligned pointers.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This doesn't fix an outstanding issue which will be fixed by the next
commit, but it does fulfill a request.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>