Commit graph

39 commits

Author SHA1 Message Date
Tim Mayberry
b288a40220 Add utility functions in PortaudioBackend for re/setting MMCSS thread characteristics 2015-09-02 12:07:59 +10:00
Tim Mayberry
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
Tim Mayberry
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
Tim Mayberry
f143d76523 Extract MIDI input/output processing in PortAudioBackend into new methods 2015-09-02 12:07:58 +10:00
Tim Mayberry
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
Tim Mayberry
5448c229d9 Extract main processing section of PortAudioBackend into new method 2015-09-02 12:07:58 +10:00
Tim Mayberry
f27d8e1e23 Extract freewheel processing in PortAudioBackend into new method 2015-09-02 12:07:58 +10:00
Tim Mayberry
cf81caa798 Don't update unused dsp timer variable in freewheel process in PortaudioBackend 2015-09-02 12:07:58 +10:00
Tim Mayberry
7b23f80b03 Refactor port change handling part of PA Backend process function into new method 2015-09-02 12:07:58 +10:00
Tim Mayberry
684701427e Rename variables in PortaudioBackend in preparation for using PA callback API 2015-09-02 12:07:58 +10:00
Tim Mayberry
d520b9c878 Stop WINMME midi driver/devices when PortAudio backend is stopped 2015-09-02 12:07:15 +10:00
Tim Mayberry
2dbdaaa8f5 Refactor part of PortAudioBackend::_start/stop into new methods 2015-09-02 12:07:15 +10:00
Tim Mayberry
0396df963f Implement new AudioBackend API for force updating devices in PortaudioBackend 2015-09-02 12:07:15 +10:00
Tim Mayberry
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
Tim Mayberry
8c2b9dac59 Rename several methods in PortAudioIO class
return ErrorCode's and handle them where necessary
2015-09-02 12:07:15 +10:00
Tim Mayberry
fd0b54f459 Use PortAudioIO::ErrorCode as return value from PortAudioIO::pcm_setup 2015-09-02 12:07:15 +10:00
Tim Mayberry
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
Tim Mayberry
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
Tim Mayberry
ba4f685d2d Use a translated error message in PortaudioBackend when unable to open audio device 2015-09-02 12:07:14 +10:00
Tim Mayberry
432e0073f6 Convert some error output to debug output in PortaudioBackend 2015-09-02 12:07:14 +10:00
Tim Mayberry
9185978d2f Use translated error message in PortaudioBackend with failing to aquire RT perms 2015-09-02 12:07:14 +10:00
Tim Mayberry
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
Tim Mayberry
7537a992b3 Use translated error message in PortaudioBackend for audio device I/O error 2015-09-02 12:07:14 +10:00
Tim Mayberry
07f3dae936 Use translated error message for failing to set thread priorities in PortaudioBackend 2015-09-02 12:07:14 +10:00
Tim Mayberry
ee77a7a883 Use AudioBackend::get_standard_device_name for "None" midi device in PortaudioBackend 2015-09-02 12:07:14 +10:00
Tim Mayberry
451e35002c Use pretty name infrastructure to display MIDI device name 2015-09-02 12:07:14 +10:00
Tim Mayberry
66cafd10d5 Use ASIO specific device channel names for port properties/pretty names 2015-08-05 13:21:30 +10:00
Robin Gareus
c6a02503b4 Windows XP compat 2015-08-03 22:53:53 +02:00
John Emmas
f3d3082872 Use llabs (rather than std::abs) for compatibility with MSVC
MSVC doesn't offer an override which accepts int64_t (at least, the 32-bit compiler doesn't)
2015-07-31 13:43:22 +01:00
Tim Mayberry
cfbd9dd6d4 Add functionality to show ASIO control panel 2015-07-31 09:59:54 +10:00
Tim Mayberry
acd17a9b53 Use MMCSS to elevate the thread priorities for audio and MIDI threads
use AVRT_PRIORITY_NORMAL for audio threads and AVRT_PRIORITY_HIGH for MIDI
threads
2015-07-31 09:59:54 +10:00
Tim Mayberry
fe50d06876 Implement AudioBackend::driver_name() in PortaudioBackend
This was missing and is necessary for EngineControl dialog to work properly
2015-07-31 09:59:54 +10:00
Tim Mayberry
6a0e46352c Add extra DEBUG_TRACE output to PortaudioBackend 2015-07-31 09:59:54 +10:00
Tim Mayberry
e258c827e2 WinMME based midi input/output for portaudio backend
TODO:

Use MMCSS to elevate thread priorities
Enable/test and fix SYSEX related code
2015-07-31 09:59:54 +10:00
Tim Mayberry
6b7875de1e Support selecting separate input and output devices in portaudio backend 2015-07-31 09:59:54 +10:00
Tim Mayberry
4e370feeb1 Set default input/output device based on selected host api rather than global default 2015-07-31 09:59:54 +10:00
Tim Mayberry
b6db19a5c6 Add host api/driver selection to PortaudioBackend 2015-07-31 09:59:54 +10:00
Robin Gareus
56cc3e2407 fix portengin get_ports() flags API
require all flags to be present (same as jack)
2015-05-03 22:34:52 +02:00
Robin Gareus
1cca79258a call me Mr. Backend
simple blocking (no callback) PortAudio Backend
2015-03-13 13:32:14 +01:00