![]() |
pl-nk v0.4.5
Plonk|Plink|Plank are a set of cross-platform C/C++ frameworks for audio software development
|
An abstract class to interface with audio devices. More...
Inherits PlonkBase.
Inherited by PLONK_NAMESPACE::IOSAudioHostBase< SampleType >, PLONK_NAMESPACE::PortAudioAudioHostBase< SampleType >, and PLONK_NAMESPACE::RTAudioAudioHostBase< SampleType >.
Public Member Functions | |
| AudioHostBase () throw () | |
| Constructor. | |
| virtual | ~AudioHostBase () |
| Destructor. | |
| bool | getIsRunning () const throw () |
| Determine whether the audio device is running. | |
| bool | getIsPaused () const throw () |
| Determine whether the audio device is paused. | |
| const UnitType & | getOutputUnit () const throw () |
| Get a reference to the output unit. | |
| int | getNumInputs () const throw () |
| Get the number of audio inputs. | |
| int | getNumOutputs () const throw () |
| Get the number of audio outputs. | |
| double | getPreferredHostSampleRate () const throw () |
| Get the current preferred sample rate for the host. | |
| int | getPreferredHostBlockSize () const throw () |
| Get the current preferred block size for the host. | |
| void | setPreferredHostSampleRate (const double newRate) throw () |
| Set the host's preferred sample rate. | |
| void | setPreferredHostBlockSize (const int newSize) throw () |
| Set the host's preferred block size. | |
| int | getPreferredGraphBlockSize () const throw () |
| Get the current preferred block size for the graph. | |
| void | setPreferredGraphBlockSize (const int newSize) throw () |
| Set the graph's preferred block size. | |
| void | setNumInputs (const int numInputs) throw () |
| Set the number of audio inputs required. | |
| void | setNumOutputs (const int numOutputs) throw () |
| Set the number of audio inputs required. | |
| OptionDictionary | getOtherOptions () const throw () |
| Get other (normally platform dependent) options. | |
Protected Member Functions | |
| const ConstBufferArray & | getInputs () const throw () |
| Get the input buffers. | |
| ConstBufferArray & | getInputs () throw () |
| Get the input buffers. | |
| const BufferArray & | getOutputs () const throw () |
| Get the output buffers. | |
| BufferArray & | getOutputs () throw () |
| Get the output buffers. | |
| virtual Text | getHostName () const =0 |
| Get the name of the audio host. | |
| virtual Text | getNativeHostName () const =0 |
| Get the name of the native host audio API. | |
| virtual Text | getInputName () const =0 |
| Get the name of the audio input device. | |
| virtual Text | getOutputName () const =0 |
| Get the name of the audio output device. | |
| virtual double | getCpuUsage () const =0 |
| Get the current CPU usage for the DSP loop. | |
| virtual void | startHost ()=0 |
| Start the host. | |
| virtual void | stopHost ()=0 |
| Stop the host. | |
| virtual UnitType | constructGraph ()=0 |
| This must be implemented by your application. | |
| void | setIsRunning (const bool state) throw () |
| Set a flag to indicate the audio host is running. | |
An abstract class to interface with audio devices.
| virtual UnitType AudioHostBase< SampleType >::constructGraph | ( | ) | [protected, pure virtual] |
This must be implemented by your application.
It should return the audio graph that is rendered to the host.
| virtual double AudioHostBase< SampleType >::getCpuUsage | ( | ) | const [protected, pure virtual] |
Get the current CPU usage for the DSP loop.
Implemented in PLONK_NAMESPACE::IOSAudioHostBase< SampleType >, and PLONK_NAMESPACE::IOSAudioHostBase< float >.
| virtual Text AudioHostBase< SampleType >::getHostName | ( | ) | const [protected, pure virtual] |
Get the name of the audio host.
Implemented in PLONK_NAMESPACE::IOSAudioHostBase< SampleType >, and PLONK_NAMESPACE::IOSAudioHostBase< float >.
| virtual Text AudioHostBase< SampleType >::getInputName | ( | ) | const [protected, pure virtual] |
Get the name of the audio input device.
Implemented in PLONK_NAMESPACE::IOSAudioHostBase< SampleType >, and PLONK_NAMESPACE::IOSAudioHostBase< float >.
| bool AudioHostBase< SampleType >::getIsPaused | ( | ) | const throw () [inline] |
Determine whether the audio device is paused.
| bool AudioHostBase< SampleType >::getIsRunning | ( | ) | const throw () [inline] |
Determine whether the audio device is running.
| virtual Text AudioHostBase< SampleType >::getNativeHostName | ( | ) | const [protected, pure virtual] |
Get the name of the native host audio API.
Implemented in PLONK_NAMESPACE::IOSAudioHostBase< SampleType >, and PLONK_NAMESPACE::IOSAudioHostBase< float >.
| int AudioHostBase< SampleType >::getNumInputs | ( | ) | const throw () [inline] |
Get the number of audio inputs.
| int AudioHostBase< SampleType >::getNumOutputs | ( | ) | const throw () [inline] |
Get the number of audio outputs.
| OptionDictionary AudioHostBase< SampleType >::getOtherOptions | ( | ) | const throw () [inline] |
Get other (normally platform dependent) options.
| virtual Text AudioHostBase< SampleType >::getOutputName | ( | ) | const [protected, pure virtual] |
Get the name of the audio output device.
Implemented in PLONK_NAMESPACE::IOSAudioHostBase< SampleType >, and PLONK_NAMESPACE::IOSAudioHostBase< float >.
| const UnitType& AudioHostBase< SampleType >::getOutputUnit | ( | ) | const throw () [inline] |
Get a reference to the output unit.
| int AudioHostBase< SampleType >::getPreferredGraphBlockSize | ( | ) | const throw () [inline] |
Get the current preferred block size for the graph.
| int AudioHostBase< SampleType >::getPreferredHostBlockSize | ( | ) | const throw () [inline] |
Get the current preferred block size for the host.
| double AudioHostBase< SampleType >::getPreferredHostSampleRate | ( | ) | const throw () [inline] |
Get the current preferred sample rate for the host.
| void AudioHostBase< SampleType >::setIsRunning | ( | const bool | state | ) | throw () [inline, protected] |
Set a flag to indicate the audio host is running.
NB This does not start or stop the host use startHost() and stopHost() respectively.
| void AudioHostBase< SampleType >::setNumInputs | ( | const int | numInputs | ) | throw () |
Set the number of audio inputs required.
This must be called before startHost() to have any effect.
| void AudioHostBase< SampleType >::setNumOutputs | ( | const int | numOutputs | ) | throw () |
Set the number of audio inputs required.
This must be called before startHost() to have any effect.
| void AudioHostBase< SampleType >::setPreferredGraphBlockSize | ( | const int | newSize | ) | throw () [inline] |
Set the graph's preferred block size.
This must be called before startHost() to have any effect.
| void AudioHostBase< SampleType >::setPreferredHostBlockSize | ( | const int | newSize | ) | throw () [inline] |
Set the host's preferred block size.
This must be called before startHost() to have any effect.
| void AudioHostBase< SampleType >::setPreferredHostSampleRate | ( | const double | newRate | ) | throw () [inline] |
Set the host's preferred sample rate.
This must be called before startHost() to have any effect.
| virtual void AudioHostBase< SampleType >::startHost | ( | ) | [protected, pure virtual] |
Start the host.
Implemented in PLONK_NAMESPACE::IOSAudioHostBase< SampleType >, and PLONK_NAMESPACE::IOSAudioHostBase< float >.
| virtual void AudioHostBase< SampleType >::stopHost | ( | ) | [protected, pure virtual] |
Stop the host.
Implemented in PLONK_NAMESPACE::IOSAudioHostBase< SampleType >, and PLONK_NAMESPACE::IOSAudioHostBase< float >.
1.7.4