Commit Graph

3117 Commits (f4712ad219fb56373d8e277b5ae653045dde240e)

Author SHA1 Message Date
Christopher Snowhill 5e8f066a01 Add include path for libogg
The new libogg directory must be included for <ogg/ogg.h> in one place.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-15 00:40:47 -08:00
Christopher Snowhill 2036a92b23 Remove deleted file
This vorbisfile.h is no longer included in the project tree.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-15 00:40:15 -08:00
Christopher Snowhill df661dc466 Fix dynamic metadata in some cases
For some reason, this sometimes gets set to nil. Fix to refer to the
current track in that case.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-15 00:34:57 -08:00
Christopher Snowhill f071d3e90c Build several libraries out of tree now
Building libogg, libvorbis, libvorbisfile, libFLAC, libopus, and
libopusfile out of tree, to utilize their projects' CMake build scripts,
and also enable any platform optimizations that may have been missing.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-15 00:26:55 -08:00
Christopher Snowhill 52443066e7 Spectrum Visualizer: Fix frequency range, bands
Reduce the virtual resolution to match the actual resolution, and set
the analyzere frequency to Nyquist of the audio input, as it seems to
behave as if the entire range of the input FFT bands are up to the
specified frequency, rather than half of it. Otherwise, we lose half of
the frequency range provided by the input data.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 21:10:57 -08:00
Christopher Snowhill 934589ebdd FFmpeg: Enable AIFF support
The system AIFF reader seems unable to read some really old files, so
enable FFmpeg to do so instead.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 21:09:24 -08:00
Christopher Snowhill efea2e33d8 Equalizer: Correctly handle flatten vs. custom
Flatten EQ button should remember that the preset is set to "Flat", and
drawing on the equalizer or changing sliders should remember that the
preset is on "Custom".

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 20:19:03 -08:00
Christopher Snowhill b8a98e301e Metadata loading: Correctly merge over empty tags
Metadata versus properties merging, correctly merge over empty fields if
they are assigned with empty strings or zeroed numbers, instead of only
merging over completely missing fields.

Fixes emailed bug, CUE Sheet metadata reading, primarily.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 20:02:18 -08:00
Christopher Snowhill 67fcd2bb27 NSDictionary+Merge: Support overwriting empty
Support overwriting empty fields of NSNumber or NSString form with
values from the merging dictionary. Correctly overwrite the value from
the first dictionary with values from the second if the first contains
empty strings or zeroed numbers.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 19:55:20 -08:00
Christopher Snowhill a8c9f748c7 FLAC Input: Correctly prioritize text CUESheet tag
Prioritize "cuesheet" Vorbis tag over binary CUESheet tag, as the former
can contain metadata, while the latter cannot.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 19:54:08 -08:00
Christopher Snowhill 4a0690b3ab Spectrum Visualizer: Change border dimensions
This should make the border consistently sized.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 17:15:38 -08:00
Christopher Snowhill ec56725824 Equalizer: Disable tabbing, and remove HUD style
This should improve contrast significantly.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 17:15:09 -08:00
Christopher Snowhill 0c504d9330 Preferences: Fix alignment of some options
This hopefully handles #232 as best I can, for now.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 17:01:10 -08:00
Christopher Snowhill b9dde0deca Preferences: Fix dead/dupe remove buttons
For some reason, they were marked "navigational", because I accidentally
chose the Info inspector button as the button to dupe to create them in
the first place.

Fixes #237

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 16:59:25 -08:00
Christopher Snowhill f09022693a Preferences: Got rid of appcast selection
There is only one appcast to choose from, and it has been this way for
quite some time now, so simply make it final.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 16:58:03 -08:00
Christopher Snowhill a4ff2477be Equalizer: Various changes
Among the many:
- Spaced out the equalizer settings from the preamp slider
- Propery synchronize the bands' state with the stored settings
- Properly store the setting for Custom mode when drawing on the bands

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 16:46:32 -08:00
Christopher Snowhill 4a9e7baf7f Equalizer: Rename window
Oops. I'll push this change to my next release I have planned.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-13 23:54:02 -08:00
Christopher Snowhill 41efc22096 Equalizer: Bring it back to the quality it had
The quality of the equalizer dialog is now up to par with what we had
before, minus all the crashes.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-13 23:37:58 -08:00
Christopher Snowhill 344ceb173d Visualization: Increased fft size, imported code
Boy, I just be outright stealing code now. But it looks nicer now.

Fixes #234

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-13 12:18:58 -08:00
Christopher Snowhill cad09b8912 CUE Reader: Fix enumerating sheets and tag reading
The reader should have been skipping the properties of CUE sheets when
reading the referenced data for the inner files.

Fixes #235

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-13 12:18:58 -08:00
Christopher Snowhill 7ef583340d Equalizer: Replace dialog with custom job
New custom equalizer dialog, painstakingly hand assembled.
2022-02-13 11:05:32 -08:00
Christopher Snowhill 8033256c4d Visualization: Fix customize toolbar
Spectrum item needs fixed size.

