IpatchSampleStoreFile

IpatchSampleStoreFile — File sample store object

Synopsis




                    IpatchSampleStoreFile;
                    IpatchSampleStoreFileClass;
#define             IPATCH_SAMPLE_STORE_FILE_UNUSED_FLAG_SHIFT
IpatchSampleStore*  ipatch_sample_store_file_new        (void);
void                ipatch_sample_store_file_set_file   (IpatchSampleStore *store,
                                                         IpatchFile *file);
IpatchFile*         ipatch_sample_store_file_ref_file   (IpatchSampleStore *store);
IpatchFile*         ipatch_sample_store_file_peek_file  (IpatchSampleStore *store);
void                ipatch_sample_store_file_set_location
                                                        (IpatchSampleStore *store,
                                                         guint location);
guint               ipatch_sample_store_file_get_location
                                                        (IpatchSampleStore *store);

Object Hierarchy


  GObject
   +----IpatchItem
         +----IpatchSampleStore
               +----IpatchSampleStoreFile
                     +----IpatchSampleStoreSwap

Properties


  "file"                     IpatchFile            : Read / Write
  "location"                 guint                 : Read / Write

Description

A sample storage type that uses files to store sample data.

Details

IpatchSampleStoreFile

typedef struct _IpatchSampleStoreFile IpatchSampleStoreFile;


IpatchSampleStoreFileClass

typedef struct {
  IpatchSampleStoreClass parent_class;
} IpatchSampleStoreFileClass;


IPATCH_SAMPLE_STORE_FILE_UNUSED_FLAG_SHIFT

#define             IPATCH_SAMPLE_STORE_FILE_UNUSED_FLAG_SHIFT

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


ipatch_sample_store_file_new ()

IpatchSampleStore*  ipatch_sample_store_file_new        (void);

Creates a new file sample store.

Returns : New file sample store

ipatch_sample_store_file_set_file ()

void                ipatch_sample_store_file_set_file   (IpatchSampleStore *store,
                                                         IpatchFile *file);

Sets the file object of a IpatchSampleStoreFile. File object can only be set during inactive construction stage of the sample store and is required before it can be activated.

store : IpatchSampleStoreFile to assign file object to
file : File object

ipatch_sample_store_file_ref_file ()

IpatchFile*         ipatch_sample_store_file_ref_file   (IpatchSampleStore *store);

Gets the file object assigned to a file sample store. The returned file object's reference count is incremented and the caller is responsible for removing it with g_object_unref() when finished with it.

store : IpatchSampleStoreFile to get assigned file object from
Returns : The file object or NULL if not assigned. Remember to unreference the file object when finished with it.

ipatch_sample_store_file_peek_file ()

IpatchFile*         ipatch_sample_store_file_peek_file  (IpatchSampleStore *store);

Gets the file object assigned to a file sample store. Like ipatch_sample_store_file_ref_file() but file object's ref count is not incremented. This function should only be used if a reference of the file object is ensured (a reference of store is enough) or only the pointer value is of importance.

store : IpatchSampleStoreFile to get assigned file object from
Returns : The file object or NULL if not assigned. Remember that a reference is NOT added.

ipatch_sample_store_file_set_location ()

void                ipatch_sample_store_file_set_location
                                                        (IpatchSampleStore *store,
                                                         guint location);

Set the file location of sample data in a IpatchSampleStoreFile. The file location can only be set during inactive construction stage of the sample store and is required before it can be activated.

store : File sample store to set file location of
location : File offset in bytes of stored sample data

ipatch_sample_store_file_get_location ()

guint               ipatch_sample_store_file_get_location
                                                        (IpatchSampleStore *store);

Gets the location in the file store of the sample data.

store : File sample store to get file location of sample data from
Returns : Location, in bytes, in the file sample store of the sample data.

Property Details

The "file" property

  "file"                     IpatchFile            : Read / Write

Set file object of sample store


The "location" property

  "location"                 guint                 : Read / Write

Location in file of sample data (in bytes)

Default value: 0

See Also

IpatchSampleStoreSwap, IpatchSampleStoreRAM, IpatchSampleStoreROM