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>
Now with a slightly more appropriate icon for non-retina displays. I
still want to consider what to do with this, since it still looks a bit
blurry on 1x displays.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This prevents the apply presets function from resaving the preset number
and retriggering itself repeatedly, which would cause a crash.
Fixes#223
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Store custom presets on value changes, on half second intervals, as the
listener observes the user changing the settings.
Fixes#222
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Disable automatic update checking on startup for debug builds. Prevents
a crash from occurring when it attempts to retrieve the version number.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>