## IpatchSampleStore IpatchSampleStore — Abstract sample storage object |

## Stability Level

Stable, unless otherwise indicated

## Synopsis

                        IpatchSampleStore;
    #define             IPATCH_SAMPLE_STORE_FORMAT_SHIFT
    #define             ipatch_sample_store_get_format      (store)
    #define             ipatch_sample_store_get_size        (store)
    #define             ipatch_sample_store_get_rate        (store)
    #define             ipatch_sample_store_get_size_bytes  (store)
    #define             IPATCH_SAMPLE_STORE_UNUSED_FLAG_SHIFT
    IpatchSampleStore * ipatch_sample_store_first           (IpatchIter *iter);
    IpatchSampleStore * ipatch_sample_store_next            (IpatchIter *iter);

## Object Hierarchy

      GObject
       +----IpatchItem
             +----IpatchSampleStore
                   +----IpatchSampleStoreFile
                   +----IpatchSampleStoreRam
                   +----IpatchSampleStoreRom
                   +----IpatchSampleStoreSndFile
                   +----IpatchSampleStoreVirtual
                   +----IpatchSampleStoreCache

## Implemented Interfaces

IpatchSampleStore implements IpatchSample.

## Properties

      "sample-format"            gint                  : Read / Write
      "sample-rate"              gint                  : Read / Write
      "sample-size"              guint                 : Read / Write

## 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.

## Details

### IpatchSampleStore

    typedef struct _IpatchSampleStore IpatchSampleStore;

### IPATCH_SAMPLE_STORE_FORMAT_SHIFT

    #define IPATCH_SAMPLE_STORE_FORMAT_SHIFT IPATCH_ITEM_UNUSED_FLAG_SHIFT

### 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_UNUSED_FLAG_SHIFT

    #define             IPATCH_SAMPLE_STORE_UNUSED_FLAG_SHIFT

### 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()`.

`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()`.

`iter` : | Patch item iterator containing IpatchSampleStore items
Returns : | The next sample store in `iter` or `NULL` if at the end of the list.

## Property Details

### The `"sample-format"` property

      "sample-format"            gint                  : Read / Write

Sample format.

Allowed values: >= 0

Default value: 2

### The `"sample-rate"` property

      "sample-rate"              gint                  : Read / Write

Sampling rate in Hertz.

Allowed values: [8000,192000]

Default value: 44100

### The `"sample-size"` property

      "sample-size"              guint                 : Read / Write

Size in frames.

Default value: 0