13
0
Commit Graph

64 Commits

Author SHA1 Message Date
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
9840a11537 implement metadata-set for remaining backends 2016-04-18 00:35:51 +02:00
9472200727 fix hang at exit (after freewheeling) with PA-nonblocking backend 2016-02-27 00:50:02 +01:00
830db39585 Implement new AudioBackend API in PA backend to choose between callback and blocking API 2016-02-11 12:15:07 +10:00
b2cf028fcb Implement MIDI device enumeration and latency offset/calibration in portaudio backend 2016-02-11 12:15:07 +10:00
b67892833b ship both blocking and callback PA backends (for debug purposes)
this just works (no symbol conflicts)
2015-12-21 22:12:15 +01:00
fe0802169c standardize port-names 2015-12-08 15:32:05 +01:00
1372407f82 fix previous commit. 2015-12-08 00:52:06 +01:00
8781004ca2 portaudio connect & graph-changed callbacks (untested) 2015-12-08 00:36:29 +01:00
e9be313c11 Fix latency compensation for audio data in portaudio backend
For drivers that correctly report latency values(ASIO) this should result a
much closer alignment of audio in a loopback test. Measurement and
adjustment may still be needed, especially for non-ASIO drivers.

Testing with the RME HDSP Multiface and Yamaha AG06 using ASIO drivers results
in maximum offset of a couple of samples.
2015-12-02 10:24:08 +10:00
5f267f92bf Rename member variables in Portaudio Backend for consistency 2015-12-02 10:24:07 +10:00
29feb914b9 Rename blocking process function in portaudio backend 2015-12-02 10:24:06 +10:00
3e6b28daca Rename blocking thread function in portaudio backend 2015-12-02 10:24:05 +10:00
07b2518979 Fix windows build when using pthreads-win32 library 2015-11-19 20:54:38 +10:00
f1b336b01e Add support for callback API to portaudio backend but keep blocking API as default
Don't use the callback API for now until further and wider testing.
2015-11-19 10:23:26 +10:00
87c36aba60 use new error-messages 2015-10-02 17:51:17 +02:00
aa713fcd83 Return meaningful error codes when PortaudioBackend fails to start
So they can be used to give a contextual error message in the GUI
2015-10-01 09:10:19 +10:00
f178152114 Use portaudio error codes in the PortaudioIO class.
Having error codes defined in PortaudioIO means it is not dependent on the
ErrorCodes in AudioBackend but it doesn't really make sense to have another
set, so just use the PA ones until they become insufficient.
2015-10-01 09:10:19 +10:00
d007fc05b1 De/Initialize MMCSS on windows in PBD::init/cleanup instead of in PA Backend 2015-09-16 11:22:16 +10:00
091c4ed3a7 Move Windows MMCSS related utility functions into libpbd 2015-09-16 11:22:16 +10:00
d76fe212b7 Move MMCSS related utility functions into PBD namespace
In preparation for moving to libpbd
2015-09-16 11:22:16 +10:00
3f5c01e4eb Move Windows timer utility functions from PA backend into libpbd 2015-09-16 11:22:16 +10:00
4ffe8ffc0f Put Windows timer functions into PBD namespace in preparation for moving them to libpbd
Add functions for get/set the Multimedia timer resolution, although we are
really only interested in the minimum, this will facilitate testing

Put timer utility functions inside nested namespaces as they are platform
specific
2015-09-16 11:22:16 +10:00
b2a7393553 Change types in DSPLoadCalculator to signed integer after change in utils::get_microsecond 2015-09-16 11:22:16 +10:00
3618689103 Use MMCSS utility functions in PortaudioBackend 2015-09-02 12:07:59 +10:00
b288a40220 Add utility functions in PortaudioBackend for re/setting MMCSS thread characteristics 2015-09-02 12:07:59 +10:00
77ce989dfa Pass input and output audio buffers into PortaudioBackend blocking process function
This makes it possible to reuse the method for callback based processing
2015-09-02 12:07:59 +10:00
23a490c906 Add two utility methods to abstract PortAudioBackend state
These may change as support for callback API is added
2015-09-02 12:07:58 +10:00
f143d76523 Extract MIDI input/output processing in PortAudioBackend into new methods 2015-09-02 12:07:58 +10:00
a65b1ddedc Add a DSPLoadCalculator class to the PortAudioBackend for DSP load calculation
The class uses the same algorithm as in the coreaudio and alsa backends and
should probably go into libardour at some point
2015-09-02 12:07:58 +10:00
5448c229d9 Extract main processing section of PortAudioBackend into new method 2015-09-02 12:07:58 +10:00
f27d8e1e23 Extract freewheel processing in PortAudioBackend into new method 2015-09-02 12:07:58 +10:00
cf81caa798 Don't update unused dsp timer variable in freewheel process in PortaudioBackend 2015-09-02 12:07:58 +10:00
7b23f80b03 Refactor port change handling part of PA Backend process function into new method 2015-09-02 12:07:58 +10:00
684701427e Rename variables in PortaudioBackend in preparation for using PA callback API 2015-09-02 12:07:58 +10:00
d520b9c878 Stop WINMME midi driver/devices when PortAudio backend is stopped 2015-09-02 12:07:15 +10:00
2dbdaaa8f5 Refactor part of PortAudioBackend::_start/stop into new methods 2015-09-02 12:07:15 +10:00
0396df963f Implement new AudioBackend API for force updating devices in PortaudioBackend 2015-09-02 12:07:15 +10:00
585930f058 Update devices in PortaudioBackend when setting the driver
Reinitialize portaudio to pick up changes in devices and ASIO buffer settings
2015-09-02 12:07:15 +10:00
8c2b9dac59 Rename several methods in PortAudioIO class
return ErrorCode's and handle them where necessary
2015-09-02 12:07:15 +10:00
fd0b54f459 Use PortAudioIO::ErrorCode as return value from PortAudioIO::pcm_setup 2015-09-02 12:07:15 +10:00
cc7e97f296 Reindent and reformat switch statements in PortaudioBackend
This is more readable and consistent with the rest of the source files
2015-09-02 12:07:14 +10:00
71a1e9e90d Use translated error messages in PortaudioBackend when SR or i/o channel counts don't match requested
These errors are probably preventable but currently they do occur so at least
tell the user about them(and hope they check the error log window)
2015-09-02 12:07:14 +10:00
ba4f685d2d Use a translated error message in PortaudioBackend when unable to open audio device 2015-09-02 12:07:14 +10:00
432e0073f6 Convert some error output to debug output in PortaudioBackend 2015-09-02 12:07:14 +10:00
9185978d2f Use translated error message in PortaudioBackend with failing to aquire RT perms 2015-09-02 12:07:14 +10:00
9d67d22e70 Use debug output rather than sending errors for developer relevant port errors
Most of these are not errors that are intended for the user, they are only
intended for developers so don't send them to PBD::error. The errors that may
be relevant to users should be handled in libardour or the GUI in response to
return values
2015-09-02 12:07:14 +10:00
7537a992b3 Use translated error message in PortaudioBackend for audio device I/O error 2015-09-02 12:07:14 +10:00
07f3dae936 Use translated error message for failing to set thread priorities in PortaudioBackend 2015-09-02 12:07:14 +10:00
ee77a7a883 Use AudioBackend::get_standard_device_name for "None" midi device in PortaudioBackend 2015-09-02 12:07:14 +10:00