Commit Graph

139 Commits

Author SHA1 Message Date
Max Kellermann
8fd9d91974 output/Plugin: pass EventLoop& to init()
Eliminate dependency on io_thread_get().
2017-01-25 22:54:41 +01:00
Max Kellermann
5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann
d5e422970c output/Plugin: delay() returns std::chrono::steady_clock::duration 2016-12-28 22:00:29 +01:00
Dave Hocker
f6a85f0b0b output/osx: fix build failure 2016-11-10 12:55:08 +01:00
Max Kellermann
d9cb85df83 output/Plugin: remove 'Error&' parameters, use C++ exceptions only 2016-11-09 12:36:21 +01:00
Max Kellermann
df4616ae4a output/osx: migrate from class Error to C++ exceptions
Beware, this commit was not tested.  I don't have OS X, but I want to
prepare an API change.
2016-11-09 11:51:28 +01:00
Max Kellermann
10f62db9fd output/osx: use std::unique_ptr
Eliminate all those "goto"s and make the function exception-safe.
2016-11-09 11:50:14 +01:00
Max Kellermann
5c075210d6 output/osx: use AtScopeExit() to call CFRelease() 2016-11-09 11:49:21 +01:00
Yue Wang
d73267df5e use osx_output_delay to wait until ring buffer is able to write
This further optimize the performance. 

This is now working properly with a conditional variable bug being fixed (8bbfb5cda1).
2016-09-19 08:51:03 -07:00
Yue Wang
f881917d2f Fix a bug that buffer_frame_size is not properly initialized 2016-09-18 21:09:57 -07:00
Yue Wang
99244f51b0 Remove unused imports 2016-09-18 19:40:55 -07:00
Yue Wang
606d029ed9 Kill mutex and locks in osx_render. Improve performance. Also fix an initialization problem 2016-09-18 19:40:04 -07:00
Yue Wang
e4b9d679fb options for sample rate syncing and device hogging 2016-09-18 19:12:45 -07:00
Yue Wang
4a8a33ea85 Hogging is for user selected device only.
do not hog system device.
2016-09-18 13:15:46 -07:00
Yue Wang
ac4b83046a Add sample rate synchronization and device hogging to core audio plugin
which ensures mpd do bit perfect playback on OS X
2016-09-18 12:52:08 -07:00
Jacob Vosmaer
4d6192adcd Use a ScopeLock around condition.wait() 2016-08-07 15:47:21 +02:00
Jacob Vosmaer
9f1ada898e Improve readability of frame completion loop 2016-08-07 14:15:55 +02:00
Jacob Vosmaer
5617521380 Must lock/unlock around wait 2016-08-06 15:25:58 +02:00
Jacob Vosmaer
9835a2545d Do not assume two pops are enough 2016-08-06 15:19:10 +02:00
Jacob Vosmaer
c28cefeeb0 output/osx: wait-free render callback
Closes https://bugs.musicpd.org/view.php?id=4537 .

Removed the 'cancel' function because it violates 'single producer,
single consumer'.
2016-08-06 00:08:10 +02:00
Jacob Vosmaer
ad80acb22a output/osx: remove incorrect memset behavior
In e068d62 I added code that zeros the remainder of the output buffer
if there are not enough input frames available. I have now learned
that we can signal to the caller of the render callback how much data
is in the output buffers. In practice, the input buffer is so large
that it does not matter so much how we handle input buffer underruns,
but I suppose that saying 'there is no data' is better than 'here is
some silence for you'.
2016-07-22 20:58:37 +02:00
Jacob Vosmaer
4cd9abe632 output/osx channel_map feature 2016-07-09 18:29:35 +02:00
Jacob Vosmaer
e068d62ac6 output/osx rewrite render callback 2016-07-08 15:36:42 +02:00
Jacob Vosmaer
2fdbae3e1f Remove braces 2016-07-03 16:45:23 +02:00
Jacob Vosmaer
87e06793c2 Get rid of GetMacOSStatusCommentString 2016-07-03 14:06:53 +02:00
Jacob Vosmaer
8cc451a2e2 Use error.Set instead of error.Format 2016-07-03 13:36:35 +02:00
Jacob Vosmaer
723c2c7fa9 Remove some debugging code 2016-07-03 13:18:44 +02:00
Jacob Vosmaer
4dd2c5cdd5 Convert device name from CFStringRef to char* 2016-07-03 12:59:19 +02:00
Jacob Vosmaer
bdc257b40e Add debug statements 2016-07-02 23:44:21 +02:00
Jacob Vosmaer
4728f7c697 Use AudioComponent instead of Carbon Component 2016-07-02 23:35:44 +02:00
Max Kellermann
1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann
4fa5538e2b config/Param: split block-specific attributes to new struct ConfigBlock
The old struct config_param remains only for top-level string options.
2015-01-21 23:56:33 +01:00
Max Kellermann
712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann
11fb5bc3d0 output/osx: use nullptr instead of NULL 2014-12-31 11:47:27 +01:00
Max Kellermann
4657a3bd0f output: move functions into the AudioOutput struct 2014-01-29 08:10:46 +01:00
Max Kellermann
bf803e241f AudioOutput: pass plugin to constructor
Make it "const".
2014-01-29 08:10:18 +01:00
Max Kellermann
815d72065c output: rename struct audio_output to AudioOutput 2014-01-28 11:34:09 +01:00
Max Kellermann
e0dc721324 OutputPlugin: rename struct audio_output_plugin to AudioOutputPlugin 2014-01-28 11:33:15 +01:00
Max Kellermann
ea5b901bcc output/*: move to output/plugins/ 2014-01-23 23:49:50 +01:00