iPlug2 - C++ Audio Plug-in Framework
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
IPlugAPPHost Class Reference

A class that hosts an IPlug as a standalone app and provides Audio/Midi I/O. More...

#include <IPlugAPP_host.h>

Classes

struct  AppState
 Used to manage changes to app i/o. More...
 

Public Member Functions

void PopulateSampleRateList (HWND hwndDlg, RtAudio::DeviceInfo *pInputDevInfo, RtAudio::DeviceInfo *pOutputDevInfo)
 
void PopulateAudioInputList (HWND hwndDlg, RtAudio::DeviceInfo *pInfo)
 
void PopulateAudioOutputList (HWND hwndDlg, RtAudio::DeviceInfo *pInfo)
 
void PopulateDriverSpecificControls (HWND hwndDlg)
 
void PopulateAudioDialogs (HWND hwndDlg)
 
bool PopulateMidiDialogs (HWND hwndDlg)
 
void PopulatePreferencesDialog (HWND hwndDlg)
 
bool OpenWindow (HWND pParent)
 
void CloseWindow ()
 
bool Init ()
 
bool InitState ()
 
void UpdateINI ()
 
std::string GetAudioDeviceName (int idx) const
 Returns the name of the audio device at idx. More...
 
int GetAudioDeviceIdx (const char *name) const
 Returns the audio device index linked to a particular name. More...
 
int GetMIDIPortNumber (ERoute direction, const char *name) const
 
void ProbeAudioIO ()
 find out which devices have input channels & which have output channels, add their ids to the lists
 
void ProbeMidiIO ()
 
bool InitMidi ()
 
void CloseAudio ()
 
bool InitAudio (uint32_t inId, uint32_t outId, uint32_t sr, uint32_t iovs)
 
bool AudioSettingsInStateAreEqual (AppState &os, AppState &ns)
 
bool MIDISettingsInStateAreEqual (AppState &os, AppState &ns)
 
bool TryToChangeAudioDriverType ()
 
bool TryToChangeAudio ()
 
bool SelectMIDIDevice (ERoute direction, const char *portName)
 
IPlugAPPGetPlug ()
 

Static Public Member Functions

static IPlugAPPHostCreate ()
 
static int AudioCallback (void *pOutputBuffer, void *pInputBuffer, uint32_t nFrames, double streamTime, RtAudioStreamStatus status, void *pUserData)
 
static void MIDICallback (double deltatime, std::vector< uint8_t > *pMsg, void *pUserData)
 
static void ErrorCallback (RtAudioError::Type type, const std::string &errorText)
 
static WDL_DLGRET PreferencesDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static WDL_DLGRET MainDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 

Static Public Attributes

static std::unique_ptr< IPlugAPPHostsInstance
 

Friends

class IPlugAPP
 

Detailed Description

A class that hosts an IPlug as a standalone app and provides Audio/Midi I/O.

Definition at line 81 of file IPlugAPP_host.h.

Member Function Documentation

int IPlugAPPHost::GetAudioDeviceIdx ( const char *  name) const

Returns the audio device index linked to a particular name.

Parameters
nameThe name of the audio device to test
Returns
The integer index RTAudio has given the audio device

Definition at line 207 of file IPlugAPP_host.cpp.

std::string IPlugAPPHost::GetAudioDeviceName ( int  idx) const

Returns the name of the audio device at idx.

Parameters
idxThe index RTAudio has given the audio device
Returns
The device name. Core Audio device names are truncated.

Definition at line 202 of file IPlugAPP_host.cpp.

int IPlugAPPHost::GetMIDIPortNumber ( ERoute  direction,
const char *  name 
) const
Parameters
directionEither kInput or kOutput
nameThe name of the midi device
Returns
An integer specifying the output port number, where 0 means any

Definition at line 218 of file IPlugAPP_host.cpp.


The documentation for this class was generated from the following files: