Commit Graph

1851 Commits

Author SHA1 Message Date
Max Kellermann 1624a5eb8d output/Control: add another Cond attribute, replacing audio_output_client_notify 2018-06-23 19:11:48 +02:00
Max Kellermann 1bca29f9e2 output/Control: rename "cond" to "wake_cond"
Prepare for adding another Cond attribute.
2018-06-23 19:10:23 +02:00
Max Kellermann efb8a9bd2c player, decoder, output: wrap MusicPipe in std::shared_ptr/std::unique_ptr 2018-06-23 18:45:57 +02:00
Max Kellermann 2be905b2e2 MusicPipe: eliminate the unused MusicBuffer reference
This requires re-adding the reference to struct DecoderControl, which
was removed recently by commit
9f14e7a98d
2018-06-23 18:36:24 +02:00
Max Kellermann 076be809c2 Music{Pipe,Chunk}: use MusicChunkPtr for the list links 2018-06-23 17:58:42 +02:00
Max Kellermann 88f1233d7b MusicPipe, output/multiple: include cleanup 2018-06-23 17:44:32 +02:00
Max Kellermann 54d295c247 MusicChunkPtr: managed MusicChunk pointer
Make all uses of MusicChunk safe.
2018-06-22 23:11:52 +02:00
Max Kellermann e81b089612 MusicPipe: automatically clear in destructor
We can implement this now that we have a MusicBuffer reference.
2018-06-22 23:09:13 +02:00
Max Kellermann 9f14e7a98d MusicPipe: add MusicBuffer reference
This tiny amount of overhead allows omitting the MusicBuffer in
Clear().
2018-06-22 22:59:44 +02:00
Max Kellermann cb412b221c output/multiple: update API documentation 2018-06-22 22:59:30 +02:00
Christian Kröner 58590b71d1 Fix pause for OSX output plugin (delay one second) 2018-06-02 19:02:37 +02:00
Max Kellermann a8568d7246 Merge branch 'v0.20.x' 2018-05-03 20:15:11 +02:00
Max Kellermann ac61fd1d78 {input,output}/alsa: work around -Wswitch due to SND_PCM_STATE_PRIVATE1 2018-05-03 11:59:18 +02:00
Max Kellermann e08598e7e2 output/alsa: don't submit silence if PCM is not yet running
See code comment.  Closes #260
2018-04-26 17:14:42 +02:00
Max Kellermann d301a79dcf output/alsa: CopyRingToPeriodBuffer() returns bool 2018-04-26 16:44:23 +02:00
Max Kellermann 98d76627a5 output/alsa: disable events in Cancel()
Don't reactivate the PCM device immediately after Cancel() is
finished; if Cancel() gets called this may mean that new data may take
a while to produce, or no data at all will be produced because the
current song is being stopped.

Once new data is available, Play() will automatically reactivate the
PCM.

