The local and seekable file scanner could crash on bad MPEG files if
they failed to decode any frames and broke due to either end of file or
other unrecoverable errors, due to a division by zero error attempting
to calculate the file bitrate. Now correctly return error state if this
occurs, bailing early.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This should be more correct, especially considering that the library can
handle 32 bit files now.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Apparently, the decoder is capable of returning zero length frames
without having hit the end of the stream.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
- Updated libFLAC to the latest Git commit, post 1.3.4.
- Updated libid3tag to 0.16.1.
- Updated libopus to the latest Git commit.
- Updated my FFmpeg libfdk-aac patch. Previously was overwriting
memory when it was supposed to be skipping samples.
Also added debug versions of several of the libraries, and changed
the library extractor script to unpack the debug libraries over the
release set to add the particular matching debug versions when
building a debug build.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Due to a change designed to stop playback when the end of the file is
reached, which should not be checked for unseekable files, which are
web streams that only stop when the connection drops, or when the user
stops playback manually.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The reader was previously returning a failure state on open if the read
completed and fit entirely into the read buffer, which broke most remote
M3U or PLS playlists.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The declarations for the translation were missing from the project files
so that it wasn't being used. Also added the missing strings to the
files that were already added to the translation.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The input chain could hang up indefinitely, and MAD decoder didn't
indicate end of file properly.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
readAudio now returns an AudioChunk object directly, and all inputs have
been changed to accomodate this. Also, input and converter processing
have been altered to better work with this.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Most projects needed to be changed to enable C or Objective C modules.
Hopefully, this improves debugging.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The input file has already been opened for decoding by an earlier step
in the testing process, reuse the decoder from that. Spares a decoder
open cycle on all embedded cuesheet supporting formats.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This redesign completely changes how tags are stored in memory. Now all
arbitrary tag names are supported, where possible. Some extra work will
be needed to support arbitrary tags with TagLib, such as replacing it
with a different library.
Translation pending for a couple of strings.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Matroska files use the "TITLE" field for the album when there are
chapters. Also, Matroska container uses shorter gain field names for
album and track gain, differentiating them by either being global or
specific to each chapter.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Enable playback of video file extensions. Like other video formats
handled by the FFmpeg decoder, video streams are dropped in decode and
only the first audio stream is played.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Use tag string encoding guessing for tag decoding, just in case there
are invalid files with non-standard encoded strings inside the tags, or
if there are streams with such tags. We don't want any crashes.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Improve tag reading performance for Ogg, Opus, FLAC, TTA, and TAK, by
eliminating TagLib from the equation in those cases and just using the
respective file inputs to do the tag reading, which is apparently a lot
faster anyway.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Remove a single .inc include from CogAudio build phase, as it's included
but not compiled as Pascal like Xcode thinks. Also remove a bunch of
files from being copied into the resulting .framework and .bundle files
during link stage, as we don't need to distribute that stuff.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Apparently someone managed to crash this with their playlists. No idea
how. Added more safety checks.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Moved external cover art reader to a place where it can be used for any
format, even formats unsupported by Metadata Reader interfaces.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Add support for more file name extensions, so we don't fall back on
Core Audio Input for these files.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
When seeking to the end of a file, no longer crash due to out
of range std::vector access, because it was using at() with an
offset of the array size. Instead, offset from the begin()
iterator return value, which allows offsetting to end().
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Default time, fade, loop count, and sample rate may now be overridden.
Synchronized preferences strings tables. Spanish translation of new
options pending, new releases won't be pushed until they're complete.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Bundle libOpenMPT as a dynamic framework, which should be safe once
again, now that there is only one version to bundle. Also, now it is
using the versions of libvorbisfile and libmpg123 that are bundled with
the player, instead of compiling minimp3 and stbvorbis.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This allows us to eliminate the requirement to continue bundling version
0.5.x of libOpenMPT for compatibility with macOS 10.13 through 10.14.x.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This required adding the included script in every project that links to
one of the bundled libraries. The script is designed to sleep for a
while if another thread is already extracting the libraries. The script
uses a temporary file as an extraction step lock, so other instances
sleep, and then detect the libraries.updated file, which is created
before the lock is removed.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Cuesheets can now expose which URLs they contain, which may help with
sandbox path configuration. That is, if the CUE sheets are already
readable.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Don't post a metadata event on open, because inputs will relay it to the
player as an early notification bubble, which is unwanted.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Cuesheets were invoking a seek operation on open, rather than on first
playback, and this has a heavy toll on FFmpeg audio formats, apparently.
Defer the initial seek to the first readAudio call, and do not invoke it
if a seek was already called on that input session.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This is essential for chapters, as otherwise, we would be skipping an
awful lot of samples every chapter, or every seek within a chapter.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Determine the length of the file from the container, rather than the
individual audio stream. The former is more likely to be set than the
latter is.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Stream metadata encoding may not be UTF-8, even though the Vorbis
Comment specification clearly calls for this.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Made the OpenMPT / legacy OpenMPT and mpg123 libraries pre-built.
Changed the OpenMPT and vgmstream plugins to import the libraries as
they are now. Made mpg123 embedded and imported by the main binary,
since it's now shared by two plugins.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
All optional fallback code for older versions has also been removed, and
everything now assumes 10.13.0 or newer. Some cases are still included
for point releases, such as 10.13.2.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Hopefully this blank assignment will spare these files from being
touched by Xcode again in the future, when the variable in question is
imported from a developer supplied configuration file.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This file should not be referenced directly by projects, otherwise it
will be expected to exist, even in CI.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Redesign the code signing from the ground up. Now all bundles and their
embedded frameworks import the Shared.xcconfig file and enable its
settings, so they may be signed with Apple Development instead of sign
to run locally. This apparently isn't necessary for frameworks which are
embedded in the main app bundle directly, only for the bundles and their
frameworks.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Automatically format any XML escapes of file type association names.
Adjust Info.plist to account for this change.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>