linuxsampler 2.3.1
LinuxSampler::AudioOutputDevice::ParameterChannels Class Reference

Device Parameters 'CHANNELS'. More...

#include <AudioOutputDevice.h>

Inheritance diagram for LinuxSampler::AudioOutputDevice::ParameterChannels:
LinuxSampler::DeviceCreationParameterInt LinuxSampler::DeviceCreationParameter LinuxSampler::DeviceRuntimeParameter

Public Member Functions

 ParameterChannels ()
 
 ParameterChannels (String s)
 
virtual String Description () OVERRIDE
 A human readable description, explaining the exact purpose of the driver parameter.
 
virtual bool Fix () OVERRIDE
 Whether the parameter is read only.
 
virtual bool Mandatory () OVERRIDE
 Whether the parameter must be supplied by the user at device creation time.
 
virtual std::map< String, DeviceCreationParameter * > DependsAsParameters () OVERRIDE
 Might return a unique key-value pair list (map) reflecting the dependencies of this parameter to other parameters.
 
virtual optional< intDefaultAsInt (std::map< String, String > Parameters) OVERRIDE
 
virtual optional< intRangeMinAsInt (std::map< String, String > Parameters) OVERRIDE
 
virtual optional< intRangeMaxAsInt (std::map< String, String > Parameters) OVERRIDE
 
virtual std::vector< intPossibilitiesAsInt (std::map< String, String > Parameters) OVERRIDE
 
virtual void OnSetValue (int i) OVERRIDE throw (Exception)
 
virtual String Type () OVERRIDE
 Some name reflecting the parameter's value type, like "BOOL, "INT", "FLOAT", "STRING", "STRINGS".
 
virtual bool Multiplicity () OVERRIDE
 Whether the parameter only allows to set one scalar value, or if true is returned here, the parameter allows to manage a list of values instead.
 
virtual optional< StringDefault (std::map< String, String > Parameters) OVERRIDE
 Might return a default value for this parameter.
 
virtual optional< StringDefault ()
 Might return a default value for this parameter.
 
virtual optional< StringRangeMin (std::map< String, String > Parameters) OVERRIDE
 Might return a minimum value for this parameter.
 
virtual optional< StringRangeMin ()
 Might return a minimum value for this parameter.
 
virtual optional< StringRangeMax (std::map< String, String > Parameters) OVERRIDE
 Might return a maximum value for this parameter.
 
virtual optional< StringRangeMax ()
 Might return a maximum value for this parameter.
 
virtual optional< StringPossibilities (std::map< String, String > Parameters) OVERRIDE
 Might return a comma separated list as String with possible values for this parameter.
 
virtual optional< StringPossibilities ()
 Might return a comma separated list as String with possible values for this parameter.
 
virtual String Value () OVERRIDE
 The current value of this parameter (encoded as String).
 
virtual void SetValue (String val) OVERRIDE throw (Exception)
 Alter the parameter with the value given by val.
 
virtual void SetValue (int i) throw (Exception)
 
virtual int ValueAsInt ()
 
virtual optional< StringDepends ()
 Might return a comma separated list of parameter names this parameter depends on.
 
void Attach (Device *pDevice)
 Sets the internal device pointer to a specific device (driver instance) for this parameter object.
 

Static Public Member Functions

static String Name ()
 

Protected Member Functions

void InitWithDefault ()
 

Protected Attributes

int iVal
 
DevicepDevice
 

Detailed Description

Device Parameters 'CHANNELS'.

Used to increase / decrease the number of audio channels of audio output device.

Definition at line 103 of file AudioOutputDevice.h.

Constructor & Destructor Documentation

◆ ParameterChannels() [1/2]

LinuxSampler::AudioOutputDevice::ParameterChannels::ParameterChannels ( )

◆ ParameterChannels() [2/2]

LinuxSampler::AudioOutputDevice::ParameterChannels::ParameterChannels ( String  s)

Member Function Documentation

◆ Attach()

void LinuxSampler::DeviceCreationParameter::Attach ( Device pDevice)
inlineinherited

Sets the internal device pointer to a specific device (driver instance) for this parameter object.

Descendants usually use that internal pointer to interact with their specific driver implementation class.

Definition at line 751 of file DeviceParameter.h.

◆ Default() [1/2]

virtual optional< String > LinuxSampler::DeviceCreationParameter::Default ( )
virtualinherited

Might return a default value for this parameter.

The default value will be used if the user does not provide a specific value for this parameter at device creation time. If the parameter does not have a reasonable default value, it will return optional<String>::nothing.

This method already provides an implementation, which usually is not overridden by descendants. A descendant would rather implement the other Default() method taking arguments.

◆ Default() [2/2]

virtual optional< String > LinuxSampler::DeviceCreationParameterInt::Default ( std::map< String, String Parameters)
virtualinherited

