Commit graph

671 commits

Author SHA1 Message Date
Tim Mayberry
a974659504 Check return value of windows timer functions and handle errors
Change return type of utils::get_microseconds to signed int and return -1 when
failing to read timer
2015-09-16 11:22:16 +10:00
Paul Davis
ec06f2c49f spelling error fixes (notably "overriden" => "overidden") from IOhannes m zmölnig 2015-09-11 09:23:43 -04:00
John Emmas
d2e083397c Add support for newly introduced class ARDOUR::DSPLoadCalculator (when building with MSVC) 2015-09-10 10:22:38 +01:00
Tim Mayberry
28803fface Remove DSPLoadCalculator class in portaudio backend source 2015-09-10 12:12:56 +10:00
Tim Mayberry
c2e5bdedff Use ARDOUR::DSPLoadCalculator in PortAudioBackend 2015-09-10 12:12:56 +10:00
Robin Gareus
d11b15fbca dummy, allow 8k buffer-size. 2015-09-08 15:14:02 +02:00
Robin Gareus
788234e317 fix dummy-backend driver state
When loading previous state, set_driver() is called before
enumerate_drivers(). 
The available driver list must be available early on.
2015-09-06 10:42:29 +02:00
Robin Gareus
3fc5bf617a mode dummy speeds 2015-09-06 00:46:05 +02:00
Robin Gareus
4ef62a0d6d add dummy-backend speed-selection 2015-09-06 00:33:24 +02:00
John Emmas
7e589dcda2 Add some newly introduced sources to our MSVC project (portaudio_backend) 2015-09-05 18:04:29 +01:00
Robin Gareus
d6df63ed91 Dummy-Backend: special case unit-test 2015-09-05 01:15:28 +02:00
Robin Gareus
fa32fa1abe replace "None" with DeviceNone in ALSA/Coreaudio
TODO: separate MidiSystemNone
2015-09-02 13:33:40 +02:00
Tim Mayberry
7521028831 Add debug output for errors when setting MMCSS thread characteristics 2015-09-02 12:07:59 +10:00
Tim Mayberry
3618689103 Use MMCSS utility functions in PortaudioBackend 2015-09-02 12:07:59 +10:00
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
a6fb71022f Add audio_utils.h header in PortaudioBackend for de/interleaving audio data 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
cb7bac5599 Fix include style of system header 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
56b5e04c3b Fix copy and paste error in debug output message in WINMME Midi Output 2015-09-02 12:07:58 +10:00
Tim Mayberry
ac5eac471d Signal WinMME Midi output thread so the thread wakes up and terminates properly 2015-09-02 12:07:15 +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
f58282844d Don't add "None" devices for ASIO driver in PortaudioBackend 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
82f84d6203 Refactor part of PortAudioIO::pcm_setup into new method 2015-09-02 12:07:15 +10:00
Tim Mayberry
1cb36108bb Change the functions related to initializing the Portaudio library 2015-09-02 12:07:15 +10:00
Tim Mayberry
3b71674eee Remove unused and cryptic _state member from PortAudioIO 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
4e75220661 Define some error codes in PortAudioIO class 2015-09-02 12:07:15 +10:00
Tim Mayberry
e42f9d649b Refactor parts of PortAudioIO class into new method 2015-09-02 12:07:15 +10:00
Tim Mayberry
c857008b93 Refactor part of PortAudioIO::pcm_setup into 2 new methods 2015-09-02 12:07:14 +10:00
Tim Mayberry
41211c984c Make two private methods in PortAudioIO const 2015-09-02 12:07:14 +10:00
Tim Mayberry
8e0e3fcdee Refactor part of PortAudioIO::pcm_setup into new method 2015-09-02 12:07:14 +10:00
Tim Mayberry
58cfd00e5a Add utility method to PortAudioIO class to remove goto from pcm_setup 2015-09-02 12:07:14 +10:00
Tim Mayberry
d6f7066e80 Remove apple specific fixes from PortaudioBackend now that it is windows only 2015-09-02 12:07:14 +10:00
Tim Mayberry
dd93aec029 Don't query supported sample rates for ASIO devices in PortaudioBackend
There has been reports this can take several minutes on some devices so just
return the default rates(and fail to open the device when a SR is specified
that isn't supported)
2015-09-02 12:07:14 +10:00
Tim Mayberry
519f97b91d Use two private utility functions in PortaudioIO class for default SR's and buffer sizes 2015-09-02 12:07:14 +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