Commit Graph

50 Commits (728c44242cea2b0ba72d712bbfa5e7f9fc18db89)

Author SHA1 Message Date
Christopher Snowhill 477feaab1d Now properly supports sample format changing
Sample format can now change dynamically at play time, and the player
will resample it as necessary, extrapolating edges between changes to
reduce the potential for gaps.

Currently supported formats for this:

- FLAC
- Ogg Vorbis
- Any format supported by FFmpeg, such as MP3 or AAC

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 19:18:45 -08:00
Christopher Snowhill 1ef8df675f Cog Audio: Implement support for channel config
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>
2022-02-07 01:10:05 -08:00
Christopher Snowhill 85c7073649 Reformat my own source code with clang-format
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-06 21:49:27 -08:00
Christopher Snowhill 62edb39761 Cog Audio: Major rewrite of audio buffering
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>
2022-02-06 03:08:34 -08:00
Christopher Snowhill 0131f7c925 Revert "Core Audio output: Rewrote major portions"
This reverts commit 637ea4efe1.
2022-02-05 04:14:03 -08:00
Christopher Snowhill 637ea4efe1 Core Audio output: Rewrote major portions
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>
2022-02-05 03:45:02 -08:00
Christopher Snowhill 9e5a70c9ae Cog Audio: Dealt with a major retain cycle leak
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>
2022-01-29 21:31:19 -08:00
Christopher Snowhill af6677cf34 Cog Audio: Keep track of last resampler quality used so we don't reinitialize when not necessary, and also keep track of DSD decimated sample rate separately, so the input format remains unmodified 2022-01-14 11:18:50 -08:00
Christopher Snowhill c8d2864862 Cog Audio: Enhance playback queue handler, so it always halts buffering when there are at least 30 seconds worth of buffers filled, possibly spanning multiple files. Also improve the chain reset function so that playlist changes and playback order control reset the queue properly when the queue refill function is currently entered in another thread. 2022-01-13 23:05:32 -08:00
Christopher Snowhill ec7ac74fcd Cog Audio: Fix input chain to reset its buffers when seeking properly 2022-01-12 23:13:49 -08:00
Christopher Snowhill 5fef62dd03 Cog Audio: Implemented device output and input file format changing support 2022-01-12 21:31:22 -08:00
Christopher Snowhill c4c9a741ef Replaced AudioToolbox converter process with homebrew solution, using the RetroArch sinc resampler 2022-01-11 04:09:19 -08:00
Christopher Snowhill c1c21ec84f Hopefully fix glitching on seeking 2021-12-28 16:04:16 -08:00
Christopher Snowhill ba3746fcff Remove blank line 2021-12-28 15:40:53 -08:00
Christopher Snowhill dfeca7aa97 Seeking now takes the true nuclear approach to output, and should no longer have glitches 2021-12-26 02:01:02 -08:00
Christopher Snowhill d22ee14a36 Audio Output: Take a more nuclear approach to output resetting when seeking 2021-12-25 23:41:45 -08:00
Christopher Snowhill 5246731189 Core Audio: Overhauled audio output to use AudioQueue instead of AudioUnit, fixed downmixing to mono, and implemented upmixing mono or other formats to more channels if the device requests them 2021-12-25 22:32:43 -08:00
Christopher Snowhill 00f1e0957c FLAC: Move libFLAC decoder to higher priority than any potential system decoder, support arbitrary sample bit depths 2021-12-11 00:22:19 -08:00
Chris Moeller 0e3644177e Updated everything else to ARC, and plugged a release cycle. 2016-05-05 13:05:39 -07:00
Chris Moeller 9d5a1fc32e Handled FLAC seeking to the end of file, and stopping on seek errors in general 2014-03-26 02:46:36 -07:00
Chris Moeller 755147b48a Through a bit of ugliness and interface exposure, the InputNode will now pause the OutputNode while it is making the decoder seek, which prevents cases of the output continuing to run for seconds at a time during a slow seek operation by decoders such as HighlyComplete 2013-10-20 22:04:09 -07:00
Chris Moeller 5b13ee3f97 Fixed Ogg chained streams which I broke with the previous commit 2013-10-18 05:56:41 -07:00
Chris Moeller 8c80981827 Minor changes that may or may not have any impact on gaplessness 2013-10-18 05:33:38 -07:00
Chris Moeller c088011fd5 mamburu: Some more fixes 2013-10-12 14:01:21 -07:00
Chris Moeller 1b818bcaa7 mamburu: Fixed InputNode's thread not being stopped at all 2013-10-12 13:59:34 -07:00
Chris Moeller 56848daad6 mamburu: Fixed crashes when seeking near the end of stream 2013-10-12 13:52:58 -07:00
Chris Moeller e5a648578b mamburu: Logging improved, no more excessive logging in release builds 2013-10-11 05:03:55 -07:00
Chris Moeller 15c545b10d Fixed input to float conversion and made it mandatory, so I could move volume scaling to the converter node 2013-10-07 03:59:04 -07:00
Chris Moeller 74b6188772 Implemented floating point sample format support into CogAudio and all relevant plug-ins 2013-10-05 14:15:09 -07:00
Chris Moeller 4c0cf34250 More ReplayGain support, now with metadata handling, but only if the metadata is already loaded 2013-10-02 02:30:04 -07:00
Chris Moeller 6ea103b1c3 Implemented ReplayGain support, so far only in the HighlyComplete component. 2013-10-01 23:00:16 -07:00
vspader bf7b2c0a2b Added timeout and chillout logic to the HTTP source so it doesn't freak out when there's no data available. 2009-03-06 21:58:50 -08:00
vspader c78a553532 Bug fix for cue sheet changes. 2008-05-01 23:34:23 +00:00
vspader 5715522470 Moved to frame-based reading/seeking instead of byte/second based. Some formats have still not been updated and are broken.
Added icons for other formats.
2007-11-24 20:16:27 +00:00
vspader f1b9141f4b Added mime type support. 2007-10-14 18:12:15 +00:00
vspader 97a278a143 Cleaned up memory leaks. 2007-10-13 07:09:46 +00:00
vspader 139bab5e0e Fixed up streaming a bit.
Removed debugging code for http source. Was that in 0.06? Whoops.
2007-10-12 02:55:59 +00:00
vspader b57bcc121c Added support for gapless multitrack files.
Modified cue sheet plugin to use it.
2007-10-11 02:08:29 +00:00
vspader 5ad2728d3c Moved converter to a seperate node again. 2007-10-03 20:23:14 +00:00
vspader daba91b462 Removed debugging messages. 2007-07-11 01:20:32 +00:00
vspader 88d26d3461 Fixed some seeking bugs. 2007-05-26 22:13:11 +00:00
vspader 0f7f8f2750 A fix to try to stop the buffer from running dry when seeking. 2007-05-26 12:42:00 +00:00
vspader 4e1f598ac4 Fix for short audio files. 2007-05-16 23:07:00 +00:00
vspader 79934e0607 Fix for some playback issues (low frequency files). 2007-05-16 01:06:23 +00:00
vspader c810d2f492 Muleiple vorbis bitstreams in one file for streaming. Bitstreams can be different formats. (!) 2007-03-03 22:55:26 +00:00
vspader aafb021a80 Gapless playback fixes. 2007-03-03 21:13:25 +00:00
vspader 1e16835c8c Fixed up converter/inputnode relationship. 2007-03-03 18:25:10 +00:00
vspader 1aead1bf0d Merged decoder and converter threads to facilitate midstream format changing. 2007-03-03 17:19:37 +00:00
vspader 934840ace5 Added source plugin support. Things are incredibly broken. Besides Ogg Vorbis. That should still work. 2007-03-02 01:36:52 +00:00
vspader 927b65a4a5 Merged with cog-audio-framework branch. Cog now uses plugins. 2007-02-24 20:36:27 +00:00