IpatchSampleStore

IpatchSampleStore — Abstract sample storage object

Stability Level

Stable, unless otherwise indicated

Functions

Properties

int sample-format Read / Write
int sample-rate Read / Write
guint sample-size Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── IpatchItem
        ╰── IpatchSampleStore
            ├── IpatchSampleStoreFile
            ├── IpatchSampleStoreRam
            ├── IpatchSampleStoreRom
            ├── IpatchSampleStoreSndFile
            ├── IpatchSampleStoreSwap
            ├── IpatchSampleStoreVirtual
            ╰── IpatchSampleStoreCache

Description

Sample stores provide for various storage methods for audio data. Examples include: IpatchSampleStoreFile for audio data stored in files on disk, IpatchSampleStoreRAM for audio in RAM, IpatchSampleStoreROM for samples in ROM of a sound card, etc.

Functions

ipatch_sample_store_get_format()

#define             ipatch_sample_store_get_format(store)

Macro for getting the sample format from a sample store. No lock is required since format can only be set prior to the store being actively used.

Returns

Sample format field. See sample.


ipatch_sample_store_get_size()

#define ipatch_sample_store_get_size(store) ((store)->size)

Macro for getting the sample size in frames of a sample store. No lock is required since size can only be set prior to the store being actively used.

Returns

Sample store size in frames.


ipatch_sample_store_get_rate()

#define ipatch_sample_store_get_rate(store) ((store)->rate)

Macro for getting the sample rate from a sample store. No lock is required since rate can only be set prior to the store being actively used.

Returns

Sample rate in HZ.


ipatch_sample_store_get_size_bytes()

#define             ipatch_sample_store_get_size_bytes(store)

Macro for getting the sample store data size in bytes. No lock is required since format and size can only be set prior to the store being actively used.

Returns

Sample store size in bytes.


ipatch_sample_store_first ()

IpatchSampleStore *
ipatch_sample_store_first (IpatchIter *iter);

Gets the first item in a sample store iterator. A convenience wrapper for ipatch_iter_first().

[skip]

Parameters

iter

Patch item iterator containing IpatchSampleStore items

 

Returns

The first sample store in iter or NULL if empty.


ipatch_sample_store_next ()

IpatchSampleStore *
ipatch_sample_store_next (IpatchIter *iter);

Gets the next item in a sample store iterator. A convenience wrapper for ipatch_iter_next().

[skip]

Parameters

iter

Patch item iterator containing IpatchSampleStore items

 

Returns

The next sample store in iter or NULL if at the end of the list.

Types and Values

IPATCH_SAMPLE_STORE_FORMAT_SHIFT

#define IPATCH_SAMPLE_STORE_FORMAT_SHIFT IPATCH_ITEM_UNUSED_FLAG_SHIFT

IPATCH_SAMPLE_STORE_UNUSED_FLAG_SHIFT

#define             IPATCH_SAMPLE_STORE_UNUSED_FLAG_SHIFT

Property Details

The “sample-format” property

  “sample-format”            int

Sample format.

Owner: IpatchSampleStore

Flags: Read / Write

Allowed values: >= 0

Default value: 2


The “sample-rate” property

  “sample-rate”              int

Sampling rate in Hertz.

Owner: IpatchSampleStore

Flags: Read / Write

Allowed values: [100,192000]

Default value: 44100


The “sample-size” property

  “sample-size”              guint

Size in frames.

Owner: IpatchSampleStore

Flags: Read / Write

Default value: 0