TrueAudio will now read APE tags, and if I should start writing tags
some day, will prefer creating APE tags if no tags exist.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The ChunkList wasn't clearing the remover entered flag when the chain
was empty. Now it does, so it will shut down correctly.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Code ordering was wrong, it was writing the output samples repeatedly
for each input speaker, now it will only write them once.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
By applying copious amounts of autorelease pools, memory is freed in a
timely manner. Prior to this, buffer objects were freed, but not being
released, and thus accumulating in memory indefinitely, as the original
threads and functions had autorelease pools that scoped the entire
thread, rather than individual function blocks that utilized the new
buffering system. This fixes memory growth caused by playback.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This fixes the dynamic length field not updating correctly after a track
info reload, which breaks the seekbar when reloading the current track.
Fixes#227
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Channel config should not contain duplicate channels, or unsupported
channels. Also fix a memory leak from not freeing the AudioChannelLayout
structure allocated previously.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This implements channel masks for inputs where applicable, namely the
CoreAudio decoder, FFmpeg, FLAC, and WavPack. All others will still use
guessing from the channel number.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This implements the basic output and mixing support for channel config
bits, optionally set by the input plugin.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The volume should have been twice what it was, because I got this scale
wrong. The correct scale for Accelerate inverse FFT is 1/4 per sample,
not 1/8 like I accidentally misread while rewriting a convolver for the
umpteenth time from scratch.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Rewrite attempt number two. Now using array lists of audio chunks, with
each chunk having its format and optionally losslessness stashed along
with it. This replaces the old virtual ring buffer method. As a result
of this, the HRIR toggle now works instantaneously.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Import a feature change that improves decoding speed on Haswell or newer
Intel processors. No effect on Apple Silicon, which doesn't support the
feature under Rosetta 2, and the ARM64 build doesn't need the changes
anyway, as the code already did the right thing.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This fixes a possible crash with seeking operations, especially with
Audio Unit plugins. Fix implemented in foo_midi and imported here.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
After all this rewriting, down or upmixing the audio is now handled with
the lowest latency possible, meaning that toggling the HRIR option now
takes effect immediately.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Tiny files complete fetching within the scope of the open function, so
the URL session task would have completed already. Now the function will
accept the data, and allow reading it.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This is a fixed point implementation identical to Microsoft's original
algorithm. Or at least I assume it's Microsoft's. It was actually
adapted from hdcd_decode.exe, which was adapted from somewhere else.
It's entirely in fixed point math now, so it's fairly deterministic.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
When deleting the currently playing track, stop playback, because the
player engine doesn't like dealing with the current playing track not
actually having a playlist reference to go with it. Better stop playback
instead, as a safety check.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This fixes the ability to configure the MIDI synthesizer properly, after
commit 7e5107d431 was applied.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The timing of block based mode was kind of off. Now it should be just
fine. Thanks to testing on Windows in foo_midi.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This bug prevented zero length or unknown length files, such as FLAC
files with no sample count in the header, or audio streams, from playing
properly, and clipped their output to the 0 samples indicated by the
field. Now it will simply allow wrapped files to decode until they stop
producing output.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The end of input queueing, which can go nuts when there are a lot of
short files, should be terminated when the user asks the player to stop.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Flush the resampler when the source file terminates, so that it outputs
delayed samples properly. This fixes gapless decoding of resampled
files.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Tooltip should appear on the left side when the volume bar is close to
the right side of the screen.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
From now on, all contributions, and all issues and pull requests posted,
must adhere to this document. I would like people to remain civil on my
project, if they possibly can. If they cannot, they will be ejected.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Replace individual virtual buffers with large _mm_malloc blocks at a
time, then dole out chunks of those buffers as the nodes need them.
Should reduce memory contention a little bit.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This seals up a major memory leak of the playback state whenever a chain
is released on stop or on manual track change. CogAudioMulti was
retaining the input node due to its listeners, and InputNode was not
releasing the listeners when asked to stop running. This is fixed now.
Fixes#221
Signed-off-by: Christopher Snowhill <kode54@gmail.com>