This fixes underruns when switching songs manually (closes #264).
2018-04-26 16:41:49 +02:00
Max Kellermann 8a809013f3 output/alsa: reset "active" on error
Use the "active" flag in PrepareSockets() instead of LockHasError().
2018-04-26 16:18:59 +02:00
Max Kellermann 485ed0b156 output/alsa: make the "active" attribute thread-safe 2018-04-26 16:18:52 +02:00
Max Kellermann 7d546f80f9 output/alsa: merge Activate() and UnlockActivate()
Prepare to make the "active" attribute thread-safe.
2018-04-26 16:18:18 +02:00
Max Kellermann 5dfdc15f93 output/alsa: rethrow errors in Drain() 2018-04-26 16:17:14 +02:00
Max Kellermann a6e5873443 output/alsa: thread-safety documentation for attribute "active" 2018-04-26 15:54:15 +02:00
Max Kellermann e2cf777538 output/alsa: simplify MultiSocketMonitor::GetEventLoop() calls 2018-04-26 15:54:01 +02:00
Max Kellermann 9c61760713 output/alsa: remove obsolete comment, was moved to Alsa::PeriodBuffer::Allocate() 2018-04-10 15:42:29 +02:00
Christian Kröner d84cd500bb Fix build with DSD disabled 2018-03-07 22:40:19 +01:00
Christian Kröner 5b456cadc4 Reset sample rate to initial state on OSX output 2018-03-07 22:38:09 +01:00
Christian Kröner 4be80982a4 Fix sample rate sync on Mac output for low rates 2018-03-07 21:32:21 +01:00
Christian Kröner 4d7f1f0c35 Implement Pause() for OSXOutput plugin 2018-03-07 11:59:43 +01:00
Christian Kröner d3f097c7f1 Honor 'device "system"' setting for OSX output 2018-03-07 11:59:43 +01:00
Christian Kröner e89c421313 Initial support for DSD over PCM on macOS
From: Christian Kröner <ckroener@gmx.net>

This just copies the necessary bits and pieces from the ALSA plugin and applies them to OSXOutput based on dop config setting. It only changes the OSXOutput plugin as needed for DoP (further changes to support additionally e.g. integer mode or setting the physical device mode require rather a complete rewrite of the output plugin).

Fortunately the Core Audio API is by default bit perfect and supports DoP with minimal changes (setting the sampling rate accordingly after ensuring that the physical mode supports at least 24 bits per channel seems to be enough). This was tested on an Amanero Combo384 device hooked up to a ES9018 DAC.

USAGE (try only on DACs that support DoP):
- Add dop "yes" option to mpdconf
- Be sure to set at least 24bits per channel before playing some DSD file (using Audio-MIDI-Setup)
- Based on the dop setting, MPD will change the sample rate as required and output DoP signal to the DAC
- Hog mode is recommended to ensure that no other program will try to mix some output with the DoP stream (resulting in bad noise)
- Alternatively set the default output device to another device (e.g. the built-in output) to avoid having other audio interfere with DSD playback
2018-02-26 14:55:03 +01:00
Max Kellermann 250b6a3d52 Merge tag 'v0.20.16'
release v0.20.16
2018-02-03 19:59:29 +01:00
Max Kellermann ec408ca6a6 output/pulse: fix crash during auto-detection
The PulseOutput needs to be "enabled" before WaitConnection() may be
called.

Closes #207
2018-01-30 10:06:36 +01:00
Max Kellermann eb771eaf0d output/Thread: re-lock the mutex after flush error
Fixes deadlock due to mutex double lock.
2018-01-29 22:30:56 +01:00
Max Kellermann 97f670658f util/StringFormat: new utility library 2018-01-24 13:28:28 +01:00
Max Kellermann bbc5212436 fs/AllocatedPath: make the nullptr_t constructor public 2018-01-17 12:17:41 +01:00
Max Kellermann 8649ea3d6f thread/Thread: use BoundMethod 2018-01-07 17:20:26 +01:00
François Revol 5b18b66282 Haiku: fix build
Convert the fill_buffer to a class method, to allow accessing the private method.

Also remove the leftover Wrapper stuff.
2018-01-05 23:10:58 +01:00
Max Kellermann 4a120f8090 Merge branch 'v0.20.x' 2018-01-05 10:10:17 +01:00
Max Kellermann c2cbb7b8ce output/haiku: remove unimplemented Cancel() method 2018-01-05 10:05:14 +01:00
Max Kellermann 79b0f97a3f output/Interface: clarify Play() API documentation 2018-01-05 08:35:40 +01:00
Max Kellermann e3ef3e8d71 output/Control: unlock mutex during expensive operations 2018-01-04 10:36:18 +01:00
Max Kellermann 7574dfd339 output/Control: move code from FinishDestroy() to destructor 2018-01-04 10:34:27 +01:00
Max Kellermann a5b93008f5 output/Filtered: remove redundant nullptr assignments from Setup() 2018-01-04 10:32:10 +01:00
Max Kellermann 0227af5bb7 output/Filtered: remove BeginDestroy()
All it does is "sometimes" close the mixer, but that is also done in
the destructor.
2018-01-04 10:29:27 +01:00
Max Kellermann ef71df60f6 output/Multiple: use std::unique_ptr<FilteredAudioOutput> 2018-01-04 10:14:26 +01:00
Max Kellermann f52b3b4e04 output/Multiple: dispose the AudioOutputControl instances
Fixes shutdown memory leak.
2018-01-04 10:11:23 +01:00
Max Kellermann 7e4e32cfe0 output/Filtered: eliminate FinishDestroy()
This is implicitly done by the destructor.
2018-01-04 10:05:31 +01:00
Max Kellermann 9f8649884b output/Control: dispose the FilteredAudioOutput
Fixes shutdown memory leak.
2018-01-04 10:01:34 +01:00
Max Kellermann f1ee4caddd output/Init: fix configuration option name in error message 2018-01-04 09:57:28 +01:00
Max Kellermann 051b8fbb31 output/Thread: add "noexcept" 2018-01-04 09:54:35 +01:00
Max Kellermann b0ea32f660 output/Control: remove unused method StopThread() 2018-01-04 09:20:22 +01:00