iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
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 More...
 
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.

Constructor & Destructor Documentation

◆ IPlugAPPHost()

IPlugAPPHost::IPlugAPPHost ( )

Definition at line 30 of file IPlugAPP_host.cpp.

◆ ~IPlugAPPHost()

IPlugAPPHost::~IPlugAPPHost ( )

Definition at line 35 of file IPlugAPP_host.cpp.

Member Function Documentation

◆ AudioCallback()

int IPlugAPPHost::AudioCallback ( void *  pOutputBuffer,
void *  pInputBuffer,
uint32_t  nFrames,
double  streamTime,
RtAudioStreamStatus  status,
void *  pUserData 
)
static

Definition at line 686 of file IPlugAPP_host.cpp.

◆ AudioSettingsInStateAreEqual()

bool IPlugAPPHost::AudioSettingsInStateAreEqual ( AppState os,
AppState ns 
)

Definition at line 339 of file IPlugAPP_host.cpp.

◆ CloseAudio()

void IPlugAPPHost::CloseAudio ( )

Definition at line 551 of file IPlugAPP_host.cpp.

◆ CloseWindow()

void IPlugAPPHost::CloseWindow ( )

Definition at line 80 of file IPlugAPP_host.cpp.

◆ Create()

IPlugAPPHost * IPlugAPPHost::Create ( )
static

Definition at line 49 of file IPlugAPP_host.cpp.

◆ ErrorCallback()

void IPlugAPPHost::ErrorCallback ( RtAudioError::Type  type,
const std::string &  errorText 
)
static

Definition at line 782 of file IPlugAPP_host.cpp.

◆ GetAudioDeviceIdx()

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.

◆ GetAudioDeviceName()

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.

◆ GetMIDIPortNumber()

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.

◆ GetPlug()

IPlugAPP * IPlugAPPHost::GetPlug ( )
inline

Definition at line 217 of file IPlugAPP_host.h.

◆ Init()

bool IPlugAPPHost::Init ( )

Definition at line 55 of file IPlugAPP_host.cpp.

◆ InitAudio()

bool IPlugAPPHost::InitAudio ( uint32_t  inId,
uint32_t  outId,
uint32_t  sr,
uint32_t  iovs 
)

Definition at line 576 of file IPlugAPP_host.cpp.

◆ InitMidi()

bool IPlugAPPHost::InitMidi ( )

Definition at line 636 of file IPlugAPP_host.cpp.

◆ InitState()

bool IPlugAPPHost::InitState ( )

Definition at line 85 of file IPlugAPP_host.cpp.

◆ MainDlgProc()

WDL_DLGRET IPlugAPPHost::MainDlgProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 543 of file IPlugAPP_dialog.cpp.

◆ MIDICallback()

void IPlugAPPHost::MIDICallback ( double  deltatime,
std::vector< uint8_t > *  pMsg,
void *  pUserData 
)
static

Definition at line 750 of file IPlugAPP_host.cpp.

◆ MIDISettingsInStateAreEqual()

bool IPlugAPPHost::MIDISettingsInStateAreEqual ( AppState os,
AppState ns 
)

Definition at line 355 of file IPlugAPP_host.cpp.

◆ OpenWindow()

bool IPlugAPPHost::OpenWindow ( HWND  pParent)

Definition at line 75 of file IPlugAPP_host.cpp.

◆ PopulateAudioDialogs()

void IPlugAPPHost::PopulateAudioDialogs ( HWND  hwndDlg)

Definition at line 185 of file IPlugAPP_dialog.cpp.

◆ PopulateAudioInputList()

void IPlugAPPHost::PopulateAudioInputList ( HWND  hwndDlg,
RtAudio::DeviceInfo *  pInfo 
)

Definition at line 65 of file IPlugAPP_dialog.cpp.

◆ PopulateAudioOutputList()

void IPlugAPPHost::PopulateAudioOutputList ( HWND  hwndDlg,
RtAudio::DeviceInfo *  pInfo 
)

Definition at line 92 of file IPlugAPP_dialog.cpp.

◆ PopulateDriverSpecificControls()

void IPlugAPPHost::PopulateDriverSpecificControls ( HWND  hwndDlg)

Definition at line 120 of file IPlugAPP_dialog.cpp.

◆ PopulateMidiDialogs()

bool IPlugAPPHost::PopulateMidiDialogs ( HWND  hwndDlg)

Definition at line 211 of file IPlugAPP_dialog.cpp.

◆ PopulateSampleRateList()

void IPlugAPPHost::PopulateSampleRateList ( HWND  hwndDlg,
RtAudio::DeviceInfo *  pInputDevInfo,
RtAudio::DeviceInfo *  pOutputDevInfo 
)

Definition at line 31 of file IPlugAPP_dialog.cpp.

◆ PreferencesDlgProc()

WDL_DLGRET IPlugAPPHost::PreferencesDlgProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 297 of file IPlugAPP_dialog.cpp.

◆ ProbeAudioIO()

void IPlugAPPHost::ProbeAudioIO ( )

find out which devices have input channels & which have output channels, add their ids to the lists

Definition at line 256 of file IPlugAPP_host.cpp.

◆ ProbeMidiIO()

void IPlugAPPHost::ProbeMidiIO ( )

Definition at line 304 of file IPlugAPP_host.cpp.

◆ SelectMIDIDevice()

bool IPlugAPPHost::SelectMIDIDevice ( ERoute  direction,
const char *  portName 
)

Definition at line 461 of file IPlugAPP_host.cpp.

◆ TryToChangeAudio()

bool IPlugAPPHost::TryToChangeAudio ( )

Definition at line 394 of file IPlugAPP_host.cpp.

◆ TryToChangeAudioDriverType()

bool IPlugAPPHost::TryToChangeAudioDriverType ( )

Definition at line 365 of file IPlugAPP_host.cpp.

◆ UpdateINI()

void IPlugAPPHost::UpdateINI ( )

Definition at line 164 of file IPlugAPP_host.cpp.

Friends And Related Function Documentation

◆ IPlugAPP

friend class IPlugAPP
friend

Definition at line 258 of file IPlugAPP_host.h.

Member Data Documentation

◆ sInstance

std::unique_ptr< IPlugAPPHost > IPlugAPPHost::sInstance
static

Definition at line 161 of file IPlugAPP_host.h.


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