D-Bus Interface: Samples
(Back to the toplevel D-Bus Interface page)
Objects and their interfaces:
- /org/pulseaudio/core1/sampleX
- org.PulseAudio.Core1.Sample
- org.freedesktop.DBus.Properties
- org.freedesktop.DBus.Introspectable
org.PulseAudio.Core1.Sample
Properties
Index
- Type: Uint32
- Access: read
The sample index.
Name
- Type: String
- Access: read
The sample name.
SampleFormat
- Type: Uint32
- Access: read
The sample format of the sample (try not to get confused, the two "samples" in that sentence referred to different things). See DBusInterface/Enumerations#Sampleformats for the list of possible values.
This property doesn't exist if this is a "lazy" sample and is not loaded into memory yet.
- Errors:
- org.PulseAudio.Core1.NoSuchPropertyError if the sample hasn't been loaded into memory yet.
SampleRate
- Type: Uint32
- Access: read
The sample rate of the sample.
This property doesn't exist if this is a "lazy" sample and is not loaded into memory yet.
- Errors:
- org.PulseAudio.Core1.NoSuchPropertyError if the sample hasn't been loaded into memory yet.
Channels
- Type: [Uint32]
- Access: read
The channel map of the sample. The channel count can be inferred from this. The channel map is expressed as a list of channel positions, see DBusInterface/Enumerations#Channelpositions for the list of possible channel position values.
This property doesn't exist if this is a "lazy" sample and is not loaded into memory yet.
- Errors:
- org.PulseAudio.Core1.NoSuchPropertyError if the sample hasn't been loaded into memory yet.
DefaultVolume
- Type: [Uint32]
- Access: read
The default volume of the sample. The volume elements in the array match the channel positions in the Channels property.
This property doesn't exist if there's no default volume stored. In that case the default volume will be decided at the time of playing the sample.
- Errors:
- org.PulseAudio.Core1.NoSuchPropertyError if the sample doesn't have a stored default volume.
Duration
- Type: Uint64
- Access: read
The duration of the sample in microseconds.
This property doesn't exist if this is a "lazy" sample and is not loaded into memory yet.
- Errors:
- org.PulseAudio.Core1.NoSuchPropertyError if the sample hasn't been loaded into memory yet.
Bytes
- Type: Uint32
- Access: read
The length of the sample in bytes.
This property doesn't exist if this is a "lazy" sample and is not loaded into memory yet.
- Errors:
- org.PulseAudio.Core1.NoSuchPropertyError if the sample hasn't been loaded into memory yet.
PropertyList
- Type: {String -> [Byte]}
- Access: read
The sample's property list.
Methods
Play
- Arguments: volume : Uint32, property_list : {String -> [Byte]}
- volume: The volume at which to play the sample. Pass 65536 to play at the default level. Larger values are allowed, but those almost never make sense, because digital amplification very likely causes distortion.
- property_list: Additional properties to use when playing the sample. This can also be used to override existing properties.
Plays the sample. The server decides which sink will be used.
PlayToSink
- Arguments: sink : ObjectPath, volume : [Uint32], property_list : {String -> [Byte]}
- sink: The sink through which the sample shall be played
- volume: The volume at which to play the sample. Pass 65536 to play at the default level. Larger values are allowed, but those almost never make sense, because digital amplification very likely causes distortion.
- property_list: Additional properties to use when playing the sample. This can also be used to override existing properties.
Plays the sample to the given sink.
Remove
Removes the sample from the sample cache.
Signals
PropertyListUpdated
- Parameters: property_list : {String -> [Byte]}
- property_list: The new property list
The sample's property list was modified.
