IpatchSampleStoreRAM

IpatchSampleStoreRAM — RAM sample store object

Synopsis




                    IpatchSampleStoreRAM;
                    IpatchSampleStoreRAMClass;
#define             IPATCH_SAMPLE_STORE_RAM_UNUSED_FLAG_SHIFT
IpatchSampleStore*  ipatch_sample_store_RAM_new         (void);
void                ipatch_sample_store_RAM_set_location
                                                        (IpatchSampleStore *store,
                                                         gpointer location);
gpointer            ipatch_sample_store_RAM_get_location
                                                        (IpatchSampleStore *store);

Object Hierarchy


  GObject
   +----IpatchItem
         +----IpatchSampleStore
               +----IpatchSampleStoreRAM

Properties


  "location"                 gpointer              : Read / Write

Description

A sample storage type that uses RAM memory to store sample data.

Details

IpatchSampleStoreRAM

typedef struct _IpatchSampleStoreRAM IpatchSampleStoreRAM;


IpatchSampleStoreRAMClass

typedef struct {
  IpatchSampleStoreClass parent_class;
} IpatchSampleStoreRAMClass;


IPATCH_SAMPLE_STORE_RAM_UNUSED_FLAG_SHIFT

#define             IPATCH_SAMPLE_STORE_RAM_UNUSED_FLAG_SHIFT

Shift value of next unused IpatchItem flag (for derived types).


ipatch_sample_store_RAM_new ()

IpatchSampleStore*  ipatch_sample_store_RAM_new         (void);

Creates a new RAM sample store.

Returns : New RAM sample store

ipatch_sample_store_RAM_set_location ()

void                ipatch_sample_store_RAM_set_location
                                                        (IpatchSampleStore *store,
                                                         gpointer location);

Points a RAM sample store to existing sample data. This function can only be called during the inactive construction stage of a RAM sample store and can only be called once. Either this function needs to be called and supplied with existing sample data, or ipatch_sample_store_alloc() has to be called before the sample store can be activated.

store : IpatchSampleStoreRAM to set sample data location pointer of
location : Pointer to sample data in RAM

ipatch_sample_store_RAM_get_location ()

gpointer            ipatch_sample_store_RAM_get_location
                                                        (IpatchSampleStore *store);

Get the sample data pointer from a RAM sample store.

NOTE: If the RAM sample store allocated the sample data (ipatch_sample_store_alloc() was called on it), a reference should be held on store for as long as the sample data pointer is used. This is to ensure that the sample data doesn't get de-allocated while accessing it.

store : IpatchSampleStoreRAM to fetch sample data pointer from
Returns : Pointer to RAM sample data for store or NULL if not set. See important note above concerning referencing store.

Property Details

The "location" property

  "location"                 gpointer              : Read / Write

Location in memory of sample data (a pointer really).

See Also

IpatchSampleStoreFile, IpatchSampleStoreSwap, IpatchSampleStoreROM