Might return a default value for this parameter.

The default value will be used if the user does not provide a specific value for this parameter at device creation time.

This method must be implemented by descendants. If the parameter does not have a reasonable default value, it should return optional<String>::nothing.

As arguments, the parameters are passed to this method automatically, which the user already provided. For example a parameter "CARD" the user already did set for selecting a specific sound card. So such arguments resolve dependencies of this parameter.

Parameters
Parameters- other parameters which the user already supplied

Implements LinuxSampler::DeviceCreationParameter.

◆ DefaultAsInt()

virtual optional< int > LinuxSampler::AudioOutputDevice::ParameterChannels::DefaultAsInt ( std::map< String, String Parameters)
virtual

◆ Depends()

virtual optional< String > LinuxSampler::DeviceCreationParameter::Depends ( )
virtualinherited

Might return a comma separated list of parameter names this parameter depends on.

See this class's introduction about a discussion of parameters with dependencies. If this method returns optional<String>::nothing, then it does not have any dependencies to other parameters.

This method already provides an implementation, which usually is not overridden by descendants. A descendant would rather implement DependsAsParameters() instead.

See also
DependsAsParameters()

◆ DependsAsParameters()

virtual std::map< String, DeviceCreationParameter * > LinuxSampler::AudioOutputDevice::ParameterChannels::DependsAsParameters ( )
virtual

Might return a unique key-value pair list (map) reflecting the dependencies of this parameter to other parameters.

Each entry in the map consists of a key-value pair, the key being the parameter name of the respective dependent parameter, and the value being an instance of the dependency parameter of that name.

A descendant MUST implement this method, informing about its dependencies. If the parameter does not have any dependencies it should return an empty map.

See this class's introduction about a discussion of parameters with dependencies.

Implements LinuxSampler::DeviceCreationParameter.

◆ Description()

virtual String LinuxSampler::AudioOutputDevice::ParameterChannels::Description ( )
virtual

A human readable description, explaining the exact purpose of the driver parameter.

The text returned here can be used to display the user in a GUI frontend some helping text, that explains what the parameter actually does.

Implements LinuxSampler::DeviceRuntimeParameter.

◆ Fix()

virtual bool LinuxSampler::AudioOutputDevice::ParameterChannels::Fix ( )
virtual

Whether the parameter is read only.

Not to be confused with "creation" parameters! A driver parameter which returns true here can never be set or altered at any time. Not even at instanciation time of the driver! A typical example would be a parameter "SAMPLERATE" for a specific sound card, where the specific sound card does not allow to switch the sound card's sample rate in any way. Yet the value returned by the parameter (read only) might be different, depending on the actual sound card the user selected with the audio driver.

Implements LinuxSampler::DeviceRuntimeParameter.

◆ InitWithDefault()

void LinuxSampler::DeviceCreationParameterInt::InitWithDefault ( )
protectedinherited

◆ Mandatory()

virtual bool LinuxSampler::AudioOutputDevice::ParameterChannels::Mandatory ( )
virtual

Whether the parameter must be supplied by the user at device creation time.

If this method return false, then the parameter is optional

Implements LinuxSampler::DeviceCreationParameter.

◆ Multiplicity()

virtual bool LinuxSampler::DeviceCreationParameterInt::Multiplicity ( )
virtualinherited

Whether the parameter only allows to set one scalar value, or if true is returned here, the parameter allows to manage a list of values instead.

A typical example of multiplicity parameter is i.e. a "ROUTING" parameter, that would allow a user to interconnect the sampler with other apps and devices with drivers that support such concepts (like JACK and ALSA MIDI do).

Implements LinuxSampler::DeviceRuntimeParameter.

◆ Name()

static String LinuxSampler::AudioOutputDevice::ParameterChannels::Name ( )
static

◆ OnSetValue()

virtual void LinuxSampler::AudioOutputDevice::ParameterChannels::OnSetValue ( int  i)
throw (Exception
)
virtual

◆ Possibilities() [1/2]

virtual optional< String > LinuxSampler::DeviceCreationParameter::Possibilities ( )
virtualinherited

Might return a comma separated list as String with possible values for this parameter.

If the parameter does not have reasonable, specific possible values, it will return optional<String>::nothing.

This method already provides an implementation, which usually is not overridden by descendants. A descendant would rather implement the other Possibilities() method taking arguments.

Implements LinuxSampler::DeviceRuntimeParameter.

◆ Possibilities() [2/2]

virtual optional< String > LinuxSampler::DeviceCreationParameterInt::Possibilities ( std::map< String, String Parameters)
virtualinherited

Might return a comma separated list as String with possible values for this parameter.

This method must be implemented by descendants. If the parameter does not have reasonable, specific possible values, it should return optional<String>::nothing.

As arguments, the parameters are passed to this method automatically, which the user already provided. For example a parameter "CARD" the user already did set for selecting a specific sound card. So such arguments resolve dependencies of this parameter.