Fixes #230

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-13 02:56:39 -08:00
Christopher Snowhill f2bebdefa7 Visualization: Clear peaks on stop
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-13 01:42:02 -08:00
Christopher Snowhill 992b716193 Visualization: Greatly improve spectrum design
Improvement includes greatly reducing the CPU usage by not using an
NSImage based painting system.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-13 01:32:26 -08:00
Christopher Snowhill 417687600b Implement visualization support and a spectrum
Borrowing some DFT code from deadbeef, this implements a simple spectrum
visualization into the main toolbar of the app.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 23:04:03 -08:00
Christopher Snowhill 1309672adc CUE Sheet Reader: Merge metadata the other way
The file metadata should be merged into the CUE Sheet metadata, as we
want the CUE Sheet to take priority, wherever it happens to have fields
set.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 07:57:13 -08:00
Christopher Snowhill a618073203 Highly Complete: Keep USF RSP HLE disabled for now
There is a missing effect in the relevant tracks from Conker's Bad Fur
Day, an overdrive effect.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 07:45:10 -08:00
Christopher Snowhill 6d09b72c1d Dynamic info now pushes to the correct track
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 07:29:02 -08:00
Christopher Snowhill 455dc0d5c8 Remove unused formatter class from info inspector
The info inspector xib still referenced the blank zero formatter, left
over from before disc support was added.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 07:19:50 -08:00
Christopher Snowhill a05d4537c1 Various tagging fixes
- Fix Vorbis, Opus, and FLAC tag reading
- Fix Vorbis getting a 0 length if passing through the CUE Sheet reader
- Implement support for FLAC binary CUE Sheets

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 07:16:59 -08:00
Christopher Snowhill 1df166b060 Updated lazyusf2, and disabled RSP HLE warnings
The warn logging was preventing working USFs from playing due
to warnings occurring during the playback that didn't otherwise
affect the ability to play the files.
2022-02-12 03:29:43 -08:00
Christopher Snowhill c39b7ee96a Converter: Smarter, if less portable, endian swap
For big endian sample formats, endianness can be swapped using Clang
specific byte swap functions, which are present in all supported
versions of Xcode.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 00:38:08 -08:00
Christopher Snowhill 5f68131437 Converter: One minor change to double to float
Use Accelerate for this, too.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 00:03:25 -08:00
Christopher Snowhill 6b148fef11 Channel Mixer: Rewrite upmixing, changed HRIR
Simple upmixing algorithms now use Accelerate framework functions
instead of complex loops, and the HRIR filter now supports forcing
stereo output to any channel output configuration that has at least
front stereo speakers.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 23:51:41 -08:00
Christopher Snowhill 5bcedab274 Disallow window tabbing on main window
No point in allowing tabs when we don't support multiple playlists yet.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 17:11:04 -08:00
Christopher Snowhill 3711999112 Cog Audio: Allocate maximum needed audio memory
The chunk could be any format, up to floating point double samples, and
up to 18 channels.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 13:50:26 -08:00
Christopher Snowhill 7f8c19799d Fix a very serious error resampling short files
Files that are so short that they need both pre- and post-extrapolation
at the same time.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 07:10:31 -08:00
Christopher Snowhill 0b33fe6dea Don't count output buffering for queue hold
This would count the output duration for every file buffered, rather
than only once.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 06:50:58 -08:00
Christopher Snowhill d5aecaf6a2 Fix outstanding crashes and issues with CUE reader
CUE reader was crashing due to nil metadata pointers, which the new
inplace initializer I was using didn't like. Change it to use a mutable
regular dictionary, and only add items if they're not nil.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 06:49:41 -08:00
Christopher Snowhill d7becdf01a Add a nil pointer check for metadata read
No idea if this is needed or not.
2022-02-11 06:00:36 -08:00
Christopher Snowhill 69c4cb3c16 Minor change to remove unnecessary mutable objects
These are no longer being manipulated, so remove their mutable state.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 05:59:44 -08:00
Christopher Snowhill e695e33537 SID Input: Bring back file hints, better this time
Now file hint stashes the whole file in memory, so that any other
threads reading the file at the same time will just grab the same memory
block and read it, rather than opening the file repeatedly.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 04:43:20 -08:00
Christopher Snowhill 425306129f SID Input: Clean up memory leaks
Two were potential memory leaks on file errors, one was a guaranteed
leak when reading metadata.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 04:19:27 -08:00
Christopher Snowhill b40b8521dd SID Input: Open the files for decoding regardless
No more file handle caching, this was probably a source of crashes.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 04:18:39 -08:00
Christopher Snowhill 09bf1c7ad9 libsidplayfp: Sync with upstream again
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 04:06:16 -08:00
Christopher Snowhill 4f5e5a9e4e SID Input: Synchronize cross file access
The same file may be accessed from other threads, thanks to this cache
thing. Synchronize access so that only one thread is reading the file at
a time.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 03:56:50 -08:00
Christopher Snowhill be6fda4663 SID Input: Don't close hinted source files
The SID decoder uses a hint cache so that when the library requests the
current file open, it will return the exact file already opened, rather
than opening it again. Unfortunately, I was closing the file regardless,
and sometimes, libsidplayfp will reopen the file multiple times, from
other threads, even.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 03:55:26 -08:00
Christopher Snowhill e7df4e529d libsidplayfp: Updated to newer version
This update is from my personal fork, and includes synchronization
around two places in ReSIDfp that use static global tables as caches.
Without the synchronization, there were errors in playback and even
crashes.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 03:48:10 -08:00
Christopher Snowhill 38efa7c8c5 libsidplayfp: Reorganize project file order
Sorted the file tree a bit, for more easily locating files while working
on the code.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 03:46:51 -08:00
Christopher Snowhill bf88c57454 Minor artwork caching changes
Art ID should be set on new files when they are stored into the
database, and the album art property should be affected by assigning to
the artId property, since it affects the caching identifier.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 22:45:26 -08:00