13
0
Commit Graph

32 Commits

Author SHA1 Message Date
ac301b998a Use a range of values for ASIO buffer sizes if provided by driver
This has been tested on four devices:

- A RME HDSP Multiface
- A Yamaha AG06
- A Focusrite 2i2
- A built-in soundcard running ASIO4ALL

The HDSP and the AG06 only return one buffer size when queried so the preferred
size is used as before.

The Focusrite returns a min corresponding to the position of the slider in the
control dialog and the max is 1024. The granularity is 1 so this means that the
number of values needs to be reduced for the current UI design with a combo
box so the granularity is increased until there are around 8-9 buffer sizes to
choose from evenly spaced between min and max(but we could easily change this
if the UI changes etc).

The ASIO4ALL driver returns a min of 64 and a max of 2048 and a granularity of
8. So where the minimum buffer size and granularity is a power of 2 use only
buffer sizes that are power of 2.

If the driver returns different values for min and max it is not currently
possible to indicate which is the driver preferred value. A checkbox or other
UI element could be added to the AudioSetup dialog to only use the preferred
value but that is more work and perhaps not necessary.
2015-11-19 10:23:26 +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
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
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
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
82f84d6203 Refactor part of PortAudioIO::pcm_setup into new method 2015-09-02 12:07:15 +10:00
1cb36108bb Change the functions related to initializing the Portaudio library 2015-09-02 12:07:15 +10:00
3b71674eee Remove unused and cryptic _state member from PortAudioIO 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
4e75220661 Define some error codes in PortAudioIO class 2015-09-02 12:07:15 +10:00
e42f9d649b Refactor parts of PortAudioIO class into new method 2015-09-02 12:07:15 +10:00
c857008b93 Refactor part of PortAudioIO::pcm_setup into 2 new methods 2015-09-02 12:07:14 +10:00
41211c984c Make two private methods in PortAudioIO const 2015-09-02 12:07:14 +10:00
8e0e3fcdee Refactor part of PortAudioIO::pcm_setup into new method 2015-09-02 12:07:14 +10:00
58cfd00e5a Add utility method to PortAudioIO class to remove goto from pcm_setup 2015-09-02 12:07:14 +10:00
519f97b91d Use two private utility functions in PortaudioIO class for default SR's and buffer sizes 2015-09-02 12:07:14 +10:00
c6c0654b5a Add Utility function to get host API type in PortaudioIO class 2015-09-02 12:07:14 +10:00
08d6dd153e Add "None" devices to PortaudioBackend
This allows for disabling either input or output, but not both
2015-09-02 12:07:14 +10:00
5a5226dded Add StandardDevice enum to portaudio_io.h header 2015-09-02 12:07:14 +10:00
71e7b2fbd6 Set the default host api in PortaudioBackend when initializing portaudio
Not setting a default driver causes issues with the EngineControl dialog
2015-08-07 01:25:14 +10:00
66cafd10d5 Use ASIO specific device channel names for port properties/pretty names 2015-08-05 13:21:30 +10:00
7295bb6454 Refactor methods in PortaudioBackend to get ASIO buffer sizes 2015-08-05 13:21:26 +10:00
6ca1c8164f Add ASIO specific code to query preferred buffer size for device 2015-08-05 10:52:03 +10:00
cfbd9dd6d4 Add functionality to show ASIO control panel 2015-07-31 09:59:54 +10:00
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
6b7875de1e Support selecting separate input and output devices in portaudio backend 2015-07-31 09:59:54 +10:00
ff1d4d5c67 Refactor PortAudioIO::discover into three private methods 2015-07-31 09:59:54 +10:00
4e370feeb1 Set default input/output device based on selected host api rather than global default 2015-07-31 09:59:54 +10:00
b6db19a5c6 Add host api/driver selection to PortaudioBackend 2015-07-31 09:59:54 +10:00
1cca79258a call me Mr. Backend
simple blocking (no callback) PortAudio Backend
2015-03-13 13:32:14 +01:00