Parameters
Parameters- other parameters which the user already supplied

Implements LinuxSampler::DeviceCreationParameter.

◆ PossibilitiesAsInt()

virtual std::vector< int > LinuxSampler::AudioOutputDevice::ParameterChannels::PossibilitiesAsInt ( std::map< String, String Parameters)
virtual

◆ RangeMax() [1/2]

virtual optional< String > LinuxSampler::DeviceCreationParameter::RangeMax ( )
virtualinherited

Might return a maximum value for this parameter.

If the parameter does not have a reasonable maximum value, it will return optional<String>::nothing.

This method already provides an implementation, which usually is not overridden by descendants. A descendant would rather implement the other RangeMax() method taking arguments.

Implements LinuxSampler::DeviceRuntimeParameter.

◆ RangeMax() [2/2]

virtual optional< String > LinuxSampler::DeviceCreationParameterInt::RangeMax ( std::map< String, String Parameters)
virtualinherited

Might return a maximum value for this parameter.

This method must be implemented by descendants. If the parameter does not have a reasonable maximum value, it should return optional<String>::nothing.

As arguments, the parameters are passed to this method automatically, which the user already provided. For example a parameter "CARD" the user already did set for selecting a specific sound card. So such arguments resolve dependencies of this parameter.

Parameters
Parameters- other parameters which the user already supplied

Implements LinuxSampler::DeviceCreationParameter.

◆ RangeMaxAsInt()

virtual optional< int > LinuxSampler::AudioOutputDevice::ParameterChannels::RangeMaxAsInt ( std::map< String, String Parameters)
virtual

◆ RangeMin() [1/2]

virtual optional< String > LinuxSampler::DeviceCreationParameter::RangeMin ( )
virtualinherited

Might return a minimum value for this parameter.

If the parameter does not have a reasonable minimum value, it will return optional<String>::nothing.

This method already provides an implementation, which usually is not overridden by descendants. A descendant would rather implement the other RangeMin() method taking arguments.

Implements LinuxSampler::DeviceRuntimeParameter.

◆ RangeMin() [2/2]

virtual optional< String > LinuxSampler::DeviceCreationParameterInt::RangeMin ( std::map< String, String Parameters)
virtualinherited

Might return a minimum value for this parameter.

This method must be implemented by descendants. If the parameter does not have a reasonable minimum value, it should return optional<String>::nothing.

As arguments, the parameters are passed to this method automatically, which the user already provided. For example a parameter "CARD" the user already did set for selecting a specific sound card. So such arguments resolve dependencies of this parameter.

Parameters
Parameters- other parameters which the user already supplied

Implements LinuxSampler::DeviceCreationParameter.

◆ RangeMinAsInt()

virtual optional< int > LinuxSampler::AudioOutputDevice::ParameterChannels::RangeMinAsInt ( std::map< String, String Parameters)
virtual

◆ SetValue() [1/2]

virtual void LinuxSampler::DeviceCreationParameterInt::SetValue ( int  i)
throw (Exception
)
virtualinherited

◆ SetValue() [2/2]

virtual void LinuxSampler::DeviceCreationParameterInt::SetValue ( String  val)
throw (Exception
)
virtualinherited

Alter the parameter with the value given by val.

The respective deriving parameter class automatically parses the String value supplied here, and converts it into its native value type like int, float or String vector ("Strings").

Parameters
-new parameter value encoded as string
Exceptions
Exception- if val is out of bounds, not encoded correctly in its string representation or any other reason the driver might not want to accept the given value.

Implements LinuxSampler::DeviceRuntimeParameter.

◆ Type()

virtual String LinuxSampler::DeviceCreationParameterInt::Type ( )
virtualinherited

Some name reflecting the parameter's value type, like "BOOL, "INT", "FLOAT", "STRING", "STRINGS".

Upon the value returned here, the object can be casted to the respective implementing parameter class.

Implements LinuxSampler::DeviceRuntimeParameter.

◆ Value()

virtual String LinuxSampler::DeviceCreationParameterInt::Value ( )
virtualinherited

The current value of this parameter (encoded as String).

You might want to cast to the respective deriving parameter class like DeviceRuntimeParameterInt and use its method ValueAsInt() for not being forced to parse the String here.

Implements LinuxSampler::DeviceRuntimeParameter.

◆ ValueAsInt()

virtual int LinuxSampler::DeviceCreationParameterInt::ValueAsInt ( )
virtualinherited

Member Data Documentation

◆ iVal

int LinuxSampler::DeviceCreationParameterInt::iVal
protectedinherited

Definition at line 827 of file DeviceParameter.h.

◆ pDevice

Device* LinuxSampler::DeviceCreationParameter::pDevice
protectedinherited

Definition at line 753 of file DeviceParameter.h.


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