Move this commonly used string decoding helper to the CogAudio framework
and import it in every plugin that uses it.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Now it handles multiple attached pictures and tries to pick out the one
which may be the front cover picture, or otherwise picks the first one.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Improve handling where FFmpeg may call the provided file reader with
AVSEEK_SIZE repeatedly, when file size is not likely to change between
repeated calls. This prevents repeated seek operations that would
otherwise be required to probe the file size each time.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Cleaned up project settings to current defaults, except for the macOS
deployment version, which is still 10.13. Cleaned up a lot of headers
and such to include with angle braces instead of double quotes. Enabled
build sandbox in a lot of places. Disabled subproject signing in several
places, for libraries and frameworks which will be stripped and signed
when they are copied into place in the final build.
Also, while trying to solve compilation issues, the visualization
controller was reverted to the Objective C implementation, which is
probably faster anyway. Stupid Swift/Objective-C language mixing issues.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Remove deprecated functions, make use of free functions that clear the
pointers before returning, etc.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Update the readers to support the newly added tag fields, and also read
the supported format list from the library itself.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Stream timestamps were correctly being converted from the monotonically
increasing frame count, but the AudioChunk parameter was being set from
the frame count rather than the converted seconds count.
Fixes#418
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Audio Chunks now have full timestamp accounting, including DSP playback
speed ratio for the one DSP that can change play ratio, Rubber Band.
Inputs which support looping and actually reporting the absolute play
position now do so.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Gah, how in heck did Xcode end up inserting an absolute
path? Fix that, and some other leftovers.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Make exception handling more robust and thorough. Never
know what may happen, make sure to handle most cases.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Both the midi_processing and the various players may
throw exceptions, so we should check for these too.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
SSEQPlayer throws exceptions, there should be exception
handling to catch them and fail gracefully.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The TagLib C++ code was missing generic try/catch handling
which could result in any generic errors throwing straight
to a full crash. Add exception handling and logging, which
will fix a logged crash regardless of whether the tags are
read correctly or not by the newer TagLib version.
Fixes#415
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
In the event of local paths containing not just UTF-8 characters,
but also un-decoded URL percent sequences, which will end up double
encoded in the player, code which reverses percent encoding should
later re-apply it.
Apparently, this whole time, since the last code overhaul, the
URL encoding was being stripped, then the file opener was converting
these paths back into URLs without re-encoding, which didn't break
until someone played an album in a folder containing a partially
decoded UTF-8 sequence. Thanks, Zophar's Domain, and whoever ripped
the Golden Sun GSF set for finding this bug!
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Since in one case, it probably wasn't combining them into one stack
allocation, it probably blew up the stack allocation quite a bit.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Change to the future render api, hopefully float support
will be available eventually. Also change to allocate the
sample buffers from the heap instead of the stack.
This is imported by the player, though it doesn't fail when it's
missing, so that would explain why I didn't spot this error sooner.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
They'll be imported by the plugin on startup anyway, and they don't
really have any exported functions we can use.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Correctly scale the AudioChunk frame counts. This more and more makes me
think I should be scaling this in the AudioChunk code instead, but then
code may not know about the special case of every 8 frames only being
one byte per channel.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
DSD wasn't tracking the correct sample count, because DSD
Audio Chunks store the byte count, rather than the bit count.
This may be changed in the future, so I'll have to remember.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
If transfer completes quickly, do not hang waiting for it to achieve
reading state. Also add some comments indicating what we're doing